We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to bind a data field to ImageIndex property in a GridStaticCell?

I found a sample of binding to pictures, but it's very complex -- any simple way to do this? I have an integer field and i want to bind the value in this field to ImageIndex ...

Any one can help? Thanks.

2 Replies

HA Haishi June 14, 2007 05:32 PM UTC

Anybody?


>I found a sample of binding to pictures, but it's very complex -- any simple way to do this? I have an integer field and i want to bind the value in this field to ImageIndex ...

Any one can help? Thanks.


SA Saravanan A Syncfusion Team June 14, 2007 06:39 PM UTC

Hi Haishi,

Try handling the QueryCellStyleInfo event to set the ImageIndex to the cells of a column based on the cellvalue and also handle the TableControlDrawCellDisplayText event to cancel the drawing of text in those cells. In addition to these events you need to handle the QueryColWidth event to set the width of that column to the width of the image/icon.

Please refer to this sample.
http://websamples.syncfusion.com/samples/Grid.Windows/34844/main.htm

Regards,
Saravanan

Loader.
Live Chat Icon For mobile
Up arrow icon