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

enter same value to all selection in GridControl ??

can GridControl do this, example: if user selected the row/column by the header, and if he type in a value, the value will be entered to the whole row can GridControl do this (and how) ?? thx in advance

1 Reply

AD Administrator Syncfusion Team December 2, 2004 01:56 AM

There is no property setting to do this, but I think you can handle a couple of events to get it done.
bool fillFlag = false;
GridRangeInfo fillRange = null;
private void gridControl1_CurrentCellActivating(object sender, GridCurrentCellActivatingEventArgs e)
{
	if(e.ColIndex == 0)
	{
		e.ColIndex = 1;
		fillFlag = true;
		fillRange = GridRangeInfo.Cells(e.RowIndex, 1, e.RowIndex, this.gridControl1.ColCount);
	}
	if(e.RowIndex == 0)
	{
		e.RowIndex = 1;
		fillFlag = true;
		fillRange = GridRangeInfo.Cells(1, e.ColIndex, this.gridControl1.RowCount, e.ColIndex);
	}
}
private void gridControl1_CurrentCellAcceptedChanges(object sender, CancelEventArgs e)
{
	if(this.fillFlag)
	{
		fillFlag = false;
		GridCurrentCell cc = this.gridControl1.CurrentCell;
		this.gridControl1.ChangeCells(this.fillRange, cc.Renderer.ControlText);
	}
}

Loader.
Live Chat Icon For mobile
Up arrow icon