Deselect row on page load

9 posts, 0 answers
  1. Balsuyambu
    Balsuyambu avatar
    37 posts
    Member since:
    Sep 2010

    Posted 26 Dec 2012 Link to this post

    Hi

    First row of grid is selected by default while page is loading.

    is there possible none of the rows are selected while page is loading?

    Thanks
    Balsuyambu S.
  2. Nick
    Admin
    Nick avatar
    593 posts

    Posted 26 Dec 2012 Link to this post

    Hi Baslsuyambu,

    You can set the IsSynchronisedWithCurrentItem property to false.

    Hope this helps! 

    Regards,
    Nik
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. Balsuyambu
    Balsuyambu avatar
    37 posts
    Member since:
    Sep 2010

    Posted 26 Dec 2012 Link to this post

    Hi Nik,

    Thanks for your immediate reply.

    It is working fine. but Row Indicator always visible in first row even through i select other row.

    Is there any way to show row indicator also in the row which is selected?

    Thanks
    Balsuyambu S.
  4. Nick
    Admin
    Nick avatar
    593 posts

    Posted 26 Dec 2012 Link to this post

    Hello,

    You can set the IsSynchronisedWithCurrentItem to true after the grid has been loaded which should restore the behavior.

    Kind regards,
    Nik
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  5. Balsuyambu
    Balsuyambu avatar
    37 posts
    Member since:
    Sep 2010

    Posted 26 Dec 2012 Link to this post

    Hi

    I  have below scenarios.

    1. None of the rows are selected while grid control is loaded.
    2. If user selects any row, selected row should be highlighted with row indicator.

    if i provide IsSynchronisedWithCurrentItem to true in grid loaded event then first row is always selected. but i want none of the row is selected.



    Thanks
    Balsuyambu S.
  6. Nick
    Admin
    Nick avatar
    593 posts

    Posted 26 Dec 2012 Link to this post

    Hello Balsuyambu,

    You have to set the IsSynchronisedWithCurrentItem property to false, and manually change the Current item on SelectionChanged afterwards. 

    void clubsGrid_SelectionChanged(object sender, SelectionChangeEventArgs e)
            {
                var grid = sender as RadGridView;
     
                grid.CurrentItem = grid.SelectedItem;
            }


    Hope this helps!  Kind regards,
    Nik
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  7. Balsuyambu
    Balsuyambu avatar
    37 posts
    Member since:
    Sep 2010

    Posted 26 Dec 2012 Link to this post

    Hi Nik,

    Thank you!

    It is working fine as expected but rowindicator is visible in the first row when grid is loaded.

    is there any way to hide the row indicator which is visible in the first row when grid is loaded.

    Please find attached screenshot.

    Thanks
    Balsuyambu S.

  8. Nick
    Admin
    Nick avatar
    593 posts

    Posted 27 Dec 2012 Link to this post

    Hi Balsuyambu,

    I am attaching an example of how you can achieve the behavior. Hope it helps! 

    Kind regards,
    Nik
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  9. Balsuyambu
    Balsuyambu avatar
    37 posts
    Member since:
    Sep 2010

    Posted 27 Dec 2012 Link to this post

    Hi Nik,

    Thank you so much.

    It is working fine as expected.

    Thanks
    Balsuyambu S.
Back to Top