The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I'm stuck dealing with a database that uses Char-1 fields for flags. Literally 'Y' or 'N'.
What's the best approach to binding a checkbox to such a feild? Of course I need to be able to show the value, as well as change it.
I guess I'll have to make a custom control, subclassing the checkbox.
However, I dont' know what events to try to tap into.
Is there some kind of event for "reading binding value" that I can override and give it "Y" when the box is checked? Also an event for "Setting binding value" that I can override and check when I see a 'Y'
Any help greatly appreciated.
CheckBox myCk = new CheckBox();
DataBinding db = new Binding( "Checked", myDataSet, "tablename.fieldname" );
myCk.DataBindings.Add( db);
// inject delegates that translate bet. field and checkbox
db.Format += new ConvertEventHandler( fromDbToControl );
db.Parse += new ConvertEventHandler( fromControlToDb );