Freeze summary row at the bottom of gridView

2 posts, 0 answers
  1. esn
    esn avatar
    2 posts
    Member since:
    Aug 2016

    Posted 31 Aug Link to this post


    Is there a way to make the summary row freeze at the bottom of gridView so it doesn't move in any situation, I added the summary row to the my gridView with below code which works only when the amount of rows are higher than gridView height, but as soon as there are one or two rows in the grid, the summary row sticks to the bottom of the last row but not to bottom of the gridView.


    GridViewSummaryRowItem summary =new GridViewSummaryRowItem();
    summary.Add(new GridViewSummaryItem("total", "{0:#,###}", GridAggregateFunction.Sum));
    productGrid.SummaryRowsTop.Add(summary) ;
    this.productGrid.MasterTemplate.ShowTotals = true;
    this.productGrid.MasterView.SummaryRows[0].PinPosition = PinnedRowPosition.Bottom;

  2. Dimitar
    Dimitar avatar
    1321 posts

    Posted 01 Sep Link to this post


    Thank you for writing.

    This is the correct way to pin the row. Unfortunately, there is no way to change this and move the row to the bottom when the rows height is smaller than the available height. The only possible solution I can think of is to add details element to the bottom of the grid. We have an example for this in our demo application (see attached image). However, this approach will require to manually calculate the summary items and you may need to update its elements position if the columns are resized. 

    If you have any other questions, please do not hesitate to contact us.

    Telerik by Progress
    Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
  3. DevCraft R3 2016 release webinar banner
Back to Top