Nov 20, 2014, 6:05 AM
[CLOSED] GroupCommand and GroupHeaderTpl
Hi There
I have an issue when I combine a CommandColumn with GroupCommands and a GroupHeaderTpl. Instead of my GroupHeaderTpl, rendered is object Object (see screenshot below).

Note that the problem goes away if I use the GroupHeaderTplString property of the Grouping Feature, or if remove the GroupCommands. Unfortunately, I have quite a complex Template I'd like to use, so would prefer to use a proper XTemplate if possible.
Example below:
I have an issue when I combine a CommandColumn with GroupCommands and a GroupHeaderTpl. Instead of my GroupHeaderTpl, rendered is object Object (see screenshot below).
Note that the problem goes away if I use the GroupHeaderTplString property of the Grouping Feature, or if remove the GroupCommands. Unfortunately, I have quite a complex Template I'd like to use, so would prefer to use a proper XTemplate if possible.
Example below:
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
}
</script>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager runat="server" />
<ext:GridPanel
runat="server"
Width="600"
Height="600"
Title="Grouping Test">
<Store>
<ext:Store runat="server" GroupField="forumtitle">
<Proxy>
<ext:JsonPProxy Url="http://www.sencha.com/forum/topics-browse-remote.php" SimpleSortMode="true">
<Reader>
<ext:JsonReader Root="topics" TotalProperty="totalCount" IDProperty="threadid" />
</Reader>
</ext:JsonPProxy>
</Proxy>
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="title" />
<ext:ModelField Name="forumtitle" />
<ext:ModelField Name="forumid" />
<ext:ModelField Name="lastposter" />
<ext:ModelField Name="replycount" Type="Int" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel>
<Columns>
<ext:Column
runat="server"
Text="Title"
DataIndex="title"
Width="220"
/>
<ext:Column
runat="server"
Text="Last Poster"
DataIndex="lastposter"
Width="130"
/>
<ext:CommandColumn runat="server" Hidden="true">
<GroupCommands>
<ext:GridCommand Icon="TableRow" CommandName="SelectGroup">
<ToolTip Title="Select" Text="Select all rows of the group" />
</ext:GridCommand>
</GroupCommands>
</ext:CommandColumn>
</Columns>
</ColumnModel>
<Features>
<ext:Grouping runat="server">
<GroupHeaderTpl runat="server">
<Html>
{name}
</Html>
</GroupHeaderTpl>
</ext:Grouping>
</Features>
</ext:GridPanel>
</form>
</body>
</html>
Last edited by Daniil; Nov 20, 2014 at 8:11 AM.
Reason: [CLOSED]