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 : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Setting the value of a DisplayElementKind.AddNewRecord cell programmatically

Thread ID:

Created:

Updated:

Platform:

Replies:

68664 Sep 26,2007 07:49 PM UTC Oct 2,2007 05:56 PM UTC WinForms 1
loading
Tags: Grouping
José Manuel
Asked On September 26, 2007 07:49 PM UTC

Hello,

I manage to locate a cell with a code like this:

Me.GridGroupingControl1.TableModel(rowIndex, colIndex).TableCellIdentity.DisplayElement

and it happens to be a cell in the AddNewRecord line of an editable GridGroupingControl.

I want to set cell's value programmatically, so that when new record is saved to database, that is the saved value.

I've tried to use GetData() for that DisplayElement, but it is nothing for AddNewRecord elements, so I need another method to access cell's contents.

Thank you very much.

haneefm [Syncfusion]
Replied On October 2, 2007 05:56 PM UTC

Hi José,

You can use the below code snippet to set the value of the AddNewRecord in a Grid.

//button''s click event
GridTable table = this.gridGroupingControl1.GetTable("TableName");
table.BeginEdit();

Record r = table.AddNewRecord;
if (r != null)
{
r.BeginEdit();
r.SetValue("ColumName", "BX");
r.EndEdit();
}
table.EndEdit();

Best regards,
Haneef

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

;