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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DataBoundGrid, Changing cell properties

Thread ID:





3690 Apr 2,2003 05:21 AM UTC Apr 2,2003 08:21 AM UTC WinForms 1
Tags: GridControl
Alberto Gil Diez
Asked On April 2, 2003 05:21 AM UTC

I'm trying to change individual cell's properties in DataBoundGrid by using: Grid(Row,Column).Tag=TagValue But it seems not work. How I've to do, to change individual cell's properties?. Is not this possible? Thank you.

Administrator [Syncfusion]
Replied On April 2, 2003 08:21 AM UTC

In a GridDataBoundGrid, you cannot use indexers to set style properties (other than the Text or CellValue) for individual cells. The reason is that in a GridDataBoundGrid, there are no individual cell styles stored. The only datastore for the individual cells in the bound datasource, and it only has the CellValue available. Thus, you can set CellValue using indexers, but nothing else. For a GridControl, this is not a problem (unless you are using the GridControl virtually), but it is with a GridDataboundGrid. If you want to provide Tag objects on individual cells in a GridDataBoundGrid, then you would have to create some data store (HashTable, ArrayList, ???) to hold these objects basaed on row/col. Then you could handle GridDataBoundGrid.Model.QueryCellInfo, and in your handler set e.Style.Tag based on the values of e.RowIndex and e.ColIndex.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon