Hi William,
It would be helpful if you could give us a little more details about the grid settings/markup/code behind. The following code snippet is an example that is bound to DataTable with Dummy data and evaluating of the field is working well.
C# - Code behind:
protected
void
RadGrid1_NeedDataSource(
object
sender, GridNeedDataSourceEventArgs e)
{
RadGrid1.DataSource = GetGridSource();
}
private
DataTable GetGridSource()
{
DataTable dataTable =
new
DataTable();
DataColumn column =
new
DataColumn();
column.DataType = Type.GetType(
"System.Int32"
);
column.ColumnName =
"OrderID"
;
dataTable.Columns.Add(column);
column =
new
DataColumn();
column.DataType = Type.GetType(
"System.DateTime"
);
column.ColumnName =
"OrderDate"
;
dataTable.Columns.Add(column);
column =
new
DataColumn();
column.DataType = Type.GetType(
"System.Decimal"
);
column.ColumnName =
"Freight"
;
dataTable.Columns.Add(column);
column =
new
DataColumn();
column.DataType = Type.GetType(
"System.String"
);
column.ColumnName =
"ShipName"
;
dataTable.Columns.Add(column);
column =
new
DataColumn();
column.DataType = Type.GetType(
"System.String"
);
column.ColumnName =
"ShipCountry"
;
dataTable.Columns.Add(column);
DataColumn[] PrimaryKeyColumns =
new
DataColumn[1];
PrimaryKeyColumns[0] = dataTable.Columns[
"OrderID"
];
dataTable.PrimaryKey = PrimaryKeyColumns;
for
(
int
i = 0; i <4; i++)
{
DataRow row = dataTable.NewRow();
row[
"OrderID"
] = i + 1;
row[
"OrderDate"
] = DateTime.Now;
row[
"Freight"
] = (i + 1) + (i + 1) * 0.1 + (i + 1) * 0.01;
row[
"ShipName"
] =
"Name "
+ (i + 1);
row[
"ShipCountry"
] =
"Country "
+ (i + 1);
dataTable.Rows.Add(row);
}
return
dataTable;
}
Ultimately you can check out the attached project to see it in action. (Telerik assemblies are excluded to keep the attachment size at minimum).
Kind regards,
Attila Antal
Progress Telerik
Get
quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.
Learn More.