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

Re-organising System Rows

4 Answers 32 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Glen
Top achievements
Rank 1
Glen asked on 20 Apr 2015, 09:13 AM
I'm trying to make it so the Column headers appear above all of the other system rows: The add new row, the grouping row and the filter row. I can access these in the child row collection and also the systemrow property in the currentView property. However, these are both read only. Is there a way to re-order these rows, or am I stuck with the order it gives me?

4 Answers, 1 is accepted

Sort by
0
Glen
Top achievements
Rank 1
answered on 20 Apr 2015, 02:26 PM
Sorry, should have mentioned that this is for the winforms gridview control
0
Dimitar
Telerik team
answered on 21 Apr 2015, 08:30 AM
Hello Glen,

Thank you for writing.

The header row is above all other rows by default, however it is below the GroupPanel (this is a separate element and it is not a part of the TableElement which contains the rows.  In this case you can dock the group panel under the TableElement with the following code:  
radGridView1.GridViewElement.Children[0].Children[0].SetValue(DockLayoutPanel.DockProperty, Telerik.WinControls.Layouts.Dock.Bottom);
radGridView1.GridViewElement.Children[0].Children[1].SetValue(DockLayoutPanel.DockProperty, Telerik.WinControls.Layouts.Dock.Top);

Let me know if you have additional questions.
 
Regards,
Dimitar
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Glen
Top achievements
Rank 1
answered on 27 Apr 2015, 11:24 AM

Thanks for the response Dimitar, however, what I really want is the Header rows directly above the table element. Currently I have the Column chooser, then the Header rows, then new Row, then The filter row. This is just the default I guess, so how do I rearrange them relative to each other?

 

0
Dimitar
Telerik team
answered on 30 Apr 2015, 06:50 AM
Hello Glen,

Thank you for writing back.

This is possible and to achieve it you should use the Move method of the system rows collection. Additionally, you should update the layout:
radGridView1.MasterView.SystemRows.Move(0, 2);
radGridView1.GridViewElement.InvalidateMeasure(true);
radGridView1.GridViewElement.UpdateLayout();

Please let me know if there is something else I can help you with. 

Regards,
Dimitar
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
GridView
Asked by
Glen
Top achievements
Rank 1
Answers by
Glen
Top achievements
Rank 1
Dimitar
Telerik team
Share this question
or