datagridview when using datasource function in C# just show true or false by the checkbox each row.
I want to display the string value in the datagridview, not Boolean using checkbox .
True = "Spin On" False = "Element" How can I change the checkbox to a string value?
Please Help
Create a View Model class which inherits your data source class. To this viewModel class add a new string property SpinOrElement We could also simply add that property to your class if it is OK. Public string SpinOrElement { get=> checkBoxValueProperty ? "Spin On" : "Element"; } Now bind your data gird to that list of ViewModel or to your class
Обсуждают сегодня