Ext: 프론트 데스크톱 js가gridpanel 동적 추가 기록

5290 단어 gridPanel
stor:
<ext:Store ID="StorePutInImg" runat="server">

        <Reader>

            <ext:JsonReader IDProperty="PicName">

                <Fields>

                    <ext:RecordField Name="PicName">

                    </ext:RecordField>

                    <ext:RecordField Name="PicFileName">

                    </ext:RecordField>

                    <ext:RecordField Name="CreateTime">

                    </ext:RecordField>

                    <ext:RecordField Name="PicMark">

                    </ext:RecordField>

                </Fields>

            </ext:JsonReader>

        </Reader>

    </ext:Store>

js:
 var picToTempGridPanel = function () {

              var store = new Ext.data.ArrayStore({

                  autoDestroy: true,

                  fields: [{

                      name: 'PicName'

                  },

                {

                    name: 'PicFileName'

                },

                {

                    name: 'CreateTime'

                },

                {

                    name: 'PicMark'

                }]

              });

              var defaultData = {

                  PicName: txtpocName.getValue(),

                  //PicFileName: picFilePath.getValue(),



                  CreateTime: '20121010',

                  PicMark: txImgMark.getValue()

              };

              //alert(Ext.encode(defaultData));

              StorePutInImg.loadData(defaultData, true); // loadData( data, [append] ) 

             

          }

 
stor에서 가장 중요한 줄:
<ext:JsonReader IDProperty="PicName">
 , !

IDProperty="PicName",Ext PicName , stor 。

좋은 웹페이지 즐겨찾기