Jan 27, 2014, 6:09 PM
[CLOSED] GridPanel: columns property empty after reconfigure method issue
Hi!
Before I update my sources with last trunk version of svn, when I called the method reconfigure, the property 'columns' of my grid was filled with columns that I set in reconfigure method. I think that I was working with 2.2 ext.net dll version.
After I update my sources to last trunk version of SVN, after that I call reconfigure method, the columns of gridPanel property still empty.
Sample project:
Before I update my sources with last trunk version of svn, when I called the method reconfigure, the property 'columns' of my grid was filled with columns that I set in reconfigure method. I think that I was working with 2.2 ext.net dll version.
After I update my sources to last trunk version of SVN, after that I call reconfigure method, the columns of gridPanel property still empty.
Sample project:
<%@ Page Language="vb" %>
<%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<style type="text/css">
.indicator-red-text {
color: red;
font-weight:bold;
}
</style>
<script type="text/javascript">
Ext.onReady(function () {
var viewPort = Ext.create("Ext.net.Viewport", {
id: "ViewportConsole",
renderTo: Ext.getBody(),
layout: {
type: 'vbox',
align: 'stretch'
},
padding: 20
});
//mainContainer
var paneCenter = viewPort.add({
xtype: 'container',
itemId: 'paneCenter',
xtype: 'container',
flex: 1,
border: false,
layout: 'border',
padding: 20
});
var grid1 = paneCenter.add({
xtype: 'grid',
itemId: 'grd1',
region: 'center',
flex: 1,
title: 'grid 1',
store: [],
columns: []
});
var btnReconfigure = paneCenter.add({
xtype: 'button',
text: 'Reconfigure',
region: 'south',
height: 100,
listeners: {
click: {
fn: function (item) {
var store = Ext.create("Ext.data.Store", {
model: Ext.define(Ext.id(), {
extend: "Ext.data.Model",
fields: [{ name: 'field1' }, { name: 'field2' }, { name: 'field3' }]
}),
storeId: Ext.id(),
autoLoad: true,
proxy: {
data: [
{ field1: 1, field2: 'row 1', field3: '1/1/2013' },
{ field1: 2, field2: 'row 2', field3: '2/1/2013' },
{ field1: 3, field2: 'row 3', field3: '3/1/2013' },
],
type: 'memory'
}
});
var columns = [{
dataIndex: "field1",
text: 'Field 1',
width: 50
}, {
dataIndex: "field2",
text: "Field 2",
width: 110,
flex: 1
}, {
dataIndex: "field3",
text: "Field 3",
width: 100
}];
grid1.reconfigure(store, columns);
}
}
}
});
});
</script>
</head>
<body>
<ext:ResourceManager ID="ResourceManager1" runat="server" Theme="Gray" />
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
Last edited by Daniil; Jan 28, 2014 at 10:06 AM.
Reason: [CLOSED]