Hi,
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;
9 Answers, 1 is accepted
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.
Regards,
Dimitar
Telerik by Progress
Dear Dimitar ,
Could you provide me with the sample .
Regards .
Hi,
The example code is available in the demo application (see attached). There is a Visual Studio solution with all examples in the installation folder: C:\Program Files (x86)\Progress\Telerik UI for WinForms R2 2019\Examples\QuickStart
I hope this helps. Should you have any other questions, do not hesitate to ask.
Regards,
Dimitar
Progress Telerik
Dear Dimitar's ,
Could you provide me with a sample to put the summary row at the end of grid (on bottom) .
I see the example of custom view of grid I need to put another grid in detail area to make a row in bottom .
Regards .
Hi,
I have attached a small sample that shows how you can pin the summary row. Let me know how it diffrens from your requirement.
I am looking forward to your reply.
Regards,
Dimitar
Progress Telerik
Thank you for replay dear dimitar ,
The sample is nearby for our needs but not what is really need , I need two or three columns beside each other and what is really important also I need to the change the value of summary at run time .
Regards .
Also I another important thing when the grid is not filled with rows,I need the summary at the bottom of screen see the attached picture,
in the attached picture the grid has 5 rows what I need is the summary on bottom of screen .
regards .
in the attached picture the grid has 5 rows what I need is the summary on bottom of screen .
regards .
Hello,
Thank you for writing back. Actually we have logged a feature request on our Feedback Portal concerning this functionality: https://feedback.telerik.com/winforms/1368000-add-radgridview-allow-pinned-items-position-modification-in-order-to-be-able-to-always-show-the-pinned-summary-row-instead-of-being-show-as-the-last-row-in-the-grid. The fix was introduced in R3 2016 SP1(version 2016.3). Currently, you can control the location of the bottom summary rows by the BottomPinnedRowsMode property. You should set this property to Fixed and the summary row will remain at the bottom of the viewport no matter how many scrollable rows there are in the viewport:
this.radGridView1.MasterView.SummaryRows[0].PinPosition = PinnedRowPosition.Bottom;
this.radGridView1.MasterTemplate.BottomPinnedRowsMode = GridViewBottomPinnedRowsMode.Fixed;
More information is available in the following documentation article: https://docs.telerik.com/devtools/winforms/controls/gridview/rows/summary-rows#bottompinnedrowsmode
I hope this information helps. Should you have any other questions, I will be glad to help.
Regards,
Nadya
Progress Telerik