Ensure first tablerow is header after save too
After the document type, media type or member type is saved, this will ensure first tablerow is a tableheader, so sorting is limited to <tbody>
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
|
||||
<cc2:Pane ID="Pane1" runat="server" Width="216" Height="80">
|
||||
<asp:DataGrid ID="dgTabs" Width="100%" runat="server" CellPadding="2" HeaderStyle-CssClass="propertyHeader"
|
||||
ItemStyle-CssClass="propertyContent" GridLines="None" OnItemCommand="dgTabs_ItemCommand" OnPreRender="dgTabs_PreRender"
|
||||
ItemStyle-CssClass="propertyContent" GridLines="None" OnItemCommand="dgTabs_ItemCommand" OnItemDataBound="dgTabs_ItemDataBound" OnPreRender="dgTabs_PreRender"
|
||||
HeaderStyle-Font-Bold="True" AutoGenerateColumns="False" CssClass="tabs-table">
|
||||
<Columns>
|
||||
<asp:BoundColumn DataField="id" Visible="False"></asp:BoundColumn>
|
||||
|
||||
@@ -43,6 +43,17 @@ namespace Umbraco.Web.UI.Umbraco.Controls
|
||||
table.Rows[table.Rows.Count - 1].TableSection = TableRowSection.TableFooter;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void dgTabs_ItemDataBound(object sender, DataGridItemEventArgs e)
|
||||
{
|
||||
Table table = dgTabs.Controls[0] as Table;
|
||||
if (table != null && table.Rows.Count > 0)
|
||||
{
|
||||
if (dgTabs.ShowHeader)
|
||||
table.Rows[0].TableSection = TableRowSection.TableHeader;
|
||||
if (dgTabs.ShowFooter)
|
||||
table.Rows[table.Rows.Count - 1].TableSection = TableRowSection.TableFooter;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user