We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

GridDataControl Edit Mode

Hi,

I just started working on Syncfusion V8.2.0.18.

My usage is to use GridDataControl to be bound to Sql Datasource, Listen row edit events and update the Database,
Create a new row and update and delete particular.

I didnt find a Event to listen on GridDataControl.

I have been hearing abt the CellChange Event, but it didnt exist in this version.

How should I use the GridDataControl for my purpose.

Appreciate your response.

Thanks.


2 Replies

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


Loader.
Live Chat Icon For mobile
Up arrow icon