Hi Yoni,
One way you can do this by handling the QueryCellInfo event of the grid to show default value in a gridcell. Here is a code snippet that shows this task.
void gridDataBoundGrid1_CurrentCellCloseDropDown(object sender, Syncfusion.Windows.Forms.PopupClosedEventArgs e)
{
if (e.PopupCloseType == Syncfusion.Windows.Forms.PopupCloseType.Done)
{
GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
hash.Add(GetCodeHash(cc.RowIndex, cc.ColIndex),"SelectedValue");
}
}
Hashtable hash = new Hashtable();
private Point GetCodeHash(int row, int col)
{
return new Point(row, col);
}
void Model_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)
{
if (e.RowIndex > 0 && e.ColIndex > 0
&& (e.Style.Text == null || e.Style.Text == string.Empty)
&& !hash.Contains(GetCodeHash(e.RowIndex, e.ColIndex)))
{
e.Style.Text = e.Style.ChoiceList[0];
}
}
Please refer to the attached sample for implementation and let me know if this helps.
GDBG_DefaultValue.zipBest regards,
Haneef