PDA

View Full Version : [CLOSED] Column gridPanel locked



tactime10
Sep 21, 2012, 8:18 AM
Hi,

I have into my page a gridPanel with first column locked and one button for add items to the gridPanel.
When the page just loaded I see this

4812

instead, if I add new item to the gridPanel I see this

4813

I attached my code below



<%@ Page Language="C#" %>

<%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>

<script runat="server">

protected void AddElement(object sender, DirectEventArgs e) {
this.storeAction.DataSource = this.DataElement1;
this.storeAction.DataBind();
}

private object[] DataElement1 {
get
{
return new object[]
{
new object[] { "element1", "description1", "workcenter1" },
new object[] { "element2", "description2", "workcenter2" },
new object[] { "element3", "description3", "workcenter3" },
new object[] { "element4", "description4", "workcenter4" },
new object[] { "element5", "description5", "workcenter5" },
new object[] { "element6", "description6", "workcenter6" },
new object[] { "element7", "description7", "workcenter7" },
new object[] { "element8", "description8", "workcenter8" },
new object[] { "element9", "description9", "workcenter9" },
new object[] { "element10", "description10", "workcenter10" },
new object[] { "element11", "description11", "workcenter11" },
new object[] { "element12", "description12", "workcenter12" },
new object[] { "element13", "description13", "workcenter13" },
new object[] { "element14", "description14", "workcenter14" },
new object[] { "element15", "description15", "workcenter15" },
new object[] { "element16", "description16", "workcenter16" },
new object[] { "element17", "description17", "workcenter17" },
new object[] { "element18", "description18", "workcenter18" },
new object[] { "element19", "description19", "workcenter19" },
new object[] { "element20", "description20", "workcenter20" },
new object[] { "element21", "description21", "workcenter21" }
};
}
}

private object[] DataElement {
get
{
return new object[]
{
new object[] { "element1", "description1", "workcenter1" },
new object[] { "element2", "description2", "workcenter2" },
new object[] { "element3", "description3", "workcenter3" },
new object[] { "element4", "description4", "workcenter4" },
new object[] { "element5", "description5", "workcenter5" },
new object[] { "element6", "description6", "workcenter6" },
new object[] { "element7", "description7", "workcenter7" },
new object[] { "element8", "description8", "workcenter8" },
new object[] { "element9", "description9", "workcenter9" },
new object[] { "element10", "description10", "workcenter10" },
new object[] { "element11", "description11", "workcenter11" },
new object[] { "element12", "description12", "workcenter12" },
new object[] { "element13", "description13", "workcenter13" },
new object[] { "element14", "description14", "workcenter14" },
new object[] { "element15", "description15", "workcenter15" },
new object[] { "element16", "description16", "workcenter16" },
new object[] { "element17", "description17", "workcenter17" },
new object[] { "element18", "description18", "workcenter18" },
new object[] { "element19", "description19", "workcenter19" },
new object[] { "element20", "description20", "workcenter20" }
};
}
}

public void Page_Load() {
if (!X.IsAjaxRequest) {
this.storeAction.DataSource = this.DataElement;
this.storeAction.DataBind();
}
}

</script>

<!DOCTYPE html>

<html>
<head runat="server">
<title>Example</title>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<br/>
<h1>Example</h1>
<br/>
<ext:Button ID="btnAdd" Text="Add Element" runat="server" Hidden="false" >
<DirectEvents>
<Click OnEvent="AddElement">
<EventMask ShowMask="true" MinDelay="100"/>
</Click>
</DirectEvents>
</ext:Button>
<br/>
<ext:Panel runat="server" Id="panel" Border="false"
Layout="FitLayout" Flex="1" BodyPadding="10" Width="300" Height="300">
<Items>
<ext:GridPanel
ID="gridPanel"
runat="server"
Border="false"
Title="Action" Width="300" Height="300">
<Store>
<ext:Store ID="storeAction" runat="server">
<Reader>
<ext:ArrayReader />
</Reader>
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="element"/>
<ext:ModelField Name="description"/>
<ext:ModelField Name="workcenter"/>
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel>
<Columns>
<ext:Column runat="server" Text="Element" DataIndex="element" Locked="true"/>
<ext:Column runat="server" Text="Description" DataIndex="description" />
<ext:Column runat="server" Text="Workcenter" DataIndex="workcenter" />
</Columns>
</ColumnModel>
</ext:GridPanel>
</Items>
</ext:Panel>
</form>
</body>
</html>



Can you help me for this issue?

Thank you so much.

Daniil
Sep 21, 2012, 11:46 AM
Hi,

I am unable to reproduce. Probably, it was fixed in ExtJS 4.1.2 which we incorporated to Ext.NET 2.1 branch a few days ago.

Please update and retest. Is the issue still reproducible on your side?

tactime10
Sep 24, 2012, 9:17 AM
Hi,

I updated EXT.net at the last version and now it works.

Thank you.