Feb 27, 2012, 7:04 AM
[CLOSED] Adding New Record at run time
Hi,
I am trying to add record in Grid at runtime through extjs, It is added with no problem but when i want to post the Grid values as parameter using this code.
To add record in a store I am using this Code
I am trying to add record in Grid at runtime through extjs, It is added with no problem but when i want to post the Grid values as parameter using this code.
Ext.encode(#{GridPanel_Categories}.getRowsValues({selectedOnly : false}))
It gives error "record.fields is undefined" in firebugTo add record in a store I am using this Code
var rec = new Ext.data.Record({ ICategory: ISelectedCategory, Name: KnowledgeBase._SelectedCategoryName, ParentCategory: KnowledgeBase._SelectedCategoryParentName});
store.add(rec);
My Store is as follows<ext:Store ID="store_Categories" runat="server" IDMode="Static">
<Proxy>
<ext:HttpProxy Json="true" Method="POST" Url="/KnowledgeBase/getCategoriesByKnowledgeBaseID" />
</Proxy>
<Reader>
<ext:JsonReader IDProperty="ICategory" Root="rows">
<Fields>
<ext:RecordField Name="ICategory" Type="String" SortDir="ASC" />
<ext:RecordField Name="Name" Type="String" />
<ext:RecordField Name="ParentCategory" Type="String" />
</Fields>
</ext:JsonReader>
</Reader>
<BaseParams>
<ext:Parameter Name="limit" Value="15" Mode="Raw" />
<ext:Parameter Name="start" Value="0" Mode="Raw" />
<ext:Parameter Name="dir" Value="ASC" />
<ext:Parameter Name="sort" Value="Id" />
<ext:Parameter Name="KnowledgeBaseID" Value="KnowledgeBase.getId()" Mode="Raw" />
</BaseParams>
</ext:Store>
Last edited by Daniil; Feb 27, 2012 at 12:18 PM.
Reason: [CLOSED]