Dec 25, 2012, 1:44 PM
[CLOSED] GridPanel with grouping and group command
Hello.
I faced with following issue. I have grid with grouping feature and with group command. If grouped column contains data with quote, then error is occured. I found out that problem is a wrong id, generated by view. see example below
<tr id="gridview-1010-bd-3m " co" class="x-grid-group-body ">
I created an example to reproduce this issue base on ArrayGrid example:
Best regards.
I faced with following issue. I have grid with grouping feature and with group command. If grouped column contains data with quote, then error is occured. I found out that problem is a wrong id, generated by view. see example below
<tr id="gridview-1010-bd-3m " co" class="x-grid-group-body ">
I created an example to reproduce this issue base on ArrayGrid example:
<%@ 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 }
};
}
}
</script>
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
<title>Simple Array Grid - Ext.NET Examples</title>
<link href="/resources/css/examples.css" rel="stylesheet" />
<style>
.x-grid-row-over .x-grid-cell-inner {
font-weight : bold;
}
</style>
<script>
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 ID="ResourceManager1" runat="server" />
<h1>Simple Array Grid</h1>
<ext:GridPanel
ID="GridPanel1"
runat="server"
Title="Array Grid"
Width="600"
Height="350">
<Store>
<ext:Store ID="Store1" runat="server">
<Model>
<ext:Model ID="Model1" runat="server">
<Fields>
<ext:ModelField Name="company" />
<ext:ModelField Name="price" Type="Float" />
</Fields>
</ext:Model>
</Model>
<Groupers>
<ext:DataSorter Property="company" />
</Groupers>
</ext:Store>
</Store>
<Features>
<ext:Grouping runat="server" />
</Features>
<ColumnModel>
<Columns>
<ext:Column ID="Column1" runat="server" Text="Company" DataIndex="company" Flex="1" />
<ext:Column ID="Column2" runat="server" Text="Price" DataIndex="price">
<Renderer Format="UsMoney" />
</ext:Column>
<ext:CommandColumn ID="CommandColumn2" runat="server" Hidden="true" Width="10" >
<GroupCommands>
<ext:GridCommand CommandName="SelectGroup" Text="Select Group " >
</ext:GridCommand>
</GroupCommands>
</ext:CommandColumn>
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />
</SelectionModel>
</ext:GridPanel>
</body>
</html>
Could you suggest a way to fix this?Best regards.
Last edited by Daniil; Dec 29, 2012 at 1:11 PM.
Reason: [CLOSED]