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.
ADAdministrator Syncfusion Team July 19, 2005 07:37 PM UTC
Hi Cradle,
you can do this using the QueryCellStyleInfo event.
Example:
private void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
GridTableCellStyleInfoIdentity id = e.TableCellIdentity;
Record r = id.DisplayElement is Record ? (Record) id.DisplayElement : id.DisplayElement.ParentRecord;
GridColumnDescriptor column = id.Column;
if (column != null && column.MappingName == "yourUnboundFieldName")
{
if ((int) r.GetValue("someColumn") > 1)
e.Style.Format = "yourFormat";
}
}
Stefan
>I want to set Unbound Field style like this:
>
>if ((string)row["ValType"]=="1")
>{
>
>style.format="###0.##%";
>}
>else
>{
>style.format="###0.##";
>}