PDA

View Full Version : [CLOSED] GridPanel Hide Header?



Timothy
Sep 16, 2008, 7:31 PM
Hello,

With the following example, how would I hide the header from rendering? I haven't set any Header names:



<%@ Page Language="C#" %>
<%@ Register assembly="Coolite.Ext.Web" namespace="Coolite.Ext.Web" tagprefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
Customers.DataSource = new object[]
{
new object[] { "Timothy Grant Vogelsang" }
};
Customers.DataBind();
}
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Word</title>
</head>
<body>
<p><a href="Example.aspx">Reload</a></p>
<form id="form1" runat="server">
<ext:ScriptManager ID="ScriptManager1" runat="server" />
<ExtJS:Store ID="Customers"
runat="server"
AutoLoad="True">
<Reader>
<ExtJS:ArrayReader>
<Fields>
<ExtJS:RecordField Name="DisplayName" />
</Fields>
</ExtJS:ArrayReader>
</Reader>
<SortInfo Field="DisplayName" />
</ExtJS:Store>
<ExtJS:GridPanel ID="dgPermission"
runat="server"
StoreID="Customers"
AutoExpandColumn="DisplayName"
Border="False"
Header="False"
StripeRows="True"
Width="285">
<ColumnModel>
<Columns>
<ExtJS:Column ColumnID="DisplayName" DataIndex="DisplayName" />
</Columns>
</ColumnModel>
</ExtJS:GridPanel>
</form>
</body>
</html>


Cheers,
Timothy

Timothy
Sep 16, 2008, 7:40 PM
The only way I could find to do it is with a CSS hack:



<style type="text/css">
.x-grid3-header {
display: none !important;
}
</style>


Would be proper cool if there was a property for it.

Cheers,
Timothy

geoffrey.mcgill
Sep 16, 2008, 7:41 PM
Hi Timothy,


I added the GridPanel .HideHeaders property. The default value of HideHeaders is "false".

SVN has been updated and this property will be available with the v0.6 public release.


Hope this helps.

Timothy
Sep 16, 2008, 7:43 PM
Brilliant!

Cheers,
Timothy