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.

GridGdiPaint.Instance.DrawText problem

Thread ID:

Created:

Updated:

Platform:

Replies:

64179 Jul 16,2007 11:27 AM Jul 16,2007 11:53 AM Windows Forms 1
loading
Tags: GridControl
Simon Kakon
Asked On July 16, 2007 11:27 AM

Hi,

I have a problem with the DrawText method in GDBG.

For each column I have set a format with the style.Format property.

In the DrawCellDisplayText event, the styleInfo Format is not set properly.
When I set the format in the style before calling the DrawText method ... it doesn't work : the cell format is not correctly set.

How can I resolve my problem ?

Thanks


haneefm [Syncfusion]
Replied On July 16, 2007 11:53 AM

Hi Simon,

You can use DrawCellDisplayText event and set the e.DispalyText to some new value to want to display. Here is a code snippet

private void gridDrawCellDisplayText(object sender, GridDrawCellDisplayTextEventArgs e)
{
if( e.ColIndex == 3 && e.RowIndex >0)
e.DisplayText = string.Format("{0:P}" , int.Parse(e.Style.CellValue.ToString( ) ) );
}

Best regards,
Haneef

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.

;