GridView Selected row

2 posts, 0 answers
  1. Juzzer
    Juzzer avatar
    12 posts
    Member since:
    Sep 2007

    Posted 10 Dec 2007 Link to this post

    Hi there,

    I have a Grid in a win app and want to select the current row when the user refreshes the grid so use:

                radGridView1.Rows[someIndex].IsSelected = true;

    The above code kinda works but the first row of the grid is always selected as well. More than likely i'm missing the obvious.


  2. Jack
    Jack avatar
    2333 posts

    Posted 11 Dec 2007 Link to this post

    Hello Juzzer,

    Thank you for writing us.

    The IsSelected property indicates that the row was selected. RadGridView can contain multiple selected rows and they can be accessed through the SelectedRows property of RadGridView. When you mark some row as selected it will be automatically added in the SelectedRows collection.

    The IsCurrent property indicates which is the currently selected row. Only one row in RadGridView can be marked as current. The current row is synchronized with the Position property of the CurrencyManager associated with your data source.

    I would suggest using the IsCurrent property instead of the IsSelected property.

    In case you need further assistance, we will be glad to help you.

    Kind regards,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top