Re-organising System Rows

5 posts, 0 answers
  1. Glen
    Glen avatar
    3 posts
    Member since:
    Aug 2014

    Posted 20 Apr 2015 Link to this post

    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?
  2. Glen
    Glen avatar
    3 posts
    Member since:
    Aug 2014

    Posted 20 Apr 2015 Link to this post

    Sorry, should have mentioned that this is for the winforms gridview control
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 21 Apr 2015 Link to this post

    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.

     
  5. Glen
    Glen avatar
    3 posts
    Member since:
    Aug 2014

    Posted 27 Apr 2015 Link to this post

    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?

     

  6. Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 30 Apr 2015 Link to this post

    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.

     
Back to Top
UI for WinForms is Visual Studio 2017 Ready