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. Image for the cookie policy date
close icon

Display Value

Hallo,

I''m using the GGC to dispaly numbers for example "145". If the column width is big enough the "145" is shown correctly, is the width to small only "45" is displayed. To avoid this, I want to show "##" for each number which will not correct displayed. Any Hints?

regards
Helmut

2 Replies

AD Administrator Syncfusion Team August 2, 2006 07:31 AM UTC

Hi Helmut,

Please try the code below in the TableControlDrawCellDisplayText event of the gridGroupingControl. This will help you.

if(e.TableControl.Table.CurrentElement is GridRecord)
{
float width = e.Inner.Graphics.MeasureString(e.Inner.DisplayText, e.Inner.Style.GdipFont).Width;
if(width > e.Inner.TextRectangle.Width)
{
e.Inner.DisplayText = "##";
}
}

Let me know if you need any further assistance.
Regards,
Rajagopal


HB Helmut Basler August 2, 2006 08:28 AM UTC

Hi Rajagopal,

it works.

thanks
Helmut

Loader.
Live Chat Icon For mobile
Up arrow icon