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

How to insert\Delete row without rebinding itemsource?

2 Answers 251 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Virendra
Top achievements
Rank 1
Virendra asked on 04 May 2009, 07:39 AM
Hi,
Is there a way to insert\delete row without rebinding itemsource?

In my application i have very complex/data heavy grid, which i don't want to rebind every time any row is inserted, deleted or updated.
Can we separate UI and datasource updation?

Thanks
virendra

2 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 05 May 2009, 01:28 PM
Hi Virendra,

It is possible to avoid rebinding. However your data should follow some requirements.

Please use ObservableCollection or a collection implementing the INotifyCollectionChanged interface. as items source.

It you bind the ItemsSource property of the RadGridView to such collection , the RadGridView will automatically reflect changes in items , without the need to rebind.

Additionally I would recommend the objects in the collection to implement the INotifyProperty changed interface. 

Sincerely yours,
Pavel Pavlov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Virendra
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Krlos
Top achievements
Rank 1
Share this question
or