We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Radiobutton in datagrid column

Thread ID:

Created:

Updated:

Platform:

Replies:

82638 Jun 18,2009 04:16 AM Jul 10,2009 11:33 AM Windows Forms 3
loading
Tags: GridControl
Kumar
Asked On June 18, 2009 04:16 AM

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

Lingaraj S [Syncfusion]
Replied On June 20, 2009 05:09 AM

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.

Administrator [Syncfusion]
Replied On July 9, 2009 01:57 AM

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.

Lingaraj S [Syncfusion]
Replied On July 10, 2009 11:33 AM

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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;