SR
Sri Rajan
Syncfusion Team
June 18, 2008 02:05 PM UTC
Hi Mahesh,
Thank you for your interest in Syncfusion products.
Please refer the below code to achieve this behaviour.
void gridDataBoundGrid1_CurrentCellCloseDropDown(object sender, Syncfusion.Windows.Forms.PopupClosedEventArgs e)
{
GridCurrentCell cc=this.gridDataBoundGrid1.CurrentCell;
this.gridDataBoundGrid1.CurrentCell.MoveTo(GridRangeInfo.Cell(cc.RowIndex, cc.ColIndex - 1));
}
void Model_QueryCellInfo(object sender, Syncfusion.Windows.Forms.Grid.GridQueryCellInfoEventArgs e)
{
GridStyleInfo stlinfo = new GridStyleInfo();
stlinfo.CellType = "ColorEdit";
if ((e.RowIndex == 1 || e.RowIndex == 2) && e.ColIndex == 2)
{
e.Style.CellType = stlinfo.CellType;
}
if ((e.RowIndex == 1 || e.RowIndex == 2) && e.ColIndex == 1)
{
GridStyleInfo style = this.gridDataBoundGrid1.Model[e.RowIndex, e.ColIndex + 1];
e.Style.BackColor = ColorConvert.ColorFromString(style.CellValue.ToString());
}
}
Please let me know if this helps.
Best Regards,
Srirajan