how to select row and have it set for current row upon loading

2 posts, 0 answers
  1. Lily
    Lily avatar
    26 posts
    Member since:
    Feb 2019

    Posted 18 Jun Link to this post

    Hi,

    I have a question about IsSelected & IsCurrent.

    I have a gridview that when upon loading, the first row is selected and highlighted, so I have a pop-up contatiner that will get the current row data.  But when reload that gridview again, no rows are highlighted any longer.

    I've tried IsSelected and IsCurrent, but it only highlights the row with the IsSelected, but when I click on the pop-container that gets the current row data, it gives a error due to null value.

    What can I do?

    Thanks!

  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3901 posts

    Posted 19 Jun Link to this post

    Hello, Lily,  

    I would like to start with the clarification that selected and current row are two different things. One row can be:

    1. Only current, but not selected
    2. Only selected, but not current
    3. Both, selected and current

    Please refer to the below screenshots for better illustration of the different style that RadGridView offers for the selected and current row:

    Only one row can be Current in the grid, but multiple rows can be Selected.

    If you set the CurrentRow in the grid, it automatically gets also selected. But after that, you can make another row selected:

            Me.RadGridView1.CurrentRow = Me.RadGridView1.Rows(1)
            Me.RadGridView1.Rows(5).IsSelected = True

    In case you are still experiencing any further difficulties, it would be greatly appreciated if you can provide more information about the precise case and the exact goal that you are trying to achieve. Thus, we would get better understanding of the precise case and think about a suitable solution. Thank you.

    I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
Back to Top