Hi,
I have a master / detail grid and do some customization in PreRender.
First - hide the expand collapse column on expanded rows.
Give the TD holding the details table a CssClass
Suggestion: it would be much easier for customization if you could give this TD a css-class.
Anyhow - since I hide the first TD (expand collapse) the second TD must span one column more.
I tried this with increment - and (since it did not work) with a constant value.
But the setting is ignored - when I look the rendered HTML the colspan is like it was (no matter what I set in code behind).
Here my code:
11 was just a try - the "default" is 9 - 10 should be what I set - but I can do what I want - it stays 9.
Regards
Manfred
I have a master / detail grid and do some customization in PreRender.
First - hide the expand collapse column on expanded rows.
Give the TD holding the details table a CssClass
Suggestion: it would be much easier for customization if you could give this TD a css-class.
Anyhow - since I hide the first TD (expand collapse) the second TD must span one column more.
I tried this with increment - and (since it did not work) with a constant value.
But the setting is ignored - when I look the rendered HTML the colspan is like it was (no matter what I set in code behind).
Here my code:
protected void rgJugendliche_PreRender(object sender, EventArgs e) { |
if (!IsPostBack) { |
foreach (GridNestedViewItem nVI in rgJugendliche.MasterTableView.GetItems(GridItemType.NestedView)) { |
if (nVI.NestedTableViews.Length > 0) { |
TableCell tC = nVI.Controls[0] as TableCell; |
tC.BackColor = Color.FromArgb(1,0xcd,0xff,0xb1); |
tC.Visible = false; |
tC = nVI.Controls[1] as TableCell; |
tC.ColumnSpan = 11; |
tC.CssClass += " BorderTopBottom"; |
} |
} |
} |
} |
Regards
Manfred