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

How can i Deselect the First Row at initial binding in a grid

1 Answer 86 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Pradeep Enugala
Top achievements
Rank 1
Pradeep Enugala asked on 23 Jun 2010, 08:47 AM
dear telerik Support,

I am binding data to a grid,my requirement is not to select any row at first time.
But grid has default property as first row is getting selected on binding data.

i browsed this forum and got to know little code..

this.grdSample.CurrentRow = null;
this.grdSample.GridElement.Update(Telerik.WinControls.UI.GridUINotifyAction.StateChanged);

but it is not working for me. i am getting index out of bound exception at this.grdSample.CurrentRow = null;
but my grid has few rows of data.

Reply me ASAP.
i am using 2010 Q1 version.

Thanks,
Regards,
Pradeep

1 Answer, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 24 Jun 2010, 09:41 AM
Hello Pradeep Enugala,

This code should work properly when setting the CurrentRow property after setting the DataSource one. Here is a sample:

this.radGridView1.DataSource = table;
this.radGridView1.CurrentRow = null;

If the issue continues to appear, please send me your application so that I can investigate the case locally.

I am looking forward to your reply.

 

All the best,
Jack
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Pradeep Enugala
Top achievements
Rank 1
Answers by
Jack
Telerik team
Share this question
or