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.
Unfortunately, activation email could not send to your email. Please try again.

Changing underlying datarow in gridgroupingcontrol

Thread ID:





36142 Oct 20,2005 03:52 PM Oct 20,2005 06:33 PM Windows Forms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On October 20, 2005 03:52 PM

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.

Administrator [Syncfusion]
Replied On October 20, 2005 06:33 PM

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 post will be permanently deleted. Are you sure you want to continue?

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

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.