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.
we are using a GGC which is bound to our business logic via databinding (by implementing the BindingList stuff).
Now the underlying data object (MyRow) has a property called "TestDate" of type double:
public class MyRow { public double TestDate { get; set; } }
This property results in a corresponding column in the GGC called TestDate of type double. Now I want the grid to show "Off" in a cell (of that column) if the value of a TestDate cell becomes "0". How can this be solved. Currently when I try to set the Renderer.ControlText property to "Off" I get an exception because the literal "Off" is not of type double.
It is necessary for us not to change the TestDate property to type string.
HAhaneefm Syncfusion Team April 5, 2007 06:03 PM UTC
Hi Tom,
If you just want to display the "Off" text instead of "0" in a grid cell, you can handle the DrawCellDisplayText and set e.DisplayText there to easily control what text is drawn in the cell.
thank you very much for your suggestion. One question about this is, it seems the event "DrawCellDisplayText" is not called if the cell is in edit mode. How can I achieve the same effect while the cell is in edit mode? How can I change the displaytext in edit mode?
Cheers, Tom
HAhaneefm Syncfusion Team April 11, 2007 07:25 PM UTC
Hi Tom,
If you want to display the formatted text in the editing mode then subscribe the QueryCellFormattedText event and set the e.Text to your new formatted value and then set e.Handled to TRUE to cancel it.