The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
i have a databoundgrid and some of the columns (i.e. comments) contain multiple lines of text. the databoundgrid is used pretty much just for presentation. is it possible to limit the text output of a static cell type to only one line of output or is my only option going through the dataset parsing and replacing the text?
TIA
Peter
ADAdministrator Syncfusion Team April 20, 2004 03:53 AM UTC
Are you using version 2.0? If yes, check out the DrawCellDisplayText event. It is called from any cell type before text is drawn and lets you replace the default drawing of text with your DrawString call.
You could for example call
e.Graphics.DrawString(displayText, e.Style.GdipFont, new SolidBrush(e.Style.TextColor), e.TextRectangle);
and
e.Cancel = true;
The displayText can be the text and you can modify it before it gets drawn.
Another alternative that also work with 1.6 would be to handle the QueryCellFormattedText.
In that event handler you could replace the text to be displayed in the cell before it gets drawn.
Stefan