Jan 5, 2010 at 4:50 PM
Edited Jan 5, 2010 at 4:54 PM
at first, please excuse my english, it's not my native langue :-)
i'm facing some problems using the virtual datagrid control. i have a large table with integers in each cell which determine some kind of "field type". when i try do display them in a datagrid control, it works fine as long as i'm just binding
the table to the datasource. but when i try to create the columns myself, like this:
for (int i = 0; i < SIZE; i++)
mapDataGrid.Columns.Add(i.ToString(), i.ToString(), new SourceGrid.Cells.Virtual.CellVirtual());
it only shows empty cells and no column headers. using "typeof(string)" instead of "new SourceGrid.Cells.Virtual.CellVirtual()" gives each cell fillded with
"Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt" which (following to google) is equivalent to "Object reference not set to an instance to an object".
the idea behind creating the columns myself is, to later set them to an image type and to replace the type-integer with an associated image. (i tried to fill the underlaying DataTable directly with the images too, which works with a datagridview but shows
nothing with sourcegrid)
so how do i have to create the columns? the examples unfortunately didn't help. and is there a more obvious way to replace the integer with the image then changing the GetCell method (or so) which returns the values for each cell?