DataGrid - Array List - Ordering Columns

  • Thread starter Thread starter Doug
  • Start date Start date
D

Doug

Hi,
I am using a datagrid in a windows app and binding it to an ArrayList.
The columns in the array list were appearing out of order so I fixed
that by using the DataGridColumnStyle object in the DataGrid and
setting the MappingName of each column appropriately.

My question though is on properties in the object that is in my
ArrayList that are booleans. Before I created the DataGridColumnStyle
object, the boolean properties showed up as checkboxes. Now, they show
up as a string type with the value written out as "true" or "false".
I'd much rather have the checkboxes. I tried to set the Format value
to System.Boolean or Bool in the DataGridColumnStyle object and neither
worked. Does anyone know what I should be doing?
 
Doug,

Do you have any reason to use the ArrayList instead of a datatable that fits
perfectly on the datagrid.

The only reason can be in my idea that you want to let it perform slower and
use more memory.

Just my thought,

Cor
 
We're a little restricted by our own standards in regards to using data
table's and or data set's after we get the data back from SQL. We're
required to put the results into business entities. This is a small
set of data though and won't be a huge problem with the issues you
described.

Do you have any suggestions though on the issue I'm trying to resolve?
 
You need to make the boolean column a DataGridBoolColumn and add it to
your DataGridTableStyle and this should format it correctly.
 
That did the trick. I didn't even see that column tpe there in the
designer at first. Thanks!
 
Back
Top