Hello Mohammad,
The Count Aggregate will give you that information. You can see more about in the following resources:
Here's also a very simple example I created for you:
and some dummy data to get it running:
protected
DataTable GetDummyData()
{
DataTable tbl =
new
DataTable();
tbl.Columns.Add(
new
DataColumn(
"Id"
,
typeof
(
decimal
)));
tbl.Columns.Add(
new
DataColumn(
"textField"
,
typeof
(
string
)));
tbl.Columns.Add(
new
DataColumn(
"valueField"
,
typeof
(
int
)));
tbl.Columns.Add(
new
DataColumn(
"fourthField"
,
typeof
(
string
)));
tbl.Rows.Add(
new
object
[] { 1,
"one"
, 1,
"red"
});
tbl.Rows.Add(
new
object
[] { 1,
"two"
, 2,
"green"
});
tbl.Rows.Add(
new
object
[] { 5,
"three"
, 3,
"blue"
});
tbl.Rows.Add(
new
object
[] { 6,
"four"
, 1,
"pink"
});
return
tbl;
}
protected
void
rg1_NeedDataSource(
object
sender, GridNeedDataSourceEventArgs e)
{
(sender
as
RadGrid).DataSource = GetDummyData();
}
Regards,
Marin Bratanov
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.