I''ve implemented some custom cell renderers. They need to be able to format the value of a cell according to the value of another cell in the same row of the grid. I''m using a GridDataBoundGrid.
Is there a way of accessing the values of other columns in the same row?
This is in the OnDraw method, all I have is a GridStyleInfo object and a rowIndex. I tried looking at GridStyleInfo.DataSource but it is not set to anything.
GridStyleInfo.DataSource is the datasourcde for things like a ComboBox in the cell or a GridListControl in the cell. It is not the DataSource for the grid. If you want to access the datasource for the grid, then you will have to get a reference to the DridDataBoundGrid. You can try casting the renderer.Grid member to a GridDataBoundGrid and then accessing its DataSource member.
AdministratorOctober 12, 2004 11:17 AM UTC
I''ve done as you suggest and passed in references to the CurrencyManager and the grid and got the behaviour I want.