Radiobutton in datagrid column

Hi,
I am using Syncfusion controls. I want add radiobutton column to the data grid and bind the datasource to the grid. could please help me, which control i have to use for this & how to proceed?

Thanks in advance...

Regards,
Kumar

3 Replies

LS Lingaraj S Syncfusion Team June 20, 2009 09:09 AM UTC

Hi Kumar,

Thank you for your interest in Syncfusion product.

If you want to add the Radio Button in DataBoundGrid control, then please try using InternalColumn.StyleInfo property in Binder to achieve this behavior. The InternalColmuns collection is maintained the GridDataBoundGrid columns. The Cell Type property is used to set the type of the cell. And the Choice List property is used to set the list for RadioButton cell.

Please refer the code below:

StringCollection sc = new StringCollection();
sc.Add("One");
sc.Add("Two");
this.gridDataBoundGrid1.Binder.InternalColumns["Col 2"].StyleInfo.CellType="RadioButton";
this.gridDataBoundGrid1.Binder.InternalColumns["Col 2"].StyleInfo.ChoiceList = sc;
this.gridDataBoundGrid1.Binder.InternalColumns["Col 2"].StyleInfo.TextAlign = GridTextAlign.Right;


Refer the sample in below link:
http://websamples.syncfusion.com/samples/Grid.Windows/Forums/RadioButtonCell/main.htm

Please let me know if you have any queries.

Regards,
Lingaraj S.


AD Administrator Syncfusion Team July 9, 2009 05:57 AM UTC

I want to ask you can the radio button in windows form inside a grid of syncfusion can be group .so that when i select a radio button other radio button be unselected.


LS Lingaraj S Syncfusion Team July 10, 2009 03:33 PM UTC

Hi Kumar,

Thank you fro the update.

I am afraid I was unblae to reprduce the issue in GridDatBoundControl radio buttons, when the Radion button has been clicked in GridDataBoundGrid. We are tried with previous updated sample, when the radio button clicked in cell one or two only selected in GridDataBoundGrid cell. Also I have attched the video file in the below link. which shows which I tried in the GridDataBoundGrid.
http://files.syncfusion.com/support/samples/Grid.Windows/Forums/RadioButton.zip

Please let me know if I misunderstood your query.

Regards,
Lingaraj S.

Loader.
Up arrow icon