This is a migrated thread and some comments may be shown as answers.

Deselect row on page load

8 Answers 69 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Balsuyambu
Top achievements
Rank 1
Balsuyambu asked on 26 Dec 2012, 11:45 AM
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.

8 Answers, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 26 Dec 2012, 11:47 AM
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.

0
Balsuyambu
Top achievements
Rank 1
answered on 26 Dec 2012, 12:07 PM
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.
0
Nick
Telerik team
answered on 26 Dec 2012, 12:10 PM
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.

0
Balsuyambu
Top achievements
Rank 1
answered on 26 Dec 2012, 12:23 PM
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.
0
Nick
Telerik team
answered on 26 Dec 2012, 12:54 PM
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.

0
Balsuyambu
Top achievements
Rank 1
answered on 27 Dec 2012, 05:15 AM
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.

0
Nick
Telerik team
answered on 27 Dec 2012, 08:51 AM
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.

0
Balsuyambu
Top achievements
Rank 1
answered on 27 Dec 2012, 09:26 AM
Hi Nik,

Thank you so much.

It is working fine as expected.

Thanks
Balsuyambu S.
Tags
GridView
Asked by
Balsuyambu
Top achievements
Rank 1
Answers by
Nick
Telerik team
Balsuyambu
Top achievements
Rank 1
Share this question
or