Sep 10, 2012, 2:32 PM
[CLOSED] function does not recover the correct values of the states GridPanel
hi,
I use this method to save whether the column is visible, its width and order.
The problem is that the values are the old values.
I explained
column 1: hidden: false, width: 100, order 1,
Effective change this column:
column 1: hiddien: true, width: 100, order 2
with the method, I state my original column that is not changed.
Code.aspx
Method getOrder
I may be an option that will not or forget.
I hope this post is clear enough.
I use this method to save whether the column is visible, its width and order.
The problem is that the values are the old values.
I explained
column 1: hidden: false, width: 100, order 1,
Effective change this column:
column 1: hiddien: true, width: 100, order 2
with the method, I state my original column that is not changed.
Code.aspx
<ext:GridPanel ID="GridPanelSearch" runat="server" IDMode="Static" StoreID="StoreSearch"
TrackMouseOver="false" ForceValidation="true" StripeRows="true" TitleCollapse="true"
Collapsible="false" AnimCollapse="true" Icon="Table" ButtonAlign="Right" AutoScroll="true"
Border="false" Height="250">
<Bin>
<ext:MenuItem ID="MenuItem10" runat="server" Text="Save States">
<DirectEvents>
<Click OnEvent="GetOrder">
<ExtraParams>
<ext:Parameter
Name="order"
Value="getOrder()"
Mode="Raw"
Encode="true" />
</ExtraParams>
</Click>
</DirectEvents>
</ext:MenuItem>
</Bin>
and we using columnModel
and this to add a column in GridPanel <DirectEvents>
<Command OnEvent="DisplayInformation">
<ExtraParams>
<ext:Parameter Name="CotationID" Value="#{GridPanelSearch}.store.getAt(rowIndex).data.CotationID"
Mode="Raw" />
Method getOrder
var getOrder = function () {
var grid = GridPanelSearch,
cm = grid.getColumnModel(),
order = [];
var colIndex = 0;
var hide;
Ext.each(cm.config, function (c) {
if (cm.config[colIndex].hidden == undefined) {
hide = false;
}
else {
hide = true;
}
order.push({
header: c.header,
hidden: hide,
width: c.width
});
colIndex++;
});
return order;
};
How to get the current status of the GridPanel? ( i want keep on database not on cookie)I may be an option that will not or forget.
I hope this post is clear enough.
Last edited by Daniil; Sep 11, 2012 at 1:38 PM.
Reason: [CLOSED]