Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2805
radio button in xamdatagrid
posted

I know this sounds crazy, but we need to display radio button (for a bool field) in some children grids (all child rows only allow to select one), some children grids just use checkbox. The back-end code will control the selection.

Currently the editor doesn't include radio button, what's the best way to show radio button?

Thanks for help.

  • 30945
    Verified Answer
    Offline posted

    Hello,

     

    Thank you for your post. I have been researching this and I have created a sample application for you, that shows how you can implement your requirements. I have created a style for the CellValuePresenter and added a RadioButton in the ContentTemplate. After doing so, I have bound the IsChecked property of the RadioButton to the view model property and also bound the GroupName to the HashCode of the parent data item of the child record, in order to allow different groups in each of the child bands.

     

    Please let me know if you need any further assistance on the matter.

     

    Sincerely,

    Krasimir, MCPD

    Developer Support Supervisor - XAML

    Infragistics

    www.infragistics.com/support

    RadioButtonInChildGroup.zip