is it possible to display an image in a datagrid cell?
i'm currently working with compact framework 3.5.
any tips on that?
compact-frameworkdatagrid
is it possible to display an image in a datagrid cell?
i'm currently working with compact framework 3.5.
any tips on that?
Best Answer
Like the other posters have commented, you're required to roll your own. Luckily, this isn't too difficult.
In my application, I needed a way to draw a 16x16 icon in a particular column. I created a new class that inherits from
DataGridColumnStyle
, which makes it easy to apply to aDataGrid
via aDataGridTableStyle
object.You can see that I defined the public property
ColumnIcon
so I can specify the icon I need to display outside of this class.Now, to actually use it on a DataGrid, you'd have a snippet like:
That's a pretty simple example for applying the
DataGridTableStyle
-- I actually do a lot of further customization on the rest of myDataGrid
columns. But it should get you started on what you want to do.