<Syncfusion:GridDataVisibleColumn MappingName="EmployeeSalary">
<Syncfusion:GridDataVisibleColumn.ColumnStyle>
<Syncfusion:GridDataColumnStyle
CellType="CurrencyEdit"
NegativeForeground="Red"
HorizontalAlignment="Right" >
<Syncfusion:GridDataColumnStyle.NumberFormat>
<glob:NumberFormatInfo CurrencySymbol="€" CurrencyPositivePattern="1" CurrencyNegativePattern="5"/>
</Syncfusion:GridDataColumnStyle.NumberFormat>
</Syncfusion:GridDataColumnStyle>
</Syncfusion:GridDataVisibleColumn.ColumnStyle>
</Syncfusion:GridDataVisibleColumn> |
this.grid.ModelLoaded += grid_ModelLoaded;
void grid_ModelLoaded(object sender, EventArgs e)
{
grid.Model.QueryCellInfo += Model_QueryCellInfo;
}
void Model_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)
{
if (grid.VisibleColumns[e.Cell.ColumnIndex].MappingName == "DOB")
{
e.Style.CellType = "DateTimeEdit";
e.Style.DateTimeEdit.DateTimePattern = DateTimePattern.LongDate;
}
} |