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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

adding new row to the grid

Thread ID:

Created:

Updated:

Platform:

Replies:

50892 Oct 23,2006 10:32 AM UTC Oct 26,2006 08:46 PM UTC ASP.NET Web Forms (Classic) 3
loading
Tags: GridGroupingControl
Alfred D'Souza
Asked On October 23, 2006 10:32 AM UTC

Hi
Iam using GridGroupingControl. I want to add a new row to the grid. I used GridGroupingControl1.Table.AddNew(); and i get editable row in the grid. Once i enter the cell value i want to save those values to the data set associated with the grid. I tried using CurrentRecordContextChange event. But i could not do that. Can anybody suggest me how can i do that?

Administrator [Syncfusion]
Replied On October 23, 2006 11:34 PM UTC

Alfred,

In CurrentRecordContextChange event, look for e.Action to be CurrentRecordAction.EndEditComplete.

Then get the current record and the new values in the record as follows:

// using Syncfusion.Grouping;

Record r = this.grid.Table.CurrentRecord;

object newValue = r.GetValue("fieldName");

// Use this to update the datasource directly.

Regards,
Praveen

Alfred D'Souza
Replied On October 25, 2006 03:52 AM UTC


Hi Praveen
Thanks For your reply
I followed following steps

GridGroupingControl1.Table.AddNew();
Then i get a row where i can enter the column values.
Then i have in the CurrentRecordContextChange
if (e.Action == CurrentRecordAction.EndEditComplete)
{
// processing code
}
My question is when EndEditComplete will occur. Is it on pressing enter key or while changing rows? When row is in editing mode CurrentRecordContextChange event is not fired at all for any actions.

Alfred


>Alfred,

In CurrentRecordContextChange event, look for e.Action to be CurrentRecordAction.EndEditComplete.

Then get the current record and the new values in the record as follows:

// using Syncfusion.Grouping;

Record r = this.grid.Table.CurrentRecord;

object newValue = r.GetValue("fieldName");

// Use this to update the datasource directly.

Regards,
Praveen

Administrator [Syncfusion]
Replied On October 26, 2006 08:46 PM UTC

Hi Alfred,

This event will occur while changing rows after you edit.

Please refer to this Reply   |   Reply with quote
CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;