Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > General Discussions > Radgridview Focus first row

Not answered Radgridview Focus first row

Feed from this thread
  • selva avatar

    Posted on Oct 20, 2010 (permalink)

    Hi sir,

                I am used radgridview  in my project. I added rows at the bottom. At the current row focus at the bottom of the radgridview.
    How it will focus the top of the radgridview. Here i am used winforms in vb.net. Not ASP.net.

    give sample coding also.
    Its Urgent

    Thanks
    M.Selvasundar.

    Reply

  • Posted on Oct 21, 2010 (permalink)

    hello, 

    This question belongs in the RadGridView forum. Anyhow, in order to set the current record to the one at the top, please consider the following code. 

    Me.RadGridView.Rows(0).IsSelected = True
    Me.RadGridView.Rows(0).IsCurrent = True
    Me.RadGridView.Rows(0).EnsureVisible()

    Let me know if there's anything else
    Richard

    Reply

  • Posted on Nov 7, 2010 (permalink)

    Hi Selva,

    Did this work for you? If so, please remember to mark as answer so others can quickly find the solution too.
    Thanks
    richard

    Reply

  • Jacob avatar

    Posted on Dec 4, 2011 (permalink)

    Hello,
    I have created radGridView and every time I change my textbox, the gridview updates itself using the textbox text as filter to search. and every time I change textbox I set
    radGridView.Rows[0].isCurrent = true;
    so that the first item in the gridview is always highlighted after every grid change.
    However surprisingly in some cases it doesn't hightlight the first row. And I can't figure out what may be causing this.

    Reply

  • Stefan Stefan admin's avatar

    Posted on Dec 7, 2011 (permalink)

    Hello Jacob,

    Thank you for writing.

    As you understand, the provided information is not enough to determine what causes such an issue. The best approach here will be to open a new support ticket and provide us with your project, together with detailed steps on how to reproduce the undesired behavior. Once we are able to replicate this case on our end, we will be able to assist you in preventing this case.

    I am looking forward to your support ticket.
     
    All the best,
    Stefan
    the Telerik team

    Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.

    Reply

  • Jacob avatar

    Posted on Dec 7, 2011 (permalink)

    I have sorted this problem out as I made my way around it with some additional code but I have found out the problem is I sort the rows ascendingly according to name and after this the rowindexes mess up and become useless.
    I am sure you can reproduce this situation quite easily by creating table with one column with values B, C, A, D and then setting this table as a datasource for gridview which you will sort by this column.

    Reply

  • Svett Svett admin's avatar

    Posted on Dec 12, 2011 (permalink)

    Hello Jacob,

    I suppose that the issue is caused by the fact that you are using the Rows collection when sorting or filtering is applied. You should use the ChildRows collection instead. The row indexes in this case are correct only for this collection. For additional information about ChildRows collection, please refer to this article.

    All the best,
    Svett
    the Telerik team

    Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > General Discussions > Radgridview Focus first row
Related resources for "Radgridview Focus first row"

Features  |  Demos  |  Documentation  |  Telerik TV  |  Knowledge Base  |  Code Library  |  Step-by-step Tutorial  |  Blogs   |  Self-Paced Trainer  ]