How to use RadiobuttonList to implement a single selection of DataGrid columns

zhaozj2021-02-16  55

In DataGrid, we may need to implement this function-column, itself provides the select command to implement this function, and we often get used to Radiobutton to implement, let's talk about how to use RadioButtonList achieve.

1. We set the first column of DataGrid to template columns and join RadiobuttonList

2, in DataGrid.DATABIND (); add the following code

// Set the first column of the first single-single ROWSPAN to the total number of quadramists of DataGrid

DataGrid.Items [0] .cells [0] .ROWSPAN = DataGrid.Items.count; for (int i = 1; i

// Put the RadiobuttonList of the first column of the first cell according to the total number of DataGrid's total number of columns

For (int i = 0; i

OK ........

转载请注明原文地址:https://www.9cbs.com/read-23980.html

New Post(0)