Jun 19, 2012, 4:37 PM
[OPEN] [#96] ColumnHeaderGroup Hideable columns
[SENCHA bug ticket is EXTJSIV-6597]
[4.1.1 rc2] Columns Group with non hidable column
I used the Group Header Column example to detail this issue.
Not sure if you would consider this a bug or a feature or something else.
I have a ColumnHeaderGroup named "Stock Price" that has 3 columns under it "Price", "Change" and "Change %". I decided that the "Price" column is not Hideable. So here is what I expected:
1) I can hide the "Change" or "Change %" column and the "Price" column is always showing.
2) I can hide the ColumnHeaderGroup "Stock Price" and everything is hidden.
3) When everything is hidden, I can unhide the "Change" column and the "Price" column will also show up. Broken
My assumption was that if any columns under the "Stock Price" column is shown the non-hideable columns ("Price") should also be shown.
I have not brought my work computer up to the latest revision, I will do that tomorrow.
Your thoughts ...
[4.1.1 rc2] Columns Group with non hidable column
I used the Group Header Column example to detail this issue.
Not sure if you would consider this a bug or a feature or something else.
I have a ColumnHeaderGroup named "Stock Price" that has 3 columns under it "Price", "Change" and "Change %". I decided that the "Price" column is not Hideable. So here is what I expected:
1) I can hide the "Change" or "Change %" column and the "Price" column is always showing.
2) I can hide the ColumnHeaderGroup "Stock Price" and everything is hidden.
3) When everything is hidden, I can unhide the "Change" column and the "Price" column will also show up. Broken
My assumption was that if any columns under the "Stock Price" column is shown the non-hideable columns ("Price") should also be shown.
I have not brought my work computer up to the latest revision, I will do that tomorrow.
Your thoughts ...
<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (!X.IsAjaxRequest)
{
this.Store1.DataSource = this.Data;
this.Store1.DataBind();
}
}
private object[] Data
{
get
{
return new object[]
{
new object[] { "3m Co", 71.72, 0.02, 0.03, "9/1 12:00am" },
new object[] { "Alcoa Inc", 29.01, 0.42, 1.47, "9/1 12:00am" },
new object[] { "Altria Group Inc", 83.81, 0.28, 0.34, "9/1 12:00am" },
new object[] { "American Express Company", 52.55, 0.01, 0.02, "9/1 12:00am" },
new object[] { "American International Group, Inc.", 64.13, 0.31, 0.49, "9/1 12:00am" },
new object[] { "AT&T Inc.", 31.61, -0.48, -1.54, "9/1 12:00am" },
new object[] { "Boeing Co.", 75.43, 0.53, 0.71, "9/1 12:00am" },
new object[] { "Caterpillar Inc.", 67.27, 0.92, 1.39, "9/1 12:00am" }
};
}
}
</script>
<!DOCTYPE html>
<html>
<head runat="server">
<title>Grouped Header Example - Ext.NET Examples</title>
<link href="/resources/css/examples.css" rel="stylesheet" type="text/css" />
<style type="text/css">
/* style rows on mouseover */
.x-grid-row-over .x-grid-cell-inner {
font-weight: bold;
}
</style>
<script type="text/javascript">
var template = '<span style="color:{0};">{1}</span>';
var change = function (value) {
return Ext.String.format(template, (value > 0) ? "green" : "red", value);
};
var pctChange = function (value) {
return Ext.String.format(template, (value > 0) ? "green" : "red", value + "%");
};
</script>
</head>
<body>
<ext:ResourceManager runat="server" />
<h1>Grouped Header Example</h1>
<p>This example shows how to create a grid with column headers which are nested within category headers.</p>
<p>Category headers do not reference Model fields via a <code>dataIndex</code>, rather they contain
child header definitions (which may themselves either contain a <code>dataIndex</code> or more levels of headers).</p>
<ext:GridPanel
ID="GridPanel1"
runat="server"
Title="Grouped Header Grid"
Width="600"
ColumnLines="true"
Height="350">
<Store>
<ext:Store ID="Store1" runat="server">
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="company" />
<ext:ModelField Name="price" Type="Float" />
<ext:ModelField Name="change" Type="Float" />
<ext:ModelField Name="pctChange" Type="Float" />
<ext:ModelField Name="lastChange" Type="Date" DateFormat="M/d hh:mmtt" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel runat="server">
<Columns>
<ext:Column runat="server" Text="Company" DataIndex="company" Flex="1" Sortable="false" />
<ext:Column runat="server" Text="Stock Price">
<Columns>
<ext:Column runat="server" Text="Price" DataIndex="price" Width="75" Sortable="true" Hideable="false">
<Renderer Format="UsMoney" />
</ext:Column>
<ext:Column runat="server" Text="Change" DataIndex="change" Width="75" Sortable="true">
<Renderer Fn="change" />
</ext:Column>
<ext:Column runat="server" Text="Change %" DataIndex="pctChange" Width="75" Sortable="true">
<Renderer Fn="pctChange" />
</ext:Column>
</Columns>
</ext:Column>
<ext:DateColumn runat="server" Text="Last Updated" DataIndex="lastChange" Width="85" Sortable="true" Format="dd/MM/yyyy" />
</Columns>
</ColumnModel>
</ext:GridPanel>
</body>
</html
Last edited by cwolcott; Mar 07, 2013 at 1:41 PM.