My gridview automatically expands a group when accessed that is in the middle of the grid so it forces the user to collapse the group and then scroll to the top of the grid. When I ungroup the data, the grid will just select a row. I basically need nothing to be expanded or selected by default but I do not see (or can not find) any options or documentation on solving this.
Edit: So it seems that it is selecting the first row from my database if this helps any.
Thanks,
Kyle
Edit: So it seems that it is selecting the first row from my database if this helps any.
Thanks,
Kyle
5 Answers, 1 is accepted
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 16 May 2011, 09:43 AM
Hi Kyle,
You can ensure that no rows are selected when the RadGridView loads by setting the following:
Hope that helps but let me know if you need more info.
Richard
You can ensure that no rows are selected when the RadGridView loads by setting the following:
radGridView1.CurrentRow =
null
;
Hope that helps but let me know if you need more info.
Richard
0
Hello Kyle,
Thank you for contacting us. When initialized with a data source RadGridView synchronizes its current position with the corresponding currency manager. In your case the selected row is inside a group and RadGridView automatically expands this group. You cannot change this behavior, however you can reset the current row and scroll to top programmaticaly. Please consider the code below:
I hope this helps.
Best wishes,
Jack
the Telerik team
Thank you for contacting us. When initialized with a data source RadGridView synchronizes its current position with the corresponding currency manager. In your case the selected row is inside a group and RadGridView automatically expands this group. You cannot change this behavior, however you can reset the current row and scroll to top programmaticaly. Please consider the code below:
this
.radGridView1.CurrentRow =
null
;
this
.radGridView1.TableElement.VScrollBar.Value = 0;
I hope this helps.
Best wishes,
Jack
the Telerik team
0
MARIANO
Top achievements
Rank 1
answered on 11 Jun 2012, 07:39 PM
its posible? to set currentrow=false in desing time and not fire event
CurrentRowChanged
thanks
0
Accepted
Hello Mariano,
The CurrentRow property is not available at design time and therefore you can change it only with code. You can prevent the CurrentRowChanged event from firing by calling the SuspendEvent method of the EventDispatcher. Please consider the code below:
I hope this helps.
Kind regards,
Jack
the Telerik team
The CurrentRow property is not available at design time and therefore you can change it only with code. You can prevent the CurrentRowChanged event from firing by calling the SuspendEvent method of the EventDispatcher. Please consider the code below:
radGridView1.MasterTemplate.EventDispatcher.SuspendEvent(EventDispatcher.CurrentRowChanged);
radGridView1.DataSource = t1;
radGridView1.MasterTemplate.EventDispatcher.ResumeEvent(EventDispatcher.CurrentRowChanged);
I hope this helps.
Kind regards,
Jack
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
0
MARIANO
Top achievements
Rank 1
answered on 12 Jun 2012, 03:50 PM
thanks its a very good idea