PDA

View Full Version : [CLOSED] GroupCommand and GroupHeaderTpl



pgodwin
Nov 20, 2014, 5:05 AM
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).
http://forums.ext.net/attachment.php?attachmentid=16391&stc=1

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>

Daniil
Nov 20, 2014, 5:44 AM
Hi @pgodwin,

It looks it has been fixed already in v2.5.3.
https://github.com/extnet/Ext.NET/issues/550

pgodwin
Nov 20, 2014, 6:07 AM
Hi Danill
Thanks for your reply.


It looks it has been fixed already in v2.5.3.
https://github.com/extnet/Ext.NET/issues/550

I have tested against 2.5.3 (which seems to be the current deployed version on NuGet). I can confirm that ImageCommandColumn with a GroupImageCommand works, however a CommandColumn with a GridCommand does not (as per the example).

Daniil
Nov 20, 2014, 7:10 AM
Indeed. I've fixed a CommandColumn as well in SVN trunk, the revision #6174.

Thank you for pointing out the problem.