PDA

View Full Version : Store in MasterPage problem



MrMp3
Oct 03, 2008, 4:44 PM
I canīt make that Store control work inside MasterPages! itīs me or the control??
Thanks for your help!!

Ariel
Argentina

geoffrey.mcgill
Oct 03, 2008, 8:13 PM
Hi Ariel,

Can you post a really simplify stripped down version of how you have your pages configured and showing the relationship between the <ext:Store> and other controls (GridPanel?)?


This might be an issue with just setting the ID of the control because in a MasterPage, the server-side ID will be different than the client-side (browser) ID. The .ClientID is always used in the JavaScript configuration. 

jenming
Nov 28, 2008, 12:54 PM
Here has the same problem in MasterPage ...



<ext:Store ID="Store1" runat="server" OnRefreshData="MyData_Refresh">
<Reader>
<ext:ArrayReader>
<Fields>
<ext:RecordField Name="company" />
<ext:RecordField Name="price" Type="Float" />
<ext:RecordField Name="change" Type="Float" />
<ext:RecordField Name="pctChange" Type="Float" />
<ext:RecordField Name="lastChange" Type="Date" DateFormat="Y-m-dTh:i:s" />
</Fields>
</ext:ArrayReader>
</Reader>
</ext:Store>

<ext:GridPanel
ID="GridPanel1"
runat="server"
StoreID="Store1"
StripeRows="true"
Title="Array Grid"
Width="600"
Height="290"
AutoExpandColumn="Company">
<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<ext:Column ColumnID="Company" Header="Company" Width="160" Sortable="true" DataIndex="company" />
<ext:Column Header="Price" Width="75" Sortable="true" DataIndex="price">
<Renderer Format="UsMoney" />
</ext:Column>
<ext:Column Header="Change" Width="75" Sortable="true" DataIndex="change">
<Renderer Fn="change" />
</ext:Column>
<ext:Column Header="Change" Width="75" Sortable="true" DataIndex="pctChange">
<Renderer Fn="pctChange" />
</ext:Column>
<ext:Column Header="Last Updated" Width="85" Sortable="true" DataIndex="lastChange">
<Renderer Fn="Ext.util.Format.dateRenderer('G:i:s')" />
</ext:Column>
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />
</SelectionModel>
<LoadMask ShowMask="true" />
<BottomBar>
<ext:PagingToolBar ID="PagingToolBar1" runat="server" PageSize="10" StoreID="Store1" />
</BottomBar>
</ext:GridPanel>


The GridPanel is function work, but the "ClientID" of "Store1" has the prefix like "ctl00_MainContent_Store1"...
How do i set the javascript correct?
Thanks a lot.

jchau
Nov 30, 2008, 12:45 AM
Is this the same problem I experienced with Store in contentpage when layout controls are used?

http://forums.ext.net/showthread.php?threadid=2995-5-1.aspx?Highlight=masterpage

If so, you will have to create another content placeholder and put the store there.