Posted 27 February 2020, 7:24 am EST
Hi Virender,
Although it is directly not possible to show the radio button in FlexGrid Column but you can change the CheckBox glyph similar to radio button as given in code snippet below:
c1FlexGrid1.Glyphs[C1.Win.C1FlexGrid.GlyphEnum.Checked] = Image.FromFile(@"..\..\CheckRadio.png");
c1FlexGrid1.Glyphs[C1.Win.C1FlexGrid.GlyphEnum.Unchecked] = Image.FromFile(@"..\..\UncheckRadio.png");
And handle the CellChecked event of FlexGrid to achieve the same functionality like Radio button as given in code snippet below:
private void C1FlexGrid1_CellChecked(object sender, C1.Win.C1FlexGrid.RowColEventArgs e)
{
c1FlexGrid1.SetCellCheck(e.Row, e.Col, C1.Win.C1FlexGrid.CheckEnum.Checked);
if (e.Col == 1)
{
for (int i = 1; i < c1FlexGrid1.Rows.Count; i++)
{
if(i != e.Row)
{
c1FlexGrid1.SetCellCheck(i, 1, C1.Win.C1FlexGrid.CheckEnum.Unchecked);
}
}
}
}
Please look at the attached sample implementing the same.
Regards,
Prabhat Sharma.
RadioButtonFlexGridDemo.zip