Jun 15, 2012, 8:31 PM
[CLOSED] Delay loading of data
I would like to delay the loading of data until the ListFilter is selected by the user. Is it possible?
The ListFilter is associated with a Store, which is associated with a LinqDataSource.
The ListFilter is associated with a Store, which is associated with a LinqDataSource.
<script type="text/javascript">
var myCreateMenu = function (config) {
var menuCfg = config.menuItems ? {items : config.menuItems} : {},
menu;
Ext.copyTo(menuCfg, config, "labelField,loadingText,loadOnShow,single,store,options");
Ext.apply(menuCfg, {
height : 297 ///!!! to get scrolling
});
menu = Ext.create('Ext.ux.grid.menu.ListMenu', menuCfg);
menu.self.xtype = "menu"; //!!! workaround for ExtJS bug
menu.on('checkchange', this.onCheckChange, this);
return menu;
};
</script>
...
<ext:GridPanel runat="server" Region="Center" >
<Bin>
<ext:Store ID="CmdLvl_Store" runat="server" DataSourceId="CmdLvl_LDS">
<Model>
<ext:Model runat="server" IDProperty="FullDescr">
<Fields>
<ext:ModelField Name="CmdLvl" Mapping="CmdLvl" />
<ext:ModelField Name="id" Mapping="FullDescr" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
<ext:Container runat="server">
<Content>
<asp:LinqDataSource ID="CmdLvl_LDS" runat="server" ContextTypeName="CFV.CFVDataContext"
OnSelecting="CmdLvlLDS_Selecting" />
</Content>
</ext:Container>
</Bin>
...
<ColumnModel runat="server">
<ext:Column runat="server" Text="CmdLvl" DataIndex="CmdLvl" Align="Center" Hideable="false" width="60" />
</ColumnModel>
...
<Features>
<ext:GridFilters ID="Filters" runat="server">
<ext:ListFilter DataIndex="CmdLvl" StoreId="CmdLvl_Store" LabelField="id" >
<CustomConfig>
<ext:ConfigItem Name="createMenu" Value="myCreateMenu" Mode="Raw" />
</CustomConfig>
</ext:ListFilter>
</ext:GridFilters>
</Features
...
</ext:GridPanel>
...
Last edited by Daniil; Aug 08, 2012 at 4:20 PM.
Reason: [CLOSED]