Hi John,
Thank you for your interest in Syncfusion products.
We would suggest you to use the GridGroupingControl1.Table.CurrentRecord.SetValue method, in order to set the value to grid row (#ID value returned from output parameter).
Please find the updated sample from the below link.
http://files.syncfusion.com/support/GGC.Web/7.2.0.20/58127/sample1.zipThe Sample illustrates,
1. EmployeeID is ReadOnly Column.
2. During ondatasourcecontrolrowadding event, EmployeeId value is passed as 1 [Some Default value for to avoid Null exception ]. Please refer the following code snippet.
protected void GridGroupingControl1_DataSourceControlRowAdding(object sender, Syncfusion.Web.UI.WebControls.Grid.Grouping.GridDataSourceControlRowAddingEventArgs e)
{
e.NewValues["EmployeeID"] = 1;
e.Handled = true;
}
3. In SqlDataSource1_Inserted event, EmployeeID value accessed through output parameter and the current record is updated with this value. Please refer the following code snippet.
protected void SqlDataSource1_Inserted(object sender, SqlDataSourceStatusEventArgs e)
{
string empID = e.Command.Parameters["@EmployeeID"].Value.ToString();
Record rec = this.GridGroupingControl1.Table.CurrentRecord;
rec.SetValue("EmployeeID", empID);
}
Please let me know if you have any concerns.
Regards,
M. Balaji