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

accessing on griddatabound[rowIndex,colIndex].tag

Hi,

I have problem when accessing value on griddatabound[rowIndex,colIndex].tag why it sometime gives null, although i have set it to a value.

Thanks in advance
Wirawan

3 Replies

AD Administrator Syncfusion Team July 26, 2006 09:15 AM UTC

Hi Wirawan,

You cannnot set any cell or row specific properties for the GridDataBoundGrid other than the CellValue. You need to handle the PrepareViewStyleInfo (or Model.QueryCellInfo) Event to do this. Through this event handler you can set the style properties for any specific cells in the grid.

For your scenario, try handling the Model.QueryCellInfo event, there check for the e.RowIndex and e.ColIndex, if that points to the desired cell you needed, set e.style.Tag there.

Thanks,
Rajagopal


IG I Gusti Ngurah Wirawan July 26, 2006 10:26 AM UTC


Thanks for the quick answer.

But in my condition i can''t do that by setting tag value in PrepareViewStyleInfo (or Model.QueryCellInfo). Are there another way to do that?

Regards,
Wirawan


AD Administrator Syncfusion Team July 26, 2006 12:54 PM UTC

Hi Wirawan,

Its not possible to do this other than handling the events(Model.QueryCellInfo) for a DataBoundGrid. You can try having a HashTable to store the object, with row and column index as the key.

Thanks,
Rajagopal

Loader.
Live Chat Icon For mobile
Up arrow icon