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

How to remove GridViewSummaryRowItem from RadGridView.

3 Answers 351 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mohammad
Top achievements
Rank 1
Mohammad asked on 12 Apr 2012, 01:27 PM
Hi,

Background:

I am populate a grid on certain criteria which user selects within a form. When user press the Load Data button, the data is getting loaded into the RadGridView along with a SummaryRow on the top of the grid.

I have a clear data button which currently clears the grid by setting the DataSource property to null.

Issue:

When user hit the Clear Data button alothough it clears out all the data but leaves that Summary row on the top, which is an issue.

My question is - Is there a way to remove the GridViewSummaryRowItem or any way I can refresh the whole grid which removes the SummaryRow.

Thanks.
Regards
Mohammad

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 17 Apr 2012, 01:27 PM
Hi Mohammad,

Thank you for writing.

I made a sample test according to your description and when I set the DataSource of the grid to null it shows the "No data to display" string and the rows, columns and the summary row are not displayed. Attached you can find a sample project demonstrating this.

However, you can always call the Clear method of the desired summary row collection:
this.radGridView1.SummaryRowsTop.Clear();

I hope that you find the provided information useful. Let us know if you have any other questions.
 
Kind regards,
Stefan
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
0
Mohammad
Top achievements
Rank 1
answered on 17 Apr 2012, 11:06 PM
Hi Stefan,

Thank you very much for writing it back with a nice and simple solution demonstrating the desired functionality. This is exectly what I was looking for, thank you very much for taking time to do this.

I'm very impressed with response which was really helpful and did resolve the issue I was facing.

Thanks again.

Regards
Mohammad
0
Stefan
Telerik team
answered on 20 Apr 2012, 03:36 PM
Hi Mohammad,

You are very welcome. Should you have any other questions, do not hesitate to contact us.
 
Greetings,
Stefan
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Tags
GridView
Asked by
Mohammad
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Mohammad
Top achievements
Rank 1
Share this question
or