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.

Accessing Other Fields in a Custom Cell Renderer

Thread ID:

Created:

Updated:

Platform:

Replies:

20136 Oct 11,2004 09:45 AM Oct 12,2004 07:17 AM Windows Forms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On October 11, 2004 09:45 AM

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. Thanks, Ben.

Administrator [Syncfusion]
Replied On October 11, 2004 11:26 AM

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.

Administrator [Syncfusion]
Replied On October 12, 2004 07:17 AM

I''ve done as you suggest and passed in references to the CurrencyManager and the grid and got the behaviour I want. Thanks, Ben.

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.

;