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.
Up arrow icon