AD
Administrator
Syncfusion Team
February 9, 2004 08:26 PM UTC
If you put a special DateTime value (say DateTime.MinValue) in these cells, then you can use these two events to handle this tasks.
this.gridDataBoundGrid1.Model.QueryCellFormattedText += new GridCellTextEventHandler(gridModel_QueryCellFormattedText);
this.gridDataBoundGrid1.Model.QueryCellInfo += new GridQueryCellInfoEventHandler(gridModel_QueryCellInfo);
private void gridModel_QueryCellFormattedText(object sender, GridCellTextEventArgs e)
{
if(e.Value.Equals(DateTime.MinValue))
{
e.Text = "N/A";
e.Handled = true;
}
}
private void gridModel_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)
{
if(e.Style.CellType == "MonthCalendar" && e.Style.CellValue.Equals(DateTime.MinValue))
{
e.Style.ReadOnly = true;
e.Style.Clickable = false;
}
}