Need help with Microsoft datagrid control

  • Thread starter Thread starter Don
  • Start date Start date
D

Don

Is there a way to change how boolean values are represented in the microsoft
datagrid control (e.g. "Yes" and "No", or "1" and "0", instead of "True" and
"False")?

- Don
 
The "easiest" way(s) to get this done is either TemplateColumn, or
implementing ItemCreated... Of course, depending on requirement and
restrictions, you could go as far as having that data column be an Int
datatype -- which would then be formattable (then it'd be fairly
straightforward to get it formatted in desired fashion).

BoundColumn is somewhat limited in so that it will only take the
DataStringFormat. However, bool does not implement IFormattable so in
essence, if you specify this attribute, it'd be ignored..

Hope this helps.
 
Back
Top