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.

How do I get the data bound Item for a row or cell?

Thread ID:





106776 Jan 24,2013 05:46 PM Jan 28,2013 07:21 AM Windows Forms 1
Tags: GridControl
Jay Oullette
Asked On January 24, 2013 05:46 PM

I am looking for the Syncfusion equivalent of .NET's gridControl.Rows[e.RowIndex].DataBoundItem;

I have a System.Collections.Generic.List which I bound to a Syncfusion GridDataBoundGrid control.

I need to do some custom formatting in the DrawCellDisplayText(object sender, GridDrawCellDisplayTextEventArgs e) method.

How do I get the object from my list for the current row when handling the DrawCellDisplayText event?

Athiram S [Syncfusion]
Replied On January 28, 2013 07:21 AM

Hi Jay,

Thanks for your interest in Syncfusion Products.

You can make use of the following code for accessing the cell text in "DrawCellDisplayText" event.

Here is the code:

void gridDataBoundGrid1_DrawCellDisplayText(object sender, Syncfusion.Windows.Forms.Grid.GridDrawCellDisplayTextEventArgs e)
            if (e.RowIndex == 1 && e.ColIndex == 1)

Here you could get the content for cell[1,1]. Similarly, you can get the text for desired cells.

Please let me know if you have any concerns.

Athiram S


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.