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

summary row format and pin

3 Answers 62 Views
GridView
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 25 Nov 2012, 08:42 PM
Hi,
i'm trying to make a grid look like the attached image.  i want the total part at the bottom to look like the image.  i've tried various things and i can't even get it to pin to the bottom.  
i found code on another thread that said to do this to get it to the bottom:
grdTxCodes.MasterView.SummaryRows[0].PinPosition = PinnedRowPosition.Bottom;
but that doesn't work for me unless the grid has a bunch of rows in it.  when there's no rows or only a couple, the summary row is right under them.  I need it at the bottom and also need it to only show for a couple columns.  i added summary items for those columns and i do get totals, but all the other columns have what look to be cells under them that are just blank.  can those be removed?

i blacked the data in it out for security reasons.

Thanks!

3 Answers, 1 is accepted

Sort by
0
Ivan Todorov
Telerik team
answered on 29 Nov 2012, 07:11 AM
Hi John,

Thank you for contacting us.

The requested behavior can be achieved by modifying the layout of some of the grid's elements and modifying the borders and fills of the summary elements. I am attaching a sample project which demonstrates how you can achieve this.

Hope you find it useful. Do not hesitate to ask if you have any additional questions.

Kind regards,
Ivan Todorov
the Telerik team
Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
0
John
Top achievements
Rank 1
answered on 03 Dec 2012, 04:23 PM
Thanks for the response Ivan.  I've been trying to make this work and i can't get it fully working.  The code you gave me pined the row to the bottom like i wanted and works good.  I can't get rid of the cell borders in my summary row though.

I played with my code and yours and here's what i found

if i comment out all the custom code you added to yours (3 lines):

this.radGridView1.MasterTemplate.ViewDefinition = new MyTableViewDefinition();
this.radGridView1.ViewRowFormatting += new RowFormattingEventHandler(radGridView1_ViewRowFormatting);
this.radGridView1.ViewCellFormatting += new CellFormattingEventHandler(radGridView1_ViewCellFormatting);

and run your project, your summary row doesn't have cell lines anyway.  Mine does.  what is adding them to mine but not yours?

see the attached image for an example.

Thanks!
0
Ivan Todorov
Telerik team
answered on 06 Dec 2012, 02:16 PM
Hello John,

The summary row does not have any cell borders by default, so you should not get these if you do not have any customization code. In my project I am using the ViewCellFormatting and ViewRowFormatting events to enable borders only on the cells that have values. Please make sure that you are not modifying the properties of the summary cells anywhere in your code. If you continue experiencing difficulties, please open a new support ticket and send me your project (or a sample one). This will let me investigate it and provide you with proper answer.

Let me know if I can be of further assistance.

All the best,
Ivan Todorov
the Telerik team
Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
Tags
GridView
Asked by
John
Top achievements
Rank 1
Answers by
Ivan Todorov
Telerik team
John
Top achievements
Rank 1
Share this question
or