HA
haneefm
Syncfusion Team
January 9, 2008 11:04 PM UTC
Hi Ken,
You can try setting the gridcell in the OnButtonClicked method of DropDownFormCellRenderer class. Below are the codes:
public class DropDownFormCellRenderer: GridStaticCellRenderer
{
protected override void OnButtonClicked(int rowIndex, int colIndex, int button)
{
this.Grid.CurrentCell.MoveTo(rowIndex, colIndex);
//Console.WriteLine("clicked ({0},{1})", rowIndex, colIndex);
this.ddForm.SetValuesFromString(this.Grid.Model[rowIndex, colIndex].Text);
Rectangle rect = this.Grid.RangeInfoToRectangle(GridRangeInfo.Cell(rowIndex, colIndex));
this.ddForm.Location = this.Grid.PointToScreen(new Point(rect.Left, rect.Bottom));
if(this.ddForm.ShowDialog() == DialogResult.OK)
{
this.Grid.Model[rowIndex, colIndex].Text = "Your DescriptionText Here";
}
//base.OnButtonClicked (rowIndex, colIndex, button);
}
}
Best regards,
Haneef