You must Sign In to post a response.
  • Category: WPF

    Component one datagrid issue

    hi

    i am having a component one datagrid and an add button.i have large datas to be shown in datagrid and displays fine.when i click add button, it adds a new row in the grid.these all works fine for me.my problem is, when a add a new row it adds in the end of grid but not automatically scroll to the end and focus the cell. when i manually scrolls the row is present but my aim is to focus the scroll as soon as the new one added. pls help me with right code.
  • #762326
    Hi

    This control component one datagrid free?

    can you share the code with snapshots

    where i go to download this component one datagrid?

    if you need scroll in your gridview means try this code


    <div id="div1" style="overflow:auto; width:400px;height:150px;">
    <asp:GridView ID="GrdData1" runat="server" AutoGenerateColumns="false">
    <Columns>
    <asp:BoundField DataField = "EMPID" HeaderText = "EMPID ID" />
    <asp:BoundField DataField = "EMPNAME" HeaderText = "EMPNAME" />

    <asp:TemplateField ItemStyle-Width = "30px" HeaderText = "EMPID">
    <ItemTemplate>
    <asp:LinkButton ID="lnkEditRecord" runat="server" Text = "Edit" OnClick="lnkEditRecord_Click"></asp:LinkButton>
    </ItemTemplate>
    </asp:TemplateField>
    </Columns>
    </asp:GridView>
    </div>


    Name : Dotnet Developer-2015
    Email Id :kumaraspcode2009@gmail.com

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.

  • #762332
    Hi Aparna,

    If you want to focus last row of gridview which is newly added, then use below sample code.


    gv.Rows[gv.Rows.Count-1].Focus();


    this will help you to achieve your goal.

    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/

  • #762334
    hi naveensanagasetti

    i am using componentone datagrid which does not support .focus

  • #762335
    Hi Aparna,

    Refer below link, probably this will help you to fix the above issue;

    http://www.codeproject.com/Questions/641890/How-to-set-focus-on-updated-datagridview-row-after

    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/


Sign In to post your comments