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.

cell events

Thread ID:

Created:

Updated:

Platform:

Replies:

28658 May 6,2005 04:48 AM May 6,2005 05:06 AM Windows Forms 1
loading
Tags: GridControl
Catinat Velmourougan
Asked On May 6, 2005 04:48 AM

{this.txtPreview.Text = this.Collection.Expression; this.txtPreview.Text = this.BuildingExpression; if(e.Range.Right == 3) { this.grdFilter.RowCount = this.grdFilter.RowCount + 1; } Kindly refer the code above , I have written the above code inside the grd_cellschanged event. The code block throws the stack overflow exception. The exception is because the rowcount change calls the cellschanged event again."e" is of GridCellsChangedEventArgs type. Requirement: The grid has 3 cols. The no of rows is variable. I want to add an new row to the grid after the contents of 3rd col have been cahnged in every row.

Administrator [Syncfusion]
Replied On May 6, 2005 05:06 AM

Do you want to add the new row as your user leaves the cell in column 3 after changing its value? If so, try doing it in the CurrentCellvalidating event.
private void gridControl1_CurrentCellValidating(object sender, CancelEventArgs e)
{
	GridCurrentCell cc = this.gridControl1.CurrentCell;
	if(cc.ColIndex == 3)
	{
		cc.Lock();
		this.gridControl1.RowCount += 1;
		cc.Unlock();
	}
}

CONFIRMATION

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.

;