May 22, 2014, 5:18 PM
[FIXED] [#493] [3.2.0] GridPanel with grouping data contains double quote.
Hi,
I have a gridpanel with Grouping feature, if grouping field data contains double quotes (") then collapse and expand functions are not working.
ex: data is like "TestGroup".
Thank you.
I have a gridpanel with Grouping feature, if grouping field data contains double quotes (") then collapse and expand functions are not working.
ex: data is like "TestGroup".
Thank you.
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Globalization" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
CultureInfo ci = new CultureInfo("en-US");
Store store = this.GridPanel1.GetStore();
store.DataSource = new List<Project>
{
new Project(100, "\"Ext Forms: Field Anchoring\"", 100, "Integrate 2.0 Forms with 2.0 Layouts", 6, 150, 0, DateTime.Parse("06/24/2007",ci)),
new Project(100, "\"Ext Forms: Field Anchoring\"", 101, "Implement AnchorLayout", 4, 150, 0, DateTime.Parse("06/25/2007",ci)),
new Project(100, "\"Ext Forms: Field Anchoring\"", 102, "Add support for multiple types of anchors", 4, 150, 0, DateTime.Parse("06/27/2007",ci)),
new Project(100, "\"Ext Forms: Field Anchoring\"", 103, "Testing and debugging", 8, 0, 0, DateTime.Parse("06/29/2007",ci)),
new Project(100, "\"Ext Forms: Field Anchoring\"", 104, "Add required rendering \"hooks\" to GridView", 6, 100, 0, DateTime.Parse("07/01/2007",ci)),
new Project(100, "\"Ext Forms: Field Anchoring\"", 105, "Extend GridView and override rendering functions", 6, 100, 0, DateTime.Parse("07/03/2007",ci)),
new Project(100, "\"Ext Forms: Field Anchoring\"", 106, "Extend Store with grouping functionality", 4, 100, 0, DateTime.Parse("07/04/2007",ci)),
new Project(100, "\"Ext Forms: Field Anchoring\"", 107, "Default CSS Styling", 2, 100, 0, DateTime.Parse("07/05/2007",ci)),
new Project(100, "\"Ext Forms: Field Anchoring\"", 108, "Testing and debugging", 6, 100, 0, DateTime.Parse("07/06/2007",ci)),
new Project(100, "\"Ext Forms: Field Anchoring\"", 109, "Integrate 2.0 Forms with 2.0 Layouts", 6, 150, 0, DateTime.Parse("06/24/2007",ci)),
new Project(100, "\"Ext Forms: Field Anchoring\"", 110, "Implement AnchorLayout", 4, 150, 0, DateTime.Parse("06/25/2007",ci)),
new Project(100, "\"Ext Forms: Field Anchoring\"", 111, "Add support for multiple types of anchors", 4, 150, 0, DateTime.Parse("06/27/2007",ci)),
new Project(100, "\"Ext Forms: Field Anchoring\"", 112, "Testing and debugging", 8, 0, 0, DateTime.Parse("06/29/2007",ci)),
new Project(100, "\"Ext Forms: Field Anchoring\"", 113, "Add required rendering \"hooks\" to GridView", 6, 100, 0, DateTime.Parse("07/01/2007",ci)),
new Project(100, "\"Ext Forms: Field Anchoring\"", 114, "Extend GridView and override rendering functions", 6, 100, 0, DateTime.Parse("07/03/2007",ci)),
new Project(100, "\"Ext Forms: Field Anchoring\"", 115, "Extend Store with grouping functionality", 4, 100, 0, DateTime.Parse("07/04/2007",ci)),
new Project(100, "\"Ext Forms: Field Anchoring\"", 116, "Default CSS Styling", 2, 100, 0, DateTime.Parse("07/05/2007",ci)),
new Project(100, "\"Ext Forms: Field Anchoring\"", 117, "Testing and debugging", 6, 100, 0, DateTime.Parse("07/06/2007",ci)),
new Project(102, "Ext Grid: Summary Rows", 118, "Ext Grid plugin integration", 4, 125, 0, DateTime.Parse("07/01/2007",ci)),
new Project(102, "Ext Grid: Summary Rows", 119, "Summary creation during rendering phase", 4, 125, 0, DateTime.Parse("07/02/2007",ci)),
new Project(102, "Ext Grid: Summary Rows", 120, "Dynamic summary updates in editor grids", 6, 125, 0, DateTime.Parse("07/05/2007",ci)),
new Project(102, "Ext Grid: Summary Rows", 121, "Remote summary integration", 4, 125, 0, DateTime.Parse("07/05/2007",ci)),
new Project(102, "Ext Grid: Summary Rows", 122, "Summary renderers and calculators", 4, 125, 0, DateTime.Parse("07/06/2007",ci)),
new Project(102, "Ext Grid: Summary Rows", 123, "Integrate summaries with GroupingView", 10, 125, 0, DateTime.Parse("07/11/2007",ci)),
new Project(102, "Ext Grid: Summary Rows", 124, "Testing and debugging", 8, 125, 0, DateTime.Parse("07/15/2007",ci)),
new Project(102, "Ext Grid: Summary Rows", 125, "Ext Grid plugin integration", 4, 125, 0, DateTime.Parse("07/01/2007",ci)),
new Project(102, "Ext Grid: Summary Rows", 126, "Summary creation during rendering phase", 4, 125, 0, DateTime.Parse("07/02/2007",ci)),
new Project(102, "Ext Grid: Summary Rows", 127, "Dynamic summary updates in editor grids", 6, 125, 0, DateTime.Parse("07/05/2007",ci)),
new Project(102, "Ext Grid: Summary Rows", 128, "Remote summary integration", 4, 125, 0, DateTime.Parse("07/05/2007",ci)),
new Project(102, "Ext Grid: Summary Rows", 129, "Summary renderers and calculators", 4, 125, 0, DateTime.Parse("07/06/2007",ci)),
new Project(102, "Ext Grid: Summary Rows", 130, "Integrate summaries with GroupingView", 10, 125, 0, DateTime.Parse("07/11/2007",ci)),
new Project(102, "Ext Grid: Summary Rows", 131, "Testing and debugging", 8, 125, 0, DateTime.Parse("07/15/2007",ci)),
new Project(102, "Ext Grid: Summary Rows", 132, "Ext Grid plugin integration", 4, 125, 0, DateTime.Parse("07/01/2007",ci)),
new Project(102, "Ext Grid: Summary Rows", 133, "Summary creation during rendering phase", 4, 125, 0, DateTime.Parse("07/02/2007",ci)),
new Project(102, "Ext Grid: Summary Rows", 134, "Dynamic summary updates in editor grids", 6, 125, 0, DateTime.Parse("07/05/2007",ci)),
new Project(102, "Ext Grid: Summary Rows", 135, "Remote summary integration", 4, 125, 0, DateTime.Parse("07/05/2007",ci)),
new Project(102, "Ext Grid: Summary Rows", 136, "Summary renderers and calculators", 4, 125, 0, DateTime.Parse("07/06/2007",ci)),
new Project(102, "Ext Grid: Summary Rows", 137, "Integrate summaries with GroupingView", 10, 125, 0, DateTime.Parse("07/11/2007",ci)),
new Project(102, "Ext Grid: Summary Rows", 138, "Testing and debugging", 8, 125, 0, DateTime.Parse("07/15/2007",ci)),
new Project(102, "Ext Grid: Summary Rows", 139, "Ext Grid plugin integration", 4, 125, 0, DateTime.Parse("07/01/2007",ci)),
new Project(102, "Ext Grid: Summary Rows", 140, "Summary creation during rendering phase", 4, 125, 0, DateTime.Parse("07/02/2007",ci)),
new Project(102, "Ext Grid: Summary Rows", 141, "Dynamic summary updates in editor grids", 6, 125, 0, DateTime.Parse("07/05/2007",ci)),
new Project(102, "Ext Grid: Summary Rows", 142, "Remote summary integration", 4, 125, 0, DateTime.Parse("07/05/2007",ci)),
new Project(102, "Ext Grid: Summary Rows", 143, "Summary renderers and calculators", 4, 125, 0, DateTime.Parse("07/06/2007",ci)),
new Project(102, "Ext Grid: Summary Rows", 144, "Integrate summaries with GroupingView", 10, 125, 0, DateTime.Parse("07/11/2007",ci)),
new Project(102, "Ext Grid: Summary Rows", 145, "Testing and debugging", 8, 125, 0, DateTime.Parse("07/15/2007",ci))
};
store.DataBind();
}
public class Project
{
public Project(int projectId, string name, int taskId, string description, int estimate, double rate, double cost, DateTime due)
{
this.ProjectID = projectId;
this.Name = name;
this.TaskID = taskId;
this.Description = description;
this.Estimate = estimate;
this.Rate = rate;
this.Due = due;
}
public int ProjectID { get; set; }
public string Name { get; set; }
public int TaskID { get; set; }
public string Description { get; set; }
public int Estimate { get; set; }
public double Rate { get; set; }
public double Cost { get; set; }
public DateTime Due { get; set; }
}
</script>
<!DOCTYPE html>
<html>
<head runat="server">
<title>Grouping Paging - Ext.NET Examples</title>
<link href="/resources/css/examples.css" rel="stylesheet" />
<script>
Ext.view.Table.override({
indexInStore: function (node) {
node = (node && node.isCollapsedPlaceholder) ? this.getNode(node) : this.getNode(node, false);
if (!node && node !== 0) {
return -1;
}
var recordIndex = node.getAttribute('data-recordIndex');
if (recordIndex) {
return parseInt(recordIndex, 10);
}
return this.dataSource.indexOf(this.getRecord(node));
}
});
</script>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server"/>
<ext:Viewport runat="server" ID="ViewPort1" Layout="HBoxLayout">
<LayoutConfig>
<ext:HBoxLayoutConfig Align="Stretch" Pack="Center" />
</LayoutConfig>
<Content>
<ext:GridPanel
ID="GridPanel1"
runat="server"
Width="800"
AutoScroll="true"
ButtonAlign="Center">
<Store>
<ext:Store ID="Store1" runat="server" GroupField="Name">
<Model>
<ext:Model runat="server" IDProperty="TaskID">
<Fields>
<ext:ModelField Name="ProjectID" />
<ext:ModelField Name="Name" />
<ext:ModelField Name="TaskID" />
<ext:ModelField Name="Description" />
<ext:ModelField Name="Estimate" Type="Int" />
<ext:ModelField Name="Rate" Type="Float" />
<ext:ModelField Name="Due" Type="Date" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel runat="server">
<Columns>
<ext:Column
runat="server"
TdCls="task"
Text="Task"
Sortable="true"
DataIndex="Description"
Hideable="false"
Flex="1"
/>
</Columns>
</ColumnModel>
<Features>
<ext:Grouping
ID="Group1"
runat="server"
GroupHeaderTplString="{name}"
HideGroupedHeader="true"
EnableGroupingMenu="false"
/>
</Features>
<Buttons>
<ext:Button runat="server" Text="Button1" />
<ext:Button ID="Button1" runat="server" Text="Button2" />
</Buttons>
</ext:GridPanel>
</Content>
</ext:Viewport>
</form>
</body>
</html>
Last edited by Daniil; Jun 26, 2015 at 12:47 PM.
Reason: [FIXED] [#493] [3.2.0]