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

Removing rows

1 Answer 41 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Marco
Top achievements
Rank 1
Marco asked on 05 Oct 2009, 08:41 PM
Hi,

I have a grid bound to a DataTable (cannot use Observable collection of custom objects), when I add or delete a row from the dataTable instance the grid is not refreshed, which is kind of expected.  But the problem is when I force a grid refresh, the only way I found to accomplish that was doing something like this:

myGrid.ItemsSource = null
myGrid.ItemsSource = samplesDataTable

This is extremely expensive.  Is there a more convinient and less expensive way to refresh the grid rows?

Thanks,
Marco


1 Answer, 1 is accepted

Sort by
0
Accepted
Milan
Telerik team
answered on 06 Oct 2009, 05:25 AM
Hi Marco,

You could try the Rebind method of RadGridView. It is a lightweight method that refreshes the grid.

All the best,
Milan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Marco
Top achievements
Rank 1
Answers by
Milan
Telerik team
Share this question
or