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

DataBoundGrid, Changing cell properties

Thread ID:

Created:

Updated:

Platform:

Replies:

3690 Apr 2,2003 12:21 AM Apr 2,2003 03:21 AM Windows Forms 1
loading
Tags: GridControl
Alberto Gil Diez
Asked On April 2, 2003 12:21 AM

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 03:21 AM

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.

CONFIRMATION

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.

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.

;