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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Accessing Other Fields in a Custom Cell Renderer

Thread ID:





20136 Oct 11,2004 01:45 PM UTC Oct 12,2004 11:17 AM UTC WinForms 2
Tags: GridControl
Administrator [Syncfusion]
Asked On October 11, 2004 01:45 PM UTC

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 03:26 PM UTC

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


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