HG
Hema Gunda
October 4, 2010 02:05 PM UTC
We would like to work with GridDataControl in Silverlight.
(The Usage similar to ASP.NET's DataGrid Control) Should be able to Update, Insert and delete rows. We bought this product for this purpose. And, I havent seen enough functions in GridDataControl to implement this CRUD Operations.
I appreciate your quick response.
Thanks.
BK
Balaji K
Syncfusion Team
October 11, 2010 05:20 AM UTC
Hi Hema,
Thanks for your patience.
The CRUD operations are supported by GridDataControl in Silverlight. The following events help you achieve the requirement.
#Create
"RowsInserted" event is triggered when a record is added.
[Code Snippet]
this.dataGrid.Model.RowsInserted
#Update
"OnEndEdit" event is triggered when a record is updated.
[Code Snippet]
this.dataGrid.Model.CurrencyManager.OnEndEdit
#Delete
"RowsRemoved" event is triggered when a record is removed.
[Code Snippet]
this.dataGrid.Model.RowsRemoved
[Code Snippet]
this.dataGrid.ModelLoaded += ((s, e) =>
{
this.dataGrid.Model.CurrencyManager.OnEndEdit += new EventHandler(CurrencyManager_OnEndEdit);
this.dataGrid.Model.RowsInserted += new Windows.Controls.Grid.GridRangeInsertedEventHandler(Model_RowsInserted);
this.dataGrid.Model.RowsRemoved += new Windows.Controls.Grid.GridRangeRemovedEventHandler(Model_RowsRemoved);
});
Please let us know if this helps.
Regards,
Balaji