Telerik.Web.UI v2010.3.1109.35
We have a radgrid (Theme/Skin="Windows7") and we've added a custom header row like this:
Our custom inserted header row takes on the windows 7 grid theme, which is cool.
But my boss wants to see if we can style this custom row with your existing "sorted by" column css style - which is like a split gradient.
If you look at the attached image (the customer data is fake data) -
The grid data is sorted by the "Contact Name" column, and so that column header has one of your css classes on it (circled in red)
The custom header I added is the one with the text "(9) Recent Contacts" (red arrow) and that is the row we want your sorted css class on.
Thanks,
Ray
We have a radgrid (Theme/Skin="Windows7") and we've added a custom header row like this:
// ***** Add Grid Header Summary Row *****
GridItem[] header =
this
.MyWorkRadGrid.MasterTableView.GetItems(GridItemType.Header);
//get the current THead element
GridTHead head = ((GridTHead)header[0].Parent.Controls[1].Parent);
//create a new GridHeaderItem which will be the new row
GridHeaderItem newHeaderItem =
new
GridHeaderItem(
this
.MyWorkRadGrid.MasterTableView, 0, 0);
newHeaderItem.Cells.Add(
new
GridTableHeaderCell() { Text =
" "
});
newHeaderItem.Cells.Add(
new
GridTableHeaderCell() { Text =
" "
});
newHeaderItem.Cells.Add(
new
GridTableHeaderCell() { Text = count, ColumnSpan = 5, Width =
new
Unit(100, UnitType.Percentage), HorizontalAlign = HorizontalAlign.Left, VerticalAlign = VerticalAlign.Middle });
for
(
int
i = 0; i < head.Controls.Count; i++)
{
// loop through the header controls collection and find the 'row' that has the same type of GridHeaderItem
// Then insert the new row just above it - remember the 0 based index will push the original header row down
if
(head.Controls[i].GetType() == newHeaderItem.GetType())
{
head.Controls.AddAt(i, newHeaderItem);
}
}
Our custom inserted header row takes on the windows 7 grid theme, which is cool.
But my boss wants to see if we can style this custom row with your existing "sorted by" column css style - which is like a split gradient.
If you look at the attached image (the customer data is fake data) -
The grid data is sorted by the "Contact Name" column, and so that column header has one of your css classes on it (circled in red)
The custom header I added is the one with the text "(9) Recent Contacts" (red arrow) and that is the row we want your sorted css class on.
Thanks,
Ray