data binding and mapping

paintbox

New member
Joined
Feb 11, 2005
Messages
1
hi all.
i have a question.
i am in the process of creating a front-end for a database. one of the follies of the database is that it stores certain boolean values in TEXT fields. E.g. it stores Y for boolean true and N for boolean false in a field called, say, ALLOWEDIT.
now, i happen to need to bind that field to a check box. of all the possible solutions, i decided to implement a custom control derived from the System.Windows.Forms.CheckBox.
Is this a good idea?

In general - how these "mapping" issues can be handled? How can i hook (a popular word!) between the database and the data-binding logic in my application, and instead of Y or N give the .NET framework the impression that it is dealing with boolean values, and not strings?

Maybe there is a text that i should read?

I mean - this new control may provide an additional property, say "MappedValue" that would "map" the boolean "Checked" property of the base class to Y/N values. Afterwards i can bind MappedValue to the ALLOWEDIT field of my table (i hear that i can bind any property to a data source)

thanks
 
Back
Top