Folks, I am binding a DataGrid to an arbitrary ItemsSource, so I have to
dynamically create the columns and set the Binding property on each one.
This is all working fine, but I want to manually format the cell contents of
certain columns.

 

In my case I might create a column which is bound to a byte array, and I
don't want to see "Sytem.Byte[]" in the cell, I want to format it nicely. I
have a value converter class ready for format the bytes nicely, but I can't
figure out how to associate it with the column when I create it. I have:

 

DataGridBoundColumn bindcol = new DataGridTextColumn();

bindcol.Binding = new Binding("SomeBuffer");

bindcol.Header = "Some Buffer";

bindcol cell content converter = ???????

mygrid.Columns.Add(bindcol);

 

Somehow I have to associate bindcol with my converter class to format the
cell Content, but I can't figure out how. I'm still searching, but if anyone
knows the trick, please let me know.

 

Greg

_______________________________________________
ozwpf mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozwpf

Reply via email to