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

Changing underlying datarow in gridgroupingcontrol

How would I get the current cells underlying datarow so that it can be modified and then have the grouping control update to display those changes. I am trying to do something like: CurrentCell cc = gridGroupingControl1.CurrentCell; DataRow dr = dt[cc.RowIndex]; dr["value"] = "new value"; gridGroupingControl1.Refresh(); I know the above code is bogus just trying to give you an idea what I am trying to do.

1 Reply

AD Administrator Syncfusion Team October 20, 2005 10:33 PM UTC

You can try code like:
GridCurrentCell cc = this.gridGroupingControl1.TableControl.CurrentCell;
GridTableCellStyleInfo style = this.gridGroupingControl1.TableControl.GetTableViewStyleInfo(cc.RowIndex, cc.ColIndex);
GridRecordRow recRow = style.TableCellIdentity.DisplayElement as GridRecordRow;
if(recRow != null)
{
	DataRowView drv = recRow.ParentRecord.GetData() as DataRowView;
	if(drv != null)
	{
		drv["Col1"] = "aaaa";
		this.gridGroupingControl1.CurrencyManager.EndCurrentEdit();
	}
}

Loader.
Live Chat Icon For mobile
Up arrow icon