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

Customize for PropertyGrid Edit Collections

2 Answers 84 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Yuanhong
Top achievements
Rank 1
Yuanhong asked on 05 Nov 2019, 03:17 AM

Hi:

    I recently encountered a problem when using Edit Collections. I want to save the database immediately after editing Edit Collections.Is it possible to customize the Edit Collections template and add save buttons other than add and remove to achieve this?

2 Answers, 1 is accepted

Sort by
0
Yuanhong
Top achievements
Rank 1
answered on 05 Nov 2019, 05:46 AM
Or please tell me if Edit Collections can trigger an event to let me capture.
0
Dilyan Traykov
Telerik team
answered on 07 Nov 2019, 02:14 PM

Hi Yuanhong,

I assume from your replies that you're referring to the CollectionEditor control. Please let me know if I'm mistaken in this assumption.

What I can suggest in such case is to simply handle the CollectionChanged event of the bound collection, if it implements the INotifyCollectionChanged interface and update the database accordingly each time the collection changes.

If you do want to add a custom button with which to update the database, you will need to modify the control template of the CollectionEditor control and add the new button bound to your custom command.

For your convenience, I've prepared a small sample project which demonstrates both approaches. Please have a look and let me know if you find it helpful.

Regards,
Dilyan Traykov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
PropertyGrid
Asked by
Yuanhong
Top achievements
Rank 1
Answers by
Yuanhong
Top achievements
Rank 1
Dilyan Traykov
Telerik team
Share this question
or