Gridpanel with datasource shows empty rows

  1. #1

    Gridpanel with datasource shows empty rows

    Hi,
    I'm having a problem with the GridPanel.
    I can see that it loads the records in the gridpanel, but the values are not visible, they seem to be empty rows.

    this is strange to me, because the resourcemanager loads the data and is visible in the page source. you can see this in below ResourceMgr.Init from column: 10369 (I thought, I copy the complete init...., search for MainContent_Model1)

        <script type="text/javascript">
        //<![CDATA[
            Ext.net.ResourceMgr.init({id:"ctl00$MainContent$ResourceManager1",aspForm:"ctl01",appName:"WebSite2",icons:["Lorry","House","ArrowJoin","ApplicationGo","Accept","Package"]});Ext.onReady(function(){Ext.create("Ext.form.Panel",{id:"MainContent_Order",autoWidth:true,renderTo:"App.MainContent_Order_Container",defaultAnchor:"100%",autoHeight:true,items:[{margin:"0 0 10",xtype:"container",items:[{xtype:"fieldset",defaultAnchor:"100%",flex:1,defaults:{"hideEmptyLabel":false},items:[{id:"MainContent_tfConsignor_Name",xtype:"textfield",fieldLabel:"Consignor"},{id:"MainContent_tfConsignor_Address",xtype:"textfield",fieldLabel:"Address"},{margin:"0 0 10",xtype:"container",items:[{id:"MainContent_tfConsignor_City",width:250,xtype:"textfield",fieldLabel:"City, zip, country"},{id:"MainContent_tfConsignor_Zipcode",width:100,xtype:"textfield"},{id:"MainContent_cbConsignor_CountryCode",width:65,xtype:"combobox",allowBlank:false,emptyText:"Select",maxLength:2,maxLengthText:"Maximum length for this field is 2, revise your input",queryMode:"local",triggerAction:"all",store:[["BA","BA"],["ES","ES"],["LT","LT"],["PL","PL"],["SK","SK"],["US","US"],["MA","MA"],["MC","MC"],["SP","SP"],["DZ","DZ"],["NG","NG"],["CM","CM"],["AM","AM"],["AT","AT"],["BG","BG"],["CH","CH"],["CZ","CZ"],["HU","HU"],["MT","MT"],["GR","GR"],["LB","LB"],["NO","NO"],["RS","RS"],["SI","SI"],["SY","SY"],["IL","IL"],["AL","AL"],["CY","CY"],["IE","IE"],["KZ","KZ"],["TR","TR"],["LU","LU"],["MK","MK"],["PT","PT"],["EE","EE"],["ZA","ZA"],["SG","SG"],["KS","KS"],["MN","MN"],["MU","MU"],["MX","MX"],["MY","MY"],["BH","BH"],["CA","CA"],["CN","CN"],["DE","DE"],["DK","DK"],["FI","FI"],["FR","FR"],["ME","ME"],["JP","JP"],["KP","KP"],["KR","KR"],["SL","SL"],["AU","AU"],["GH","GH"],["GP","GP"],["AD","AD"],["AE","AE"],["IT","IT"],["NL","NL"],["OM","OM"],["EG","EG"],["KE","KE"],["BE","BE"],["GB","GB"],["HR","HR"],["LI","LI"],["SE","SE"],["QA","QA"],["SC","SC"],["UZ","UZ"],["HK","HK"],["TM","TM"],["TN","TN"],["IN","IN"],["IR","IR"],["IS","IS"],["AZ","AZ"],["TW","TW"],["BR","BR"],["BY","BY"],["LV","LV"],["RO","RO"],["RU","RU"],["SA","SA"],["MD","MD"],["UA","UA"],["JO","JO"],["IQ","IQ"],["GE","GE"]]}],layout:"hbox"},{margin:"0 0 10",xtype:"container",items:[{id:"MainContent_dfOrderDate",width:250,xtype:"datefield",fieldLabel:"Date",name:"dfOrderDate",allowBlank:false,format:"d-m-Y",submitFormat:"n/j/Y"},{id:"MainContent_tfOrderTimeFrom",width:71,xtype:"timefield",value:"08:00",format:"H:i",increment:30,maxValue:"18:00",minValue:"08:00",submitFormat:"g:i a"},{id:"MainContent_la_orderTimeUntill",xtype:"netlabel",autoHeight:true,text:"* - *"},{id:"MainContent_tfOrderTimeUntill",width:75,xtype:"timefield",value:"16:00",format:"H:i",increment:30,maxValue:"18:00",minValue:"08:00",submitFormat:"g:i a"}],layout:"hbox"},{id:"MainContent_tfOrderReference",xtype:"textfield",fieldLabel:"Reference"},{id:"MainContent_tfOrderRemarks",xtype:"textfield",fieldLabel:"Order remarks"}],title:"New order"}],layout:"hbox"}],bodyPadding:10,collapsible:true,title:"New order",iconCls:"#Lorry",url:"/WebSite2/OrderEntry.aspx"});Ext.create("Ext.form.Panel",{id:"MainContent_Addresses",autoWidth:true,renderTo:"App.MainContent_Addresses_Container",defaultAnchor:"100%",autoHeight:true,items:[{id:"MainContent_Container1",margin:"0 0 10",xtype:"container",items:[{id:"MainContent_FieldSet1",xtype:"fieldset",defaultAnchor:"100%",flex:1,defaults:{"hideEmptyLabel":false},items:[{id:"MainContent_ImageButton1",xtype:"netimagebutton",anchor:"10%",menu:{id:"MainContent_Menu1",xtype:"menu",items:[{id:"MainContent_MenuItem2",iconCls:"#ArrowJoin",text:"Search"},{id:"MainContent_MenuItem3",iconCls:"#ApplicationGo",text:"Show on map"},{id:"MainContent_MenuItem1",iconCls:"#Accept",text:"Save as default"}]},imageUrl:"/WebSite2/icons/bulb2.png",overImageUrl:"/WebSite2/icons/bulb2_over.png",align:"right"},{id:"MainContent_tfLoading_Name",xtype:"textfield",fieldLabel:"Name"},{id:"MainContent_tfLoading_Address",xtype:"textfield",fieldLabel:"Address"},{id:"MainContent_Container2",margin:"0 0 10",xtype:"container",items:[{id:"MainContent_tfLoading_City",width:250,xtype:"textfield",fieldLabel:"City, zip, country"},{id:"MainContent_tfLoading_Zipcode",width:100,xtype:"textfield"},{id:"MainContent_cbLoading_CountryCode",width:65,xtype:"combobox",allowBlank:false,emptyText:"Select",maxLength:2,maxLengthText:"Maximum length for this field is 2, revise your input",queryMode:"local",triggerAction:"all",store:[["BA","BA"],["ES","ES"],["LT","LT"],["PL","PL"],["SK","SK"],["US","US"],["MA","MA"],["MC","MC"],["SP","SP"],["DZ","DZ"],["NG","NG"],["CM","CM"],["AM","AM"],["AT","AT"],["BG","BG"],["CH","CH"],["CZ","CZ"],["HU","HU"],["MT","MT"],["GR","GR"],["LB","LB"],["NO","NO"],["RS","RS"],["SI","SI"],["SY","SY"],["IL","IL"],["AL","AL"],["CY","CY"],["IE","IE"],["KZ","KZ"],["TR","TR"],["LU","LU"],["MK","MK"],["PT","PT"],["EE","EE"],["ZA","ZA"],["SG","SG"],["KS","KS"],["MN","MN"],["MU","MU"],["MX","MX"],["MY","MY"],["BH","BH"],["CA","CA"],["CN","CN"],["DE","DE"],["DK","DK"],["FI","FI"],["FR","FR"],["ME","ME"],["JP","JP"],["KP","KP"],["KR","KR"],["SL","SL"],["AU","AU"],["GH","GH"],["GP","GP"],["AD","AD"],["AE","AE"],["IT","IT"],["NL","NL"],["OM","OM"],["EG","EG"],["KE","KE"],["BE","BE"],["GB","GB"],["HR","HR"],["LI","LI"],["SE","SE"],["QA","QA"],["SC","SC"],["UZ","UZ"],["HK","HK"],["TM","TM"],["TN","TN"],["IN","IN"],["IR","IR"],["IS","IS"],["AZ","AZ"],["TW","TW"],["BR","BR"],["BY","BY"],["LV","LV"],["RO","RO"],["RU","RU"],["SA","SA"],["MD","MD"],["UA","UA"],["JO","JO"],["IQ","IQ"],["GE","GE"]]}],layout:"hbox"},{id:"MainContent_Container3",margin:"0 0 10",xtype:"container",items:[{id:"MainContent_dfLoadingDate",width:250,xtype:"datefield",fieldLabel:"Date",name:"dfOrderDate",allowBlank:false,format:"d-m-Y",submitFormat:"n/j/Y"},{id:"MainContent_tfLoadingTimeFrom",width:71,xtype:"timefield",value:"08:00",format:"H:i",increment:30,maxValue:"18:00",minValue:"08:00",submitFormat:"g:i a"},{id:"MainContent_laLoadingTimeUntill",xtype:"netlabel",autoHeight:true,text:"* - *"},{id:"MainContent_tfLoadingTimeUntill",width:75,xtype:"timefield",value:"16:00",format:"H:i",increment:30,maxValue:"18:00",minValue:"08:00",submitFormat:"g:i a"}],layout:"hbox"},{id:"MainContent_tfLoading_Reference",xtype:"textfield",fieldLabel:"Reference"},{id:"MainContent_tfLoading_Remarks",xtype:"textfield",fieldLabel:"Remarks"}],title:"Loading address"},{id:"MainContent_FieldSet2",xtype:"fieldset",defaultAnchor:"100%",flex:1,defaults:{"hideEmptyLabel":false},items:[{id:"MainContent_ImageButton2",xtype:"netimagebutton",anchor:"10%",menu:{id:"MainContent_Menu2",xtype:"menu",items:[{id:"MainContent_MenuItem4",iconCls:"#ArrowJoin",text:"Search"},{id:"MainContent_MenuItem5",iconCls:"#ApplicationGo",text:"Show on map"},{id:"MainContent_MenuItem6",iconCls:"#Accept",text:"Save as default"}]},imageUrl:"/WebSite2/icons/bulb2.png",overImageUrl:"/WebSite2/icons/bulb2_over.png",align:"right"},{id:"MainContent_tfUnloading_Name",xtype:"textfield",fieldLabel:"Name"},{id:"MainContent_tfUnloading_Address",xtype:"textfield",fieldLabel:"Address"},{id:"MainContent_Container4",margin:"0 0 10",xtype:"container",items:[{id:"MainContent_tfUnloading_City",width:250,xtype:"textfield",fieldLabel:"City, zip, country"},{id:"MainContent_tfUnloading_Zipcode",width:100,xtype:"textfield"},{id:"MainContent_cbUnloading_CountryCode",width:65,xtype:"combobox",allowBlank:false,emptyText:"Select",maxLength:2,maxLengthText:"Maximum length for this field is 2, revise your input",queryMode:"local",triggerAction:"all",store:[["BA","BA"],["ES","ES"],["LT","LT"],["PL","PL"],["SK","SK"],["US","US"],["MA","MA"],["MC","MC"],["SP","SP"],["DZ","DZ"],["NG","NG"],["CM","CM"],["AM","AM"],["AT","AT"],["BG","BG"],["CH","CH"],["CZ","CZ"],["HU","HU"],["MT","MT"],["GR","GR"],["LB","LB"],["NO","NO"],["RS","RS"],["SI","SI"],["SY","SY"],["IL","IL"],["AL","AL"],["CY","CY"],["IE","IE"],["KZ","KZ"],["TR","TR"],["LU","LU"],["MK","MK"],["PT","PT"],["EE","EE"],["ZA","ZA"],["SG","SG"],["KS","KS"],["MN","MN"],["MU","MU"],["MX","MX"],["MY","MY"],["BH","BH"],["CA","CA"],["CN","CN"],["DE","DE"],["DK","DK"],["FI","FI"],["FR","FR"],["ME","ME"],["JP","JP"],["KP","KP"],["KR","KR"],["SL","SL"],["AU","AU"],["GH","GH"],["GP","GP"],["AD","AD"],["AE","AE"],["IT","IT"],["NL","NL"],["OM","OM"],["EG","EG"],["KE","KE"],["BE","BE"],["GB","GB"],["HR","HR"],["LI","LI"],["SE","SE"],["QA","QA"],["SC","SC"],["UZ","UZ"],["HK","HK"],["TM","TM"],["TN","TN"],["IN","IN"],["IR","IR"],["IS","IS"],["AZ","AZ"],["TW","TW"],["BR","BR"],["BY","BY"],["LV","LV"],["RO","RO"],["RU","RU"],["SA","SA"],["MD","MD"],["UA","UA"],["JO","JO"],["IQ","IQ"],["GE","GE"]]}],layout:"hbox"},{id:"MainContent_Container5",margin:"0 0 10",xtype:"container",items:[{id:"MainContent_dfUnloadingDate",width:250,xtype:"datefield",fieldLabel:"Date",name:"dfOrderDate",allowBlank:false,format:"d-m-Y",submitFormat:"n/j/Y"},{id:"MainContent_tfUnloadingTimeFrom",width:71,xtype:"timefield",value:"08:00",format:"H:i",increment:30,maxValue:"18:00",minValue:"08:00",submitFormat:"g:i a"},{id:"MainContent_laUnloadingTimeUntill",xtype:"netlabel",autoHeight:true,text:"* - *"},{id:"MainContent_tfUnloadingTimeUntill",width:75,xtype:"timefield",value:"16:00",format:"H:i",increment:30,maxValue:"18:00",minValue:"08:00",submitFormat:"g:i a"}],layout:"hbox"},{id:"MainContent_tfUnloading_Reference",xtype:"textfield",fieldLabel:"Reference"},{id:"MainContent_tfUnloading_Remarks",xtype:"textfield",fieldLabel:"Remarks"}],title:"Unloading address"}],layout:"hbox"}],bodyPadding:10,collapsible:true,title:"Loading and unloading address",iconCls:"#House",url:"/WebSite2/OrderEntry.aspx"});Ext.create("Ext.form.Panel",{id:"MainContent_Goods",autoWidth:true,renderTo:"App.MainContent_Goods_Container",defaultAnchor:"100%",autoHeight:true,items:[{id:"MainContent_Container6",margin:"0 0 10",xtype:"container",items:[{id:"MainContent_FieldSet3",xtype:"fieldset",defaultAnchor:"100%",flex:1,defaults:{"hideEmptyLabel":false},items:[{store:{model:Ext.define("App.MainContent_Model1", {extend: "Ext.data.Model", fields:[{name:"klg_web_goods_seq"},{name:"quantity"},{name:"package"},{name:"description"},{name:"kg"},{name:"ldm"},{name:"length"},{name:"width"},{name:"heigth"},{name:"m3"},{name:"klg_web_shipment_seq"}],idProperty:"klg_web_goods_model" }),storeId:"MainContent_Store1",type:"paging",autoLoad:true,pageSize:10,proxy:{data:[{"KLG_WEB_GOODS_SEQ":2,"QUANTITY":3,"PACKAGE":"Kartons","DESCRIPTION":"Folders","KG":30,"LDM":0.0,"LENGTH":30,"WIDTH":10,"HEIGHT":30,"M3":0.09,"KLG_WEB_SHIPMENT_SEQ":1},{"KLG_WEB_GOODS_SEQ":1,"QUANTITY":1,"PACKAGE":"Europallet","DESCRIPTION":"Flessen wijn","KG":500,"LDM":4.0,"LENGTH":100,"WIDTH":120,"HEIGHT":100,"M3":1.2,"KLG_WEB_SHIPMENT_SEQ":1}], type: 'pagingmemory'}},id:"MainContent_GridPanel1",xtype:"grid",columnWidth:1,bbar:{id:"MainContent_PagingToolbar1",xtype:"pagingtoolbar",displayInfo:true,store:"MainContent_Store1"},columns:{id:"MainContent_ColumnModel1",items:[{id:"MainContent_Column1",flex:1,dataIndex:"klg_web_goods_seq",text:"#"},{id:"MainContent_Column2",dataIndex:"quantity",text:"Quantity"},{id:"MainContent_Column3",dataIndex:"package",text:"Package"},{id:"MainContent_Column4",dataIndex:"description",text:"Description"},{id:"MainContent_Column5",dataIndex:"kg",text:"Kg"},{id:"MainContent_Column6",width:200,dataIndex:"ldm",text:"Ldm"},{id:"MainContent_Column7",dataIndex:"length",text:"Length (cm)"},{id:"MainContent_Column8",dataIndex:"width",text:"Width (cm)"},{id:"MainContent_Column9",dataIndex:"heigth",text:"Heigth (cm)"},{id:"MainContent_Column10",dataIndex:"m3",text:"m3"},{id:"MainContent_Column11",dataIndex:"klg_web_shipment_seq",text:"shipment"}]},selModel:window.App.MainContent_RowSelectionModel1=Ext.create("Ext.selection.RowModel",{proxyId:"MainContent_RowSelectionModel1",selType:"rowmodel",listeners:{select:{buffer:250,fn:function(item,record,index){App.MainContent_Store2.reload();}}}})}],title:"Goods"}],layout:"hbox"},{id:"MainContent_Container7",margin:"0 0 10",xtype:"container",items:[{id:"MainContent_FieldSet4",xtype:"fieldset",defaultAnchor:"100%",flex:1,defaults:{"hideEmptyLabel":false},items:[{store:{model:Ext.define("App.MainContent_Model2", {extend: "Ext.data.Model", fields:[{name:"klg_web_dng_goods_seq",type:"int"},{name:"klg_web_goods_seq",type:"int"},{name:"un_number",type:"string"},{name:"class",type:"string"},{name:"packaging_group",type:"string"},{name:"transport_catagory",type:"string"},{name:"quantity",type:"int"},{name:"package",type:"string"},{name:"kg",type:"int"},{name:"nos_text",type:"string"},{name:"un_description",type:"string"}] }),storeId:"MainContent_Store2",readParameters:function(operation){return {apply:{"klg_web_goods_seq":App.MainContent_GridPanel1.getSelectionModel().hasSelection() ? App.MainContent_GridPanel1.getSelectionModel().getSelection()[0].data.klg_web_goods_seq : -1}};},proxy:{data:[{"KLG_WEB_DNG_GOODS_SEQ":3,"KLG_WEB_GOODS_SEQ":2,"UN_NUMBER":"0001","CLASS":"8","PACKAGING_GROUP":"I","TRANSPORT_CATAGORY":1,"QUANTITY":1,"PACKAGE":"Flessen","KG":10,"NOS_TEXT":"Moleculen","UN_DESCRIPTION":"Radioactive","KLG_WEB_SHIPMENT_SEQ":1}], type: 'memory', reader:{type:"json",idProperty:"klg_web_dng_goods_seq"}},listeners:{exception:{fn:function(proxy,response,operation){Ext.Msg.alert('Dangerous goods - Load failed', operation.getError());}}}},id:"MainContent_GridPanel2",border:false,xtype:"grid",columns:{id:"MainContent_ColumnModel2",items:[{id:"MainContent_Column12",flex:1,dataIndex:"klg_web_dng_goods_seq",text:"#"},{id:"MainContent_Column13",dataIndex:"klg_web_goods_seq",text:"Goods #"},{id:"MainContent_Column14",dataIndex:"un_number",text:"Un number"},{id:"MainContent_Column15",dataIndex:"class",text:"Class"},{id:"MainContent_Column16",dataIndex:"packaging_group",text:"Packaging group"},{id:"MainContent_Column17",dataIndex:"transport_catagory",text:"Transport catagory"},{id:"MainContent_Column18",dataIndex:"quantity",text:"Qty"},{id:"MainContent_Column19",dataIndex:"package",text:"Package"},{id:"MainContent_Column20",dataIndex:"kg",text:"Kg"},{id:"MainContent_Column21",dataIndex:"nos_text",text:"Nos text"},{id:"MainContent_Column22",dataIndex:"un_description",text:"Un description"}]},selModel:window.App.MainContent_RowSelectionModel2=Ext.create("Ext.selection.RowModel",{proxyId:"MainContent_RowSelectionModel2",selType:"rowmodel"})}],title:"Linked dangerous goods",listeners:{expand:{fn:function(item){App.MainContent_Store2.reload();}}}}],layout:"hbox"}],bodyPadding:10,collapsible:true,title:"Goods",iconCls:"#Package",url:"/WebSite2/OrderEntry.aspx"});});
        //]]>
        </script>
    I am using this as my datasource
            <cc2:OracleDataSource ID="ds_klg_web_goods" runat="server" 
                ConnectionString="User Id=customization;Password=support;Server=TMS;Sid=TMS;" 
                OldValuesParameterFormatString="Original_{0}" 
                SelectCommand="SELECT * FROM klg_web_goods where klg_web_shipment_seq = :klg_web_shipment_seq">
                <SelectParameters>
                    <asp:Parameter Name="klg_web_shipment_seq" Type="Decimal" DefaultValue="1"/>
                </SelectParameters>
            </cc2:OracleDataSource>
    and this is the aspx part (i cannot upload the file, it tells me that the file is invalid, even if I try zipped....)
    in a formpanel, in a container, in a fieldset i use the gridpanel, i create a store and reference to the datastore ds_klg_web_goods, with an associated model and columnodels.
            <ext:FormPanel ID="Goods" runat="server" Title="Goods" AutoHeight="true" AutoWidth="true"
                Collapsible="true" BodyPadding="10" DefaultAnchor="100%" Icon="Package">
                <Items>
                    <ext:Container ID="Container6" runat="server" Layout="HBoxLayout" MarginSpec="0 0 10">
                        <Items>
                            <ext:FieldSet ID="FieldSet3" runat="server" Flex="1" Layout="AnchorLayout" Title="Goods"
                                DefaultAnchor="100%">
                                <Defaults>
                                    <ext:Parameter Name="HideEmptyLabel" Value="false" Mode="Raw" />
                                </Defaults>
                                <Items>
                                    <ext:GridPanel ID="GridPanel1" runat="server" ColumnWidth="1">
                                        <Store>
                                            <ext:Store ID="Store1" runat="server" DataSourceID="ds_klg_web_goods" AutoLoad="true"
                                                PageSize="10">
                                                <Model>
                                                    <ext:Model ID="Model1" runat="server" IDProperty="klg_web_goods_model">
                                                        <Fields>
                                                            <ext:ModelField Name="klg_web_goods_seq" />
                                                            <ext:ModelField Name="quantity" />
                                                            <ext:ModelField Name="package" />
                                                            <ext:ModelField Name="description" />
                                                            <ext:ModelField Name="kg" />
                                                            <ext:ModelField Name="ldm" />
                                                            <ext:ModelField Name="length" />
                                                            <ext:ModelField Name="width" />
                                                            <ext:ModelField Name="heigth" />
                                                            <ext:ModelField Name="m3" />
                                                            <ext:ModelField Name="klg_web_shipment_seq" />
                                                        </Fields>
                                                    </ext:Model>
                                                </Model>
                                            </ext:Store>
                                        </Store>
                                        <ColumnModel ID="ColumnModel1" runat="server">
                                            <Columns>
                                                <ext:Column ID="Column1" runat="server" DataIndex="klg_web_goods_seq" Text="#" Flex="1" />
                                                <ext:Column ID="Column2" runat="server" DataIndex="quantity" Text="Quantity" />
                                                <ext:Column ID="Column3" runat="server" DataIndex="package" Text="Package" />
                                                <ext:Column ID="Column4" runat="server" DataIndex="description" Text="Description" />
                                                <ext:Column ID="Column5" runat="server" DataIndex="kg" Text="Kg" />
                                                <ext:Column ID="Column6" runat="server" DataIndex="ldm" Text="Ldm" Width="200" />
                                                <ext:Column ID="Column7" runat="server" DataIndex="length" Text="Length (cm)" />
                                                <ext:Column ID="Column8" runat="server" DataIndex="width" Text="Width (cm)" />
                                                <ext:Column ID="Column9" runat="server" DataIndex="heigth" Text="Heigth (cm)" />
                                                <ext:Column ID="Column10" runat="server" DataIndex="m3" Text="m3" />
                                                <ext:Column ID="Column11" runat="server" DataIndex="klg_web_shipment_seq" Text="shipment" />
                                            </Columns>
                                        </ColumnModel>
                                        <SelectionModel>
                                            <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" Mode="Single">
                                                <Listeners>
                                                    <Select Handler="#{Store2}.reload();" Buffer="250" />
                                                </Listeners>
                                            </ext:RowSelectionModel>
                                        </SelectionModel>
                                        <BottomBar>
                                            <ext:PagingToolbar ID="PagingToolbar1" runat="server" />
                                        </BottomBar>
                                    </ext:GridPanel>
                                </Items>
                            </ext:FieldSet>
                        </Items>
                    </ext:Container>
                    <ext:Container ID="Container7" runat="server" Layout="HBoxLayout" MarginSpec="0 0 10">
                        <Items>
                            <ext:FieldSet ID="FieldSet4" runat="server" Flex="1" Layout="AnchorLayout" Title="Linked dangerous goods"
                                DefaultAnchor="100%">
                                <Defaults>
                                    <ext:Parameter Name="HideEmptyLabel" Value="false" Mode="Raw" />
                                </Defaults>
                                <Items>
                                    <ext:GridPanel ID="GridPanel2" runat="server" Border="false">
                                        <Store>
                                            <ext:Store ID="Store2" runat="server" AutoLoad="false" DataSourceID="ds_klg_web_dangerous_goods"
                                                OnReadData="Store2_Refresh">
                                                <Model>
                                                    <ext:Model ID="Model2" runat="server">
                                                        <Fields>
                                                            <ext:ModelField Name="klg_web_dng_goods_seq" Type="Int" />
                                                            <ext:ModelField Name="klg_web_goods_seq" Type="Int" />
                                                            <ext:ModelField Name="un_number" Type="String" />
                                                            <ext:ModelField Name="class" Type="String" />
                                                            <ext:ModelField Name="packaging_group" Type="String" />
                                                            <ext:ModelField Name="transport_catagory" Type="String" />
                                                            <ext:ModelField Name="quantity" Type="Int" />
                                                            <ext:ModelField Name="package" Type="String" />
                                                            <ext:ModelField Name="kg" Type="Int" />
                                                            <ext:ModelField Name="nos_text" Type="String" />
                                                            <ext:ModelField Name="un_description" Type="String" />
                                                        </Fields>
                                                    </ext:Model>
                                                </Model>
                                                <Reader>
                                                    <ext:JsonReader IDProperty="klg_web_dng_goods_seq" />
                                                </Reader>
                                                <Parameters>
                                                    <ext:StoreParameter Name="klg_web_goods_seq" Value="#{GridPanel1}.getSelectionModel().hasSelection() ? #{GridPanel1}.getSelectionModel().getSelection()[0].data.klg_web_goods_seq : -1"
                                                        Mode="Raw" />
                                                </Parameters>
                                                <Listeners>
                                                    <Exception Handler="Ext.Msg.alert('Dangerous goods - Load failed', operation.getError());" />
                                                </Listeners>
                                            </ext:Store>
                                        </Store>
                                        <ColumnModel ID="ColumnModel2" runat="server">
                                            <Columns>
                                                <ext:Column ID="Column12" runat="server" DataIndex="klg_web_dng_goods_seq" Text="#"
                                                    Flex="1" />
                                                <ext:Column ID="Column13" runat="server" DataIndex="klg_web_goods_seq" Text="Goods #" />
                                                <ext:Column ID="Column14" runat="server" DataIndex="un_number" Text="Un number" />
                                                <ext:Column ID="Column15" runat="server" DataIndex="class" Text="Class" />
                                                <ext:Column ID="Column16" runat="server" DataIndex="packaging_group" Text="Packaging group" />
                                                <ext:Column ID="Column17" runat="server" DataIndex="transport_catagory" Text="Transport catagory" />
                                                <ext:Column ID="Column18" runat="server" DataIndex="quantity" Text="Qty" />
                                                <ext:Column ID="Column19" runat="server" DataIndex="package" Text="Package" />
                                                <ext:Column ID="Column20" runat="server" DataIndex="kg" Text="Kg" />
                                                <ext:Column ID="Column21" runat="server" DataIndex="nos_text" Text="Nos text" />
                                                <ext:Column ID="Column22" runat="server" DataIndex="un_description" Text="Un description" />
                                            </Columns>
                                        </ColumnModel>
                                        <SelectionModel>
                                            <ext:RowSelectionModel ID="RowSelectionModel2" runat="server" Mode="Single" />
                                        </SelectionModel>
                                    </ext:GridPanel>
                                </Items>
                                <Listeners>
                                    <Expand Handler="#{Store2}.reload();" />
                                </Listeners>
                            </ext:FieldSet>
                        </Items>
                    </ext:Container>
                </Items>
            </ext:FormPanel>

    Attached also an example of that wat is viewed on the website.
    can someone help me?
    am I doing something wrong... ?

    please note I'm completely new to asp.net programming...
    Attached Thumbnails Click image for larger version. 

Name:	goods.PNG 
Views:	196 
Size:	18.4 KB 
ID:	4310  
  2. #2
    DataIndex and ModelField names is case sensitive. You need to use the same case

    It is your data
    {
      "KLG_WEB_GOODS_SEQ": 2,
      "QUANTITY": 3,
      "PACKAGE": "Kartons",
      "DESCRIPTION": "Folders",
      "KG": 30,
      "LDM": 0.0,
      "LENGTH": 30,
      "WIDTH": 10,
      "HEIGHT": 30,
      "M3": 0.09,
      "KLG_WEB_SHIPMENT_SEQ": 1
    }
    Therefore model field name and column data index must be the same, for example
    <ext:ModelField Name="PACKAGE" />
    or you can use Mapping
    <ext:ModelField Name="package" Mapping="PACKAGE" />
  3. #3
    That did it !
    You just made my day!

    Thank you very much Vladimir

Similar Threads

  1. Replies: 5
    Last Post: Feb 01, 2012, 11:54 AM
  2. Replies: 1
    Last Post: Jan 29, 2012, 7:08 PM
  3. Replies: 1
    Last Post: Dec 12, 2011, 5:14 PM
  4. [CLOSED] local paging shows all rows
    By sharif in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Mar 26, 2010, 7:38 AM
  5. Replies: 0
    Last Post: Jun 26, 2009, 11:32 AM

Tags for this Thread

Posting Permissions