c# - Databinding for checkbox with stringvalues -
I've forced datarows for my controls so far all is well. The problem is now, that there are only wires in the column to bind me in my door, but certainly the "check" property of the checkbox only takes the boolean argument.
Is there a way to use databasing here? Maybe some kind of converter?
Thanks
Use the types of databases to change.
example
binding binding = new binding ("check", dt, "string_field"); Binding.format = new convertAvent handler (binding_format); Binding. Purse + = new convert Avent handler (binding purse); This.checkbox1.DataBindings.Add (binding); Zero binding_format (object sender, convert avent erg e) {if value (to.tstring =) "yes") e. Value = true; Else E. Value = false; } Zero-binding (object sender, convert avent erg e) {if ((bool) e.value) e.value = "yep"; Other E. Value = "no"; }
Comments
Post a Comment