PDA

View Full Version : Browser back button



peterdiplaros
Nov 19, 2008, 4:59 PM
I am using few linked combo boxes to select a few parameters, and then using those parameters to populate a gridpanel.

The combo boxes are loading their items automatically from the database.

Upon selection of any combo box item, I reload the gridpanel with new data. Part of the data in the grid is a hyperlink to another page (a data detail page, so to speak).

All of that works fine. Except one thing: after viewing the detail page, I press the browser back button and the original page does not remember where it was, it starts loading all the combo box items again, then loading the gridpanel with the default data, etc.

Is there no way to stop that from happening? I would like the first page to quickly go back where it was before the user navigated after it, without the delay of having to load all the data again.

I tried StateProvider="PostBack" and also "Cookie" but no go. Is the problem that I set the combobox stores to autoload?

jlertle
Nov 20, 2008, 10:09 PM
I didn't test to verify if this is it or not but the combobox has a stateful property that is false by default. Try setting it to true and see.

Let us know if it is. :)

peterdiplaros
Nov 21, 2008, 12:17 PM
It did not work.
The tabPanel was able to keep its state, but the 4 combo boxes did not.
Here is the code, abridged.



<ext:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Release" StateProvider="PostBack">
<Listeners>
<DocumentReady Handler="#{storeTabs}.reload();" />
</Listeners>
</ext:ScriptManager>
<!-- originally #{ddlGroups}.setValue(#{ddlGroups}.store.getAt(0). get('ClientGroup')); -->
<ext:Store runat="server" ID="storeGroups" DataSourceID="dsGroups" AutoLoad="true">
<Reader>
<ext:JsonReader ReaderID="Id">
<Fields>
<ext:RecordField Name="ClientGroup" Type="String" Mapping="ClientGroup" />
<ext:RecordField Name="GroupName" Type="String" Mapping="GroupName" />
</Fields>
</ext:JsonReader>
</Reader>
<Listeners>
<Load Handler="setFirstValue(#{ddlGroups}, 'ClientGroup');" />
</Listeners>
</ext:Store>

<ext:Store runat="server" ID="storeSeries" DataSourceID="dsSeries" AutoLoad="true">
<Reader>
<ext:JsonReader ReaderID="Id1">
<Fields>
<ext:RecordField Name="SeriesCode" Type="String" Mapping="SeriesCode" />
<ext:RecordField Name="SeriesName" Type="String" Mapping="SeriesName" />
</Fields>
</ext:JsonReader>
</Reader>
<Listeners>
<Load Handler="setFirstValue(#{ddlSeries}, 'SeriesCode');" />
</Listeners>
</ext:Store>

<ext:Store runat="server" ID="storeCategories" DataSourceID="dsCategories" AutoLoad="true">
<Reader>
<ext:JsonReader ReaderID="Id2">
<Fields>
<ext:RecordField Name="FundCategoryCode" Type="String" Mapping="FundCategoryCode" />
<ext:RecordField Name="FundCategory" Type="String" Mapping="FundCategory" />
</Fields>
</ext:JsonReader>
</Reader>
<Listeners>
<Load Handler="setFirstValue(#{ddlCategory}, 'FundCategoryCode');" />
</Listeners>
</ext:Store>

<ext:Store runat="server" ID="storeCurrencies" DataSourceID="dsCurrencies" AutoLoad="true">
<Reader>
<ext:JsonReader ReaderID="Id3">
<Fields>
<ext:RecordField Name="CurrencyCode" Type="String" Mapping="CurrencyCode" />
<ext:RecordField Name="Currency" Type="String" Mapping="Currency" />
</Fields>
</ext:JsonReader>
</Reader>
<Listeners>
<Load Handler="setFirstValue(#{ddlCurrency}, 'CurrencyCode');" />
</Listeners>
</ext:Store>

<div id="fl_groups">
<h3><asp:label runat="server" ID="lblFundGroup" Text="Fund Group" /></h3>
<ext:ComboBox
ID="ddlGroups"
StoreID="storeGroups"
runat="server"
Editable="false"
TypeAhead="true"
Mode="Local"
ForceSelection="true"
TriggerAction="All"
DisplayField="GroupName"
ValueField="ClientGroup"
Select&#111;nfocus="true"
Width="200"
Stateful="true"
EmptyText="Select a group...">
</ext:ComboBox>



<div id="fl_series">
<h3><asp:label runat="server" ID="lblSeries" Text="Series" /></h3>
<ext:ComboBox
ID="ddlSeries"
runat="server"
StoreID="storeSeries"
Editable="false"
TypeAhead="true"
Mode="Local"
ForceSelection="true"
TriggerAction="All"
DisplayField="SeriesName"
ValueField="SeriesCode"
EmptyText="Loading..."
Width="100"
Stateful="true"
ValueNotFoundText="Not found...">
</ext:ComboBox>



<div id="fl_asset_class">
<h3><asp:label runat="server" ID="lblAssetClass" Text="Asset Class" /></h3>
<ext:ComboBox
ID="ddlCategory"
runat="server"
StoreID="storeCategories"
Editable="false"
TypeAhead="true"
Mode="Local"
ForceSelection="true"
TriggerAction="All"
DisplayField="FundCategory"
ValueField="FundCategoryCode"
EmptyText="Loading..."
Width="200"
Stateful="true"
ValueNotFoundText="Not found...">
</ext:ComboBox>



<div id="fl_currency">
<h3><asp:label runat="server" ID="lblCurrency" Text="Currency" /></h3>
<ext:ComboBox
ID="ddlCurrency"
runat="server"
StoreID="storeCurrencies"
Editable="false"
TypeAhead="true"
Mode="Local"
ForceSelection="true"
TriggerAction="All"
DisplayField="Currency"
ValueField="CurrencyCode"
EmptyText="Loading..."
Width="100"
Stateful="true"
ValueNotFoundText="Not found...">
</ext:ComboBox>




<div id="fl_button">
<h3><asp:label runat="server" ID="lblButton" Text="&amp;nbsp;" /></h3>
<ext:Button
ID="btnGo"
runat="server"
Width="100"
AutoPostBack="false"
Text="Filter">
<Listeners>
<Click Handler="#{storeTabs}.reload();" />
</Listeners>
</ext:Button>




<asp:SqlDataSource ID="dsTabs" runat="server"
ConnectionString="<%$ ConnectionStrings:FUNDSConnectionString %>"
SelectCommand="get_fundlist_tabs_from_flat_file" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter Name="FUNDGROUP" Type="String" />
<asp:Parameter Name="SERIES" Type="String" />
<asp:Parameter Name="CATEGORYCODE" Type="String" />
<asp:Parameter Name="CURRENCY" Type="String" />
<asp:QueryStringParameter Name="LANG" DefaultValue="EN" QueryStringField="lang" Type="String" />
</SelectParameters>
</asp:SqlDataSource>

<ext:Store ID="storeTabs" runat="server" DataSourceID="dsTabs" AutoLoad="false" GroupField="FundGroupName" OnRefreshData="storeTabs_RefreshData">
<Listeners>
<Load Handler="doResize();" />
</Listeners>
<Reader>
<ext:JsonReader ReaderID="storeTabsReader">
<Fields>
<ext:RecordField Name="FundCode" Type="String" />
<ext:RecordField Name="SeriesName" Type="String" />
<ext:RecordField Name="Currency" Type="String" />
<ext:RecordField Name="FundGroup" Type="String" />
<ext:RecordField Name="FundGroupName" Type="String" />
<ext:RecordField Name="FundName" Type="String" />
<ext:RecordField Name="FundNameFull" Type="String" />
<ext:RecordField Name="FundCategory" Type="String" />
<ext:RecordField Name="RSP" Type="String" />
<ext:RecordField Name="NAVPS" Type="Float" />
<ext:RecordField Name="NAVPSDate" Type="Date" />
<ext:RecordField Name="NAVPSChange" Type="Float" />
<ext:RecordField Name="NAVPSChangeDirection" Type="Int" />
<ext:RecordField Name="NAVPSChangePercent" Type="Float" />
<ext:RecordField Name="NAVPSPrevious" Type="Float" />
<ext:RecordField Name="MER" Type="Float" />
<ext:RecordField Name="Assets" Type="Float" />
<ext:RecordField Name="P1Mo" Type="Float" />
<ext:RecordField Name="P3Mo" Type="Float" />
<ext:RecordField Name="P6Mo" Type="Float" />
<ext:RecordField Name="PYTD" Type="Float" />
<ext:RecordField Name="P1Yr" Type="Float" />
<ext:RecordField Name="P2Yr" Type="Float" />
<ext:RecordField Name="P3Yr" Type="Float" />
<ext:RecordField Name="P4Yr" Type="Float" />
<ext:RecordField Name="P5Yr" Type="Float" />
<ext:RecordField Name="P7Yr" Type="Float" />
<ext:RecordField Name="P10Yr" Type="Float" />
<ext:RecordField Name="P15Yr" Type="Float" />
<ext:RecordField Name="P20Yr" Type="Float" />
<ext:RecordField Name="PInception" Type="Float" />
<ext:RecordField Name="StartDate" Type="Date" />
<ext:RecordField Name="MorningstarRating" Type="String" />
<ext:RecordField Name="MostRecentYear" Type="Int" />
<ext:RecordField Name="PYTDCAL" Type="Float" />
<ext:RecordField Name="PCAL1" Type="Float" />
<ext:RecordField Name="PCAL2" Type="Float" />
<ext:RecordField Name="PCAL3" Type="Float" />
<ext:RecordField Name="PCAL4" Type="Float" />
<ext:RecordField Name="PCAL5" Type="Float" />
<ext:RecordField Name="PCAL6" Type="Float" />
<ext:RecordField Name="PCAL7" Type="Float" />
<ext:RecordField Name="PCAL8" Type="Float" />
<ext:RecordField Name="PCAL9" Type="Float" />
<ext:RecordField Name="PCAL10" Type="Float" />
<ext:RecordField Name="Std3Yr" Type="Float" />
<ext:RecordField Name="Std5Yr" Type="Float" />
<ext:RecordField Name="Std10Yr" Type="Float" />
<ext:RecordField Name="RiskTolerance" Type="Int" />
<ext:RecordField Name="Best12Mo" Type="Float" />
<ext:RecordField Name="Best12MoDate" Type="Date" />
<ext:RecordField Name="Worst12Mo" Type="Float" />
<ext:RecordField Name="Worst12MoDate" Type="Date" />
<ext:RecordField Name="NAV12" Type="String" />
<ext:RecordField Name="NumDist" Type="String" />
<ext:RecordField Name="DistTotal" Type="String" />
<ext:RecordField Name="CurrentYield" Type="String" />
<ext:RecordField Name="DistFrequency" Type="String" />
<ext:RecordField Name="DistType" Type="String" />
<ext:RecordField Name="DistFixedAmount" Type="String" />
<ext:RecordField Name="StyleCapBias" Type="String" />
<ext:RecordField Name="StyleApproach" Type="String" />
<ext:RecordField Name="BenchmarkName" Type="String" />
<ext:RecordField Name="FundservPrefix" Type="String" />
<ext:RecordField Name="FundservCodes" Type="String" />
<ext:RecordField Name="FundManagers" Type="String" />
</Fields>
</ext:JsonReader>
</Reader>
<SortInfo Field="FundNameFull" Direction="ASC" />
</ext:Store>

<div id="fl-panel" style="clear: both;">

<ext:TabPanel ID="tabPanel" runat="server" ActiveTabIndex="0" Stateful="true"
Plain="True" AutoHeight="True" Title="Fund listings" EnableTabScroll="True" DeferredRender="True">
<Tabs>
<ext:Tab ID="Tab1" runat="server" Title="Overview" BodyStyle="padding: 0px;" AutoHeight="True"
TabTip="General overview tab, showing fund category, MER, and assets" AutoScroll="False" BodyBorder="False"
TrackMouseOver="true" Border="False" MaskDisabled="False" Stateful="True">
<Content>
<ext:FitLayout ID="FitLayout1" runat="server">
<ext:GridPanel ID="GridPanel1" runat="server" StripeRows="true" AutoHeight="true" BodyBorder="false" Border="false" TrackMouseOver="True" Stateful="True" AutoExpandColumn="2">
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" SingleSelect="true" >
</ext:RowSelectionModel>
</SelectionModel>
<LoadMask ShowMask="true" Msg="Loading info..." />
</ext:GridPanel>
</ext:FitLayout>
</Content>
<Listeners>
<Activate Handler="activateTab(1);" />
</Listeners>
</ext:Tab>
<ext:Tab ID="Tab11" runat="server" Title="Daily Pricing" BodyStyle="padding: 0px;" AutoHeight="True"
TabTip="Daily pricing tab, showing latest NAVPS, Direction,Change percent and Previous price" AutoScroll="True" BodyBorder="False"
TrackMouseOver="true" Border="False" MaskDisabled="False" Stateful="True">
<Content>
<ext:FitLayout ID="FitLayout11" runat="server">
<ext:GridPanel
ID="GridPanel11" runat="server" StripeRows="true" AutoHeight="true" BodyBorder="false" Border="false" TrackMouseOver="True" Stateful="True" AutoExpandColumn="2">
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel11" runat="server" SingleSelect="true" >
</ext:RowSelectionModel>
</SelectionModel>
<LoadMask ShowMask="true" Msg="Loading info..." />
</ext:GridPanel>
</ext:FitLayout>
</Content>
<Listeners>
<Activate Handler="activateTab(11);" />
</Listeners>
</ext:Tab>
<ext:Tab ID="Tab2" runat="server" Title="Short term" BodyStyle="padding: 0px;" AutoHeight="True"
TabTip="Short term performance tab, showing returns from 1 month to 4 years" AutoScroll="True" BodyBorder="False"
TrackMouseOver="true" Border="False" MaskDisabled="False" Stateful="True">
<Content>
<ext:FitLayout ID="FitLayout2" runat="server">
<ext:GridPanel
ID="GridPanel2" runat="server" StripeRows="true" AutoHeight="true" BodyBorder="false" Border="false" TrackMouseOver="True" Stateful="True" AutoExpandColumn="2">
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel2" runat="server" SingleSelect="true" >
</ext:RowSelectionModel>
</SelectionModel>
<LoadMask ShowMask="true" Msg="Loading info..." />
</ext:GridPanel>
</ext:FitLayout>
</Content>
<Listeners>
<Activate Handler="activateTab(2);" />
</Listeners>
</ext:Tab>
<ext:Tab ID="Tab3" runat="server" Title="Long-term" BodyStyle="padding: 0px;" AutoHeight="True"
TabTip="Long-term performance tab, showing 5-year to 20-year returns, return since inception" AutoScroll="True" BodyBorder="False"
TrackMouseOver="true" Border="False" MaskDisabled="False" Stateful="True">
<Content>
<ext:FitLayout ID="FitLayout3" runat="server">
<ext:GridPanel
ID="GridPanel3" runat="server" StripeRows="true" AutoHeight="true" BodyBorder="false" Border="false" TrackMouseOver="True" Stateful="True" AutoExpandColumn="2">
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel3" runat="server" SingleSelect="true" >
</ext:RowSelectionModel>
</SelectionModel>
<LoadMask ShowMask="true" Msg="Loading info..." />
</ext:GridPanel>
</ext:FitLayout>
</Content>
<Listeners>
<Activate Handler="activateTab(3);" />
</Listeners>
</ext:Tab>
<ext:Tab ID="Tab4" runat="server" Title="Calendar" BodyStyle="padding: 0px;" AutoHeight="True"
TabTip="Annual (calendar year) performance tab, showing performance during the past 10 calendar years" AutoScroll="True" BodyBorder="False"
TrackMouseOver="true" Border="False" MaskDisabled="False" Stateful="True">
<Content>
<ext:FitLayout ID="FitLayout4" runat="server">
<ext:GridPanel
ID="GridPanel4" runat="server" StripeRows="true" AutoHeight="true" BodyBorder="false" Border="false" TrackMouseOver="True" Stateful="True" AutoExpandColumn="2">
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel4" runat="server" SingleSelect="true" >
</ext:RowSelectionModel>
</SelectionModel>
<LoadMask ShowMask="true" Msg="Loading info..." />
</ext:GridPanel>
</ext:FitLayout>
</Content>
<Listeners>
<Activate Handler="activateTab(4);" />
</Listeners>
</ext:Tab>
<ext:Tab ID="Tab5" runat="server" Title="Risk" BodyStyle="padding: 0px;" AutoHeight="True"
TabTip="Risk tab, showing standard deviation and risk tolerance" AutoScroll="True" BodyBorder="False"
TrackMouseOver="true" Border="False" MaskDisabled="False" Stateful="True">
<Content>
<ext:FitLayout ID="FitLayout5" runat="server">
<ext:GridPanel
ID="GridPanel5" runat="server" StripeRows="true" AutoHeight="true" BodyBorder="false" Border="false" TrackMouseOver="True" Stateful="True" AutoExpandColumn="2">
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel5" runat="server" SingleSelect="true" >
</ext:RowSelectionModel>
</SelectionModel>
<LoadMask ShowMask="true" Msg="Loading info..." />
</ext:GridPanel>
</ext:FitLayout>
</Content>
<Listeners>
<Activate Handler="activateTab(5);" />
</Listeners>
</ext:Tab>
<ext:Tab ID="Tab12" runat="server" Title="Best/Worst" BodyStyle="padding: 0px;" AutoHeight="True"
TabTip="Best/Worst tab, showing the best and worst 12-month rolling returns during the fund's history" AutoScroll="True" BodyBorder="False"
TrackMouseOver="true" Border="False" MaskDisabled="False" Stateful="True">
<Content>
<ext:FitLayout ID="FitLayout12" runat="server">
<ext:GridPanel
ID="GridPanel12" runat="server" StripeRows="true" AutoHeight="true" BodyBorder="false" Border="false" TrackMouseOver="True" Stateful="True" AutoExpandColumn="2">
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel12" runat="server" SingleSelect="true" >
</ext:RowSelectionModel>
</SelectionModel>
<LoadMask ShowMask="true" Msg="Loading info..." />
</ext:GridPanel>
</ext:FitLayout>
</Content>
<Listeners>
<Activate Handler="activateTab(12);" />
</Listeners>
</ext:Tab>
<ext:Tab ID="Tab6" runat="server" Title="Income" BodyStyle="padding: 0px;" AutoHeight="True"
TabTip="Income tab, showing distributions and yields" AutoScroll="True" BodyBorder="False"
TrackMouseOver="true" Border="False" MaskDisabled="False" Stateful="True">
<Content>
<ext:FitLayout ID="FitLayout6" runat="server">
<ext:GridPanel
ID="GridPanel6" runat="server" StripeRows="true" AutoHeight="true" BodyBorder="false" Border="false" TrackMouseOver="True" Stateful="True" AutoExpandColumn="2">
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel6" runat="server" SingleSelect="true" >
</ext:RowSelectionModel>
</SelectionModel>
<LoadMask ShowMask="true" Msg="Loading info..." />
</ext:GridPanel>
</ext:FitLayout>
</Content>
<Listeners>
<Activate Handler="activateTab(6);" />
</Listeners>
</ext:Tab>
<ext:Tab ID="Tab7" runat="server" Title="Style" BodyStyle="padding: 0px;" AutoHeight="True"
TabTip="Style tab, showing market capitalization bias, investment approach, and benchmark" AutoScroll="True" BodyBorder="False"
TrackMouseOver="true" Border="False" MaskDisabled="False" Stateful="True">
<Content>
<ext:FitLayout ID="FitLayout7" runat="server">
<ext:GridPanel
ID="GridPanel7" runat="server" StripeRows="true" AutoHeight="true" BodyBorder="false" Border="false" TrackMouseOver="True" Stateful="True" AutoExpandColumn="2">
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel7" runat="server" SingleSelect="true" >
</ext:RowSelectionModel>
</SelectionModel>
<LoadMask ShowMask="true" Msg="Loading info..." />
</ext:GridPanel>
</ext:FitLayout>
</Content>
<Listeners>
<Activate Handler="activateTab(7);" />
</Listeners>
</ext:Tab>
<ext:Tab ID="Tab10" runat="server" Title="Ratings" BodyStyle="padding: 0px;" AutoHeight="True"
TabTip="Ratings tab, showing morning star ratings" AutoScroll="True" BodyBorder="False"
TrackMouseOver="true" Border="False" MaskDisabled="False" Stateful="True">
<Content>
<ext:FitLayout ID="FitLayout10" runat="server">
<ext:GridPanel
ID="GridPanel10" runat="server" StripeRows="true" AutoHeight="true" BodyBorder="false" Border="false" TrackMouseOver="True" Stateful="True" AutoExpandColumn="2">
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel10" runat="server" SingleSelect="true" >
</ext:RowSelectionModel>
</SelectionModel>
<LoadMask ShowMask="true" Msg="Loading info..." />
</ext:GridPanel>
</ext:FitLayout>
</Content>
<Listeners>
<Activate Handler="activateTab(10);" />
</Listeners>
</ext:Tab>
<ext:Tab ID="Tab8" runat="server" Title="Codes" BodyStyle="padding: 0px;" AutoHeight="True"
TabTip="Fund codes tab, showing Fundserv purchase codes by load type" AutoScroll="True" BodyBorder="False"
TrackMouseOver="true" Border="False" MaskDisabled="False" Stateful="True">
<Content>
<ext:FitLayout ID="FitLayout8" runat="server">
<ext:GridPanel
ID="GridPanel8" runat="server" StripeRows="true" AutoHeight="true" BodyBorder="false" Border="false" TrackMouseOver="True" Stateful="True" AutoExpandColumn="2">
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel8" runat="server" SingleSelect="true" >
</ext:RowSelectionModel>
</SelectionModel>
<LoadMask ShowMask="true" Msg="Loading info..." />
</ext:GridPanel>
</ext:FitLayout>
</Content>
<Listeners>
<Activate Handler="activateTab(8);" />
</Listeners>
</ext:Tab>
<ext:Tab ID="Tab9" runat="server" Title="Fund Managers" BodyStyle="padding: 0px;" AutoHeight="True"
TabTip="Fund managers tab, showing current portfolio managers" AutoScroll="True" BodyBorder="False"
TrackMouseOver="true" Border="False" MaskDisabled="False" Stateful="True">
<Content>
<ext:FitLayout ID="FitLayout9" runat="server">
<ext:GridPanel
ID="GridPanel9" runat="server" StripeRows="true" AutoHeight="true" BodyBorder="false" Border="false" TrackMouseOver="True" Stateful="True" AutoExpandColumn="2">
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel9" runat="server" SingleSelect="true" >
</ext:RowSelectionModel>
</SelectionModel>
<LoadMask ShowMask="true" Msg="Loading info..." />
</ext:GridPanel>
</ext:FitLayout>
</Content>
<Listeners>
<Activate Handler="activateTab(9);" />
</Listeners>
</ext:Tab>
</Tabs>
</ext:TabPanel>




<script type="text/javascript">
var activateTab = function(n) {
//todo
}
</script>

<asp:SqlDataSource ID="dsGroups" runat="server" CancelSelectOnNullParameter="false"
ConnectionString="<%$ ConnectionStrings:FUNDSConnectionString %>"
SelectCommand="fl_get_groups" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:QueryStringParameter DefaultValue="EN" QueryStringField="lang" Name="LANG" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="dsSeries" runat="server"
ConnectionString="<%$ ConnectionStrings:FUNDSConnectionString %>"
SelectCommand="fl_get_series_for_group" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter DefaultValue="DOF" Name="GROUP" Type="String" />
<asp:QueryStringParameter DefaultValue="EN" QueryStringField="lang" Name="LANG" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="dsCategories" runat="server"
ConnectionString="<%$ ConnectionStrings:FUNDSConnectionString %>"
SelectCommand="fl_get_asset_classes_for_series_for_group" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter DefaultValue="DOF" Name="GROUP" Type="String" />
<asp:Parameter DefaultValue="A" Name="SERIES" Type="String" />
<asp:QueryStringParameter DefaultValue="EN" QueryStringField="lang" Name="LANG" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="dsCurrencies" runat="server"
ConnectionString="<%$ ConnectionStrings:FUNDSConnectionString %>"
SelectCommand="fl_get_currencies_for_asset_class_for_series_for_g roup" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter DefaultValue="DOF" Name="GROUP" Type="String" />
<asp:Parameter DefaultValue="A" Name="SERIES" Type="String" />
<asp:Parameter DefaultValue="*" Name="ASSETCLASS" Type="String" />
<asp:QueryStringParameter DefaultValue="EN" QueryStringField="lang" Name="LANG" Type="String" />
</SelectParameters>
</asp:SqlDataSource>


here is the code-behind



Public sSelectedGroup As String = ""
Public sSelectedSeries As String = ""
Public sSelectedAssetClass As String = ""
Public iTab As Integer = -1
Public sQSGroup As String = "DIF"


Dim c As Coolite.Ext.Web.Column
Dim gv As Coolite.Ext.Web.GroupingView
Dim curYear As Integer = Year(Date.Now)
Public sLang As String = "EN"
Dim fa As String


Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not (Request("lang") Is Nothing) Then
sLang = Request("lang").ToUpper
End If


If Not (Request("group") Is Nothing) Then
sQSGroup = Request("group").ToUpper
End If


If Not (Request("tab") Is Nothing) Then
iTab = Integer.Parse(Request("tab"))
End If


fa = Request.QueryString("fa")


If Not Ext.IsAjaxRequest Then
If sLang = "EN" Then
AddColumn(GridPanel1, "FundGroupName", "Fund Group", Alignment.Left, 1, "Fund Group")
AddColumn(GridPanel1, "FundGroup", " ", Alignment.Left, 20, "Colour-coded fund group", "group")
AddColumn(GridPanel1, "FundNameFull", "Fund Name", Alignment.Left, 300, "Full name of the fund", "link")
AddColumn(GridPanel1, "FundCategory", "Fund Category", Alignment.Left, 180, "IFSC fund classification")
AddColumn(GridPanel1, "StartDate", "Inception Date", Alignment.Right, 110, "Fund inception date", "date")
AddColumn(GridPanel1, "MER", "MER", Alignment.Right, 60, "Management Expense Ratio", "percent", 2)
AddColumn(GridPanel1, "Assets", "Assets ($m)", Alignment.Right, 130, "Total net assets under management, CDN$ million(s)", "curr", 0)
GridPanel1.StoreID = "storeTabs"


AddColumn(GridPanel11, "FundGroupName", "Fund Group", Alignment.Left, 1, "Fund Group")
AddColumn(GridPanel11, "FundGroup", " ", Alignment.Left, 20, "Colour-coded fund group", "group")
AddColumn(GridPanel11, "FundNameFull", "Fund Name", Alignment.Left, 300, "Full name of the fund", "link")
AddColumn(GridPanel11, "NAVPS", "NAVPS", Alignment.Right, 50, "Net Asset Value Per Share, latest fund unit price", "curr")
AddColumn(GridPanel11, "NAVPSDate", "NAVPS Date", Alignment.Right, 70, "Date of latest NAVPS", "date")
AddColumn(GridPanel11, "NAVPSChange", "Change", Alignment.Right, 50, "NAVPS Change", "decimal")
AddColumn(GridPanel11, "NAVPSChangeDirection", "±", Alignment.Right, 20, "Direction of change", "direction")
AddColumn(GridPanel11, "NAVPSChangePercent", "Change %", Alignment.Right, 70, "NAVPS Change", "decimal")
AddColumn(GridPanel11, "NAVPSPrevious", "Previous", Alignment.Right, 70, "Previous price", "curr")
GridPanel11.StoreID = "storeTabs"


AddColumn(GridPanel2, "FundGroupName", "Fund Group", Alignment.Left, 1, "Fund Group")
AddColumn(GridPanel2, "FundGroup", " ", Alignment.Left, 20, "Colour-coded fund group", "group")
AddColumn(GridPanel2, "FundNameFull", "Fund Name", Alignment.Left, 300, "Full name of the fund", "link")
AddColumn(GridPanel2, "P1Mo", "1Mo", Alignment.Right, 55, "1-month performance", "decimal", 1)
AddColumn(GridPanel2, "P3Mo", "3Mo", Alignment.Right, 55, "3-month performance", "decimal", 1)
AddColumn(GridPanel2, "P6Mo", "6Mo", Alignment.Right, 55, "6-month performance", "decimal", 1)
AddColumn(GridPanel2, "PYTD", "YTD", Alignment.Right, 55, "Year-to-date performance", "decimal", 1)
AddColumn(GridPanel2, "P1Yr", "1Yr", Alignment.Right, 55, "1-year compounded performance", "decimal", 1)
AddColumn(GridPanel2, "P2Yr", "2Yr", Alignment.Right, 55, "2-year compounded performance", "decimal", 1)
AddColumn(GridPanel2, "P3Yr", "3Yr", Alignment.Right, 55, "3-year compounded performance", "decimal", 1)
AddColumn(GridPanel2, "P4Yr", "4Yr", Alignment.Right, 75, "4-year compounded performance", "decimal", 1)
GridPanel2.StoreID = "storeTabs"


AddColumn(GridPanel3, "FundGroupName", "Fund Group", Alignment.Left, 1, "Fund Group")
AddColumn(GridPanel3, "FundGroup", " ", Alignment.Left, 20, "Colour-coded fund group", "group")
AddColumn(GridPanel3, "FundNameFull", "Fund Name", Alignment.Left, 300, "Full name of the fund", "link")
AddColumn(GridPanel3, "P5Yr", "5Yr", Alignment.Right, 0, "5-year compounded performance", "decimal", 1)
AddColumn(GridPanel3, "P7Yr", "7Yr", Alignment.Right, 0, "7-year compounded performance", "decimal", 1)
AddColumn(GridPanel3, "P10Yr", "10Yr", Alignment.Right, 0, "10-year compounded performance", "decimal", 1)
AddColumn(GridPanel3, "P15Yr", "15Yr", Alignment.Right, 0, "15-year compounded performance", "decimal", 1)
AddColumn(GridPanel3, "PInception", "Inception", Alignment.Right, 0, "Compounded performance since inception", "decimal", 1)
AddColumn(GridPanel3, "StartDate", "Inception Date", Alignment.Right, 160, "Fund inception date", "date")
GridPanel3.StoreID = "storeTabs"


AddColumn(GridPanel4, "FundGroupName", "Fund Group", Alignment.Left, 1, "Fund Group")
AddColumn(GridPanel4, "FundGroup", " ", Alignment.Left, 20, "Colour-coded fund group", "group")
AddColumn(GridPanel4, "FundNameFull", "Fund Name", Alignment.Left, 300, "Full name of the fund", "link")
'AddColumn(GridPanel4, "PYTDCAL", curYear.ToString(), Alignment.Right, 0, "Current calendar year: year-to-date performance")
AddColumn(GridPanel4, "PCAL1", (curYear - 1).ToString() &amp; "", Alignment.Right, 46, "Annual (calendar) performance for " + (curYear - 1).ToString(), "decimal", 1)
AddColumn(GridPanel4, "PCAL2", (curYear - 2).ToString() &amp; "", Alignment.Right, 46, "Annual (calendar) performance for " + (curYear - 2).ToString(), "decimal", 1)
AddColumn(GridPanel4, "PCAL3", (curYear - 3).ToString() &amp; "", Alignment.Right, 46, "Annual (calendar) performance for " + (curYear - 3).ToString(), "decimal", 1)
AddColumn(GridPanel4, "PCAL4", (curYear - 4).ToString() &amp; "", Alignment.Right, 46, "Annual (calendar) performance for " + (curYear - 4).ToString(), "decimal", 1)
AddColumn(GridPanel4, "PCAL5", (curYear - 5).ToString() &amp; "", Alignment.Right, 46, "Annual (calendar) performance for " + (curYear - 5).ToString(), "decimal", 1)
AddColumn(GridPanel4, "PCAL6", (curYear - 6).ToString() &amp; "", Alignment.Right, 46, "Annual (calendar) performance for " + (curYear - 6).ToString(), "decimal", 1)
AddColumn(GridPanel4, "PCAL7", (curYear - 7).ToString() &amp; "", Alignment.Right, 46, "Annual (calendar) performance for " + (curYear - 7).ToString(), "decimal", 1)
AddColumn(GridPanel4, "PCAL8", (curYear - 8).ToString() &amp; "", Alignment.Right, 46, "Annual (calendar) performance for " + (curYear - 8).ToString(), "decimal", 1)
AddColumn(GridPanel4, "PCAL9", (curYear - 9).ToString() &amp; "", Alignment.Right, 46, "Annual (calendar) performance for " + (curYear - 9).ToString(), "decimal", 1)
AddColumn(GridPanel4, "PCAL10", (curYear - 10).ToString() &amp; "", Alignment.Right, 65, "Annual (calendar) performance for " + (curYear - 10).ToString(), "decimal", 1)
GridPanel4.StoreID = "storeTabs"


AddColumn(GridPanel5, "FundGroupName", "Fund Group", Alignment.Left, 1, "Fund Group")
AddColumn(GridPanel5, "FundGroup", " ", Alignment.Left, 20, "Colour-coded fund group", "group")
AddColumn(GridPanel5, "FundNameFull", "Fund Name", Alignment.Left, 300, "Full name of the fund", "link")
AddColumn(GridPanel5, "Std3Yr", "SDev 3yr (%)", Alignment.Right, 0, "3-year standard deviation", "decimal")
AddColumn(GridPanel5, "Std5Yr", "SDev 5yr (%)", Alignment.Right, 0, "5-year standard deviation", "decimal")
AddColumn(GridPanel5, "RiskTolerance", "Risk Tolerance", Alignment.Right, 0, "Risk tolerance (1 to 5)", "imgrisk")
GridPanel5.StoreID = "storeTabs"


AddColumn(GridPanel12, "FundGroupName", "Fund Group", Alignment.Left, 1, "Fund Group")
AddColumn(GridPanel12, "FundGroup", " ", Alignment.Left, 20, "Colour-coded fund group", "group")
AddColumn(GridPanel12, "FundNameFull", "Nom du fond", Alignment.Left, 300, "Nom Complet du fond", "link")
AddColumn(GridPanel12, "Best12Mo", "Best 12mo (%)", Alignment.Right, 0, "The fund's best 12-month return during its history", "decimal")
AddColumn(GridPanel12, "Best12MoDate", "End Date", Alignment.Right, 0, "The date that corresponds to the end of the 12-month period for the best 12-month return during its history", "date")
AddColumn(GridPanel12, "Worst12Mo", "Worst 12mo (%)", Alignment.Right, 0, "The fund's worst 12-month return during its history", "decimal")
AddColumn(GridPanel12, "Worst12MoDate", "End Date", Alignment.Right, 0, "The date that corresponds to the end of the 12-month period for the worst 12-month return during its history", "date")
GridPanel12.StoreID = "storeTabs"


AddColumn(GridPanel6, "FundGroupName", "Fund Group", Alignment.Left, 1, "Fund Group")
AddColumn(GridPanel6, "FundGroup", " ", Alignment.Left, 20, "Colour-coded fund group", "group")
AddColumn(GridPanel6, "FundNameFull", "Fund Name", Alignment.Left, 300, "Full name of the fund", "link")
'AddColumn(GridPanel6, "NAV12", "NAV-12mos", Alignment.Right, 0, "Net Asset Value Per Share on the month-end date 12 monthly periods ago, used for calculating yield", "curr")
AddColumn(GridPanel6, "DistFrequency", "Frequency", Alignment.Right, 0, "Distribution frequency")
AddColumn(GridPanel6, "DistType", "Type", Alignment.Right, 0, "Distribution type (fixed or variable)")
AddColumn(GridPanel6, "DistFixedAmount", "Fixed Amount", Alignment.Right, 110, "The predetermined amount for fixed distributions", "curr", 4)
'AddColumn(GridPanel6, "NumDist", "NumDist", Alignment.Right, 0, "Number of distributions during the past 12 months", "decimal")
'AddColumn(GridPanel6, "DistTotal", "Dist Total", Alignment.Right, 0, "Total value of distributions during the past 12 months", "decimal")
AddColumn(GridPanel6, "CurrentYield", "Current Yield (%)", Alignment.Right, 110, "Current yield (%) on actual distributions for the fund during the past 12 months", "percent", 2)
'AddColumn(GridPanel6, "RegularDist", "Regular Dist", Alignment.Right, 0, "Regular monthly distribution, if any, based on the fund's history of distributions during the past 12 months", "decimal")
'AddColumn(GridPanel6, "ImpliedYield", "ImpliedYield", Alignment.Right, 0, "Implied yield based on regular distributions (excluding capital gains and return of capital) during the past 12 months", "decimal")
GridPanel6.StoreID = "storeTabs"


AddColumn(GridPanel7, "FundGroupName", "Fund Group", Alignment.Left, 1, "Fund Group")
AddColumn(GridPanel7, "FundGroup", " ", Alignment.Left, 20, "Colour-coded fund group", "group")
AddColumn(GridPanel7, "FundNameFull", "Fund Name", Alignment.Left, 300, "Full name of the fund", "link")
AddColumn(GridPanel7, "FundCategory", "Fund Category", Alignment.Left, 180, "IFSC fund classification")
AddColumn(GridPanel7, "StyleCapBias", "Cap", Alignment.Left, 60, "Capitalization bias (Small-cap, Mid-cap, Large-cap)")
AddColumn(GridPanel7, "StyleApproach", "Style", Alignment.Left, 60, "Investment style (Value, Blend, Growth)")
AddColumn(GridPanel7, "BenchmarkName", "Benchmark Name", Alignment.Left, 180, "Name of the bechmark/index applicable")
GridPanel7.StoreID = "storeTabs"


AddColumn(GridPanel10, "FundGroupName", "Fund Group", Alignment.Left, 1, "Fund Group")
AddColumn(GridPanel10, "FundGroup", " ", Alignment.Left, 20, "Colour-coded fund group", "group")
AddColumn(GridPanel10, "FundNameFull", "Fund Name", Alignment.Left, 300, "Full name of the fund", "link")
AddColumn(GridPanel10, "MorningstarRating", "Morningstar Rating", Alignment.Left, 400, "Morningstar rating", "imgstar")
GridPanel10.StoreID = "storeTabs"


AddColumn(GridPanel8, "FundGroupName", "Fund Group", Alignment.Left, 1, "Fund Group")
AddColumn(GridPanel8, "FundGroup", " ", Alignment.Left, 20, "Colour-coded fund group", "group")
AddColumn(GridPanel8, "FundNameFull", "Fund Name", Alignment.Left, 300, "Full name of the fund", "link")
AddColumn(GridPanel8, "FundservPrefix", "Prefix", Alignment.Left, 70, "Fundserv code prefix")
AddColumn(GridPanel8, "FundservCodes", "Fund Codes", Alignment.Left, 360, "Fundserv purchase codes for all load types")
GridPanel8.StoreID = "storeTabs"


AddColumn(GridPanel9, "FundGroupName", "Fund Group", Alignment.Left, 1, "Fund Group")
AddColumn(GridPanel9, "FundGroup", " ", Alignment.Left, 20, "Colour-coded fund group", "group")
AddColumn(GridPanel9, "FundNameFull", "Fund Name", Alignment.Left, 300, "Full name of the fund", "link")
AddColumn(GridPanel9, "FundManagers", "Fund Managers", Alignment.Left, 360, "Current portfolio manager(s)")
GridPanel9.StoreID = "storeTabs"


Else
AddColumn(GridPanel1, "FundGroup", " ", Alignment.Left, 20, "Codification couleure des groupes de fonds", "group")
AddColumn(GridPanel1, "FundNameFull", "Nom du fond", Alignment.Left, 400, "Nom complet du fond", "link")
AddColumn(GridPanel1, "FundCategory", "Classification", Alignment.Left, 200, "Classification CFI du fonds")
AddColumn(GridPanel1, "StartDate", "Date de début", Alignment.Right, 100, "Date de début du fonds", "date")
AddColumn(GridPanel1, "MER", "RFG", Alignment.Right, 0, "Ration des frais de gestion", "percent", 2)
AddColumn(GridPanel1, "Assets", "actif (mil. de $)", Alignment.Right, 0, "Total des actifs net sous gestion, million(s) $CDN", "curr", 0)
GridPanel1.StoreID = "storeTabs"


AddColumn(GridPanel11, "FundGroup", " ", Alignment.Left, 20, "Codification couleure des groupes de fonds", "group")
AddColumn(GridPanel11, "FundNameFull", "Nom du fond", Alignment.Left, 400, "Nom complet du fond", "link")
AddColumn(GridPanel11, "NAVPS", "Prix", Alignment.Right, 0, "Prix unitaire par part, le prix le plus récent", "curr")
AddColumn(GridPanel11, "NAVPSDate", "Date de prix", Alignment.Right, 0, "Date du plus récent prix unitaire par part", "date")
AddColumn(GridPanel11, "NAVPSChange", "Change", Alignment.Right, 0, "Change de prix", "decimal")
AddColumn(GridPanel11, "NAVPSChangeDirection", "±", Alignment.Right, 30, "Orientation du changement", "direction")
AddColumn(GridPanel11, "NAVPSChangePercent", "Change %", Alignment.Right, 0, "Per cent change de prix", "decimal")
AddColumn(GridPanel11, "NAVPSPrevious", "Précédent ", Alignment.Right, 0, "Prix précédent", "curr")
GridPanel11.StoreID = "storeTabs"


AddColumn(GridPanel2, "FundGroup", " ", Alignment.Left, 20, "Codification couleure des groupes de fonds", "group")
AddColumn(GridPanel2, "FundNameFull", "Nom du fond", Alignment.Left, 400, "Nom complet du fond", "link")
AddColumn(GridPanel2, "P1Mo", "1mo (%)", Alignment.Right, 0, "Performance 1-mois", "decimal", 1)
AddColumn(GridPanel2, "P3Mo", "3mo (%)", Alignment.Right, 0, "Performance 3-mois", "decimal", 1)
AddColumn(GridPanel2, "P6Mo", "6mo (%)", Alignment.Right, 0, "Performance 6-mois", "decimal", 1)
AddColumn(GridPanel2, "PYTD", "aec (%)", Alignment.Right, 0, "Cumul des performances de l?année en cours", "decimal", 1)
AddColumn(GridPanel2, "P1Yr", "1an (%)", Alignment.Right, 0, "Performance composée 1-année", "decimal", 1)
AddColumn(GridPanel2, "P2Yr", "2an (%)", Alignment.Right, 0, "Performance composée 2-ans", "decimal", 1)
AddColumn(GridPanel2, "P3Yr", "3an (%)", Alignment.Right, 0, "Performance composée 3-ans", "decimal", 1)
AddColumn(GridPanel2, "P4Yr", "4an (%)", Alignment.Right, 0, "Performance composée 4-ans", "decimal", 1)
GridPanel2.StoreID = "storeTabs"


AddColumn(GridPanel3, "FundGroup", " ", Alignment.Left, 20, "Codification couleure des groupes de fonds", "group")
AddColumn(GridPanel3, "FundNameFull", "Nom du fond", Alignment.Left, 400, "Nom complet du fond", "link")
AddColumn(GridPanel3, "P5Yr", "5an (%)", Alignment.Right, 0, "Performance composée 5-ans", "decimal", 1)
AddColumn(GridPanel3, "P7Yr", "7an (%)", Alignment.Right, 0, "Performance composée 7-ans", "decimal", 1)
AddColumn(GridPanel3, "P10Yr", "10an (%)", Alignment.Right, 0, "Performance composée 10-ans", "decimal", 1)
AddColumn(GridPanel3, "P15Yr", "15an (%)", Alignment.Right, 0, "Performance composée 20-ans", "decimal", 1)
AddColumn(GridPanel3, "PInception", "Depuis début (%)", Alignment.Right, 0, "Performance composée depuis le début du fonds", "decimal", 1)
AddColumn(GridPanel3, "StartDate", "Date de début", Alignment.Right, 140, "Date de début du fonds", "date")
GridPanel3.StoreID = "storeTabs"


AddColumn(GridPanel4, "FundGroup", " ", Alignment.Left, 20, "Codification couleure des groupes de fonds", "group")
AddColumn(GridPanel4, "FundNameFull", "Nom du fond", Alignment.Left, 400, "Nom complet du fond", "link")
'AddColumn(GridPanel4, "PYTDCAL", curYear.ToString(), Alignment.Right, 0, "Année calendrier actuel: performance de l?année en cour")
AddColumn(GridPanel4, "PCAL1", (curYear - 1).ToString() &amp; " (%)", Alignment.Right, 0, "Performance annuelle (calendrier) pour " + (curYear - 1).ToString(), "decimal", 1)
AddColumn(GridPanel4, "PCAL2", (curYear - 2).ToString() &amp; " (%)", Alignment.Right, 0, "Performance annuelle (calendrier) pour " + (curYear - 2).ToString(), "decimal", 1)
AddColumn(GridPanel4, "PCAL3", (curYear - 3).ToString() &amp; " (%)", Alignment.Right, 0, "Performance annuelle (calendrier) pour " + (curYear - 3).ToString(), "decimal", 1)
AddColumn(GridPanel4, "PCAL4", (curYear - 4).ToString() &amp; " (%)", Alignment.Right, 0, "Performance annuelle (calendrier) pour " + (curYear - 4).ToString(), "decimal", 1)
AddColumn(GridPanel4, "PCAL5", (curYear - 5).ToString() &amp; " (%)", Alignment.Right, 0, "Performance annuelle (calendrier) pour " + (curYear - 5).ToString(), "decimal", 1)
AddColumn(GridPanel4, "PCAL6", (curYear - 6).ToString() &amp; " (%)", Alignment.Right, 0, "Performance annuelle (calendrier) pour " + (curYear - 6).ToString(), "decimal", 1)
AddColumn(GridPanel4, "PCAL7", (curYear - 7).ToString() &amp; " (%)", Alignment.Right, 0, "Performance annuelle (calendrier) pour " + (curYear - 7).ToString(), "decimal", 1)
AddColumn(GridPanel4, "PCAL8", (curYear - 8).ToString() &amp; " (%)", Alignment.Right, 0, "Performance annuelle (calendrier) pour " + (curYear - 8).ToString(), "decimal", 1)
AddColumn(GridPanel4, "PCAL9", (curYear - 9).ToString() &amp; " (%)", Alignment.Right, 0, "Performance annuelle (calendrier) pour " + (curYear - 9).ToString(), "decimal", 1)
AddColumn(GridPanel4, "PCAL10", (curYear - 10).ToString() &amp; " (%)", Alignment.Right, 0, "Performance annuelle (calendrier) pour " + (curYear - 10).ToString(), "decimal", 1)
GridPanel4.StoreID = "storeTabs"


AddColumn(GridPanel5, "FundGroup", " ", Alignment.Left, 20, "Codification couleure des groupes de fonds", "group")
AddColumn(GridPanel5, "FundNameFull", "Nom du fond", Alignment.Left, 400, "Nom complet du fond", "link")
AddColumn(GridPanel5, "Std3Yr", "Dev-s 3an (%)", Alignment.Right, 0, "Déviation standard 3-ans", "decimal")
AddColumn(GridPanel5, "Std5Yr", "Dev-s 5an (%)", Alignment.Right, 0, "Déviation standard 5-ans", "decimal")
AddColumn(GridPanel5, "RiskTolerance", "Tolérance aux Risques", Alignment.Right, 0, "Tolérance aux Risques (1-5)", "imgrisk")
GridPanel5.StoreID = "storeTabs"


AddColumn(GridPanel12, "FundGroup", " ", Alignment.Left, 20, "Codification couleure des groupes de fonds", "group")
AddColumn(GridPanel12, "FundNameFull", "Nom du fond", Alignment.Left, 400, "Nom Complet du fond", "link")
AddColumn(GridPanel12, "Best12Mo", "Meilleur 12 mois (%)", Alignment.Right, 0, "Les meilleurs 12 mois du fond au cours depuis sa début", "decimal")
AddColumn(GridPanel12, "Best12MoDate", "End Date", Alignment.Right, 0, "La date qui correspond à la fin de la période des meilleurs 12 mois du fond au cours depuis sa début", "date")
AddColumn(GridPanel12, "Worst12Mo", "Pire 12 mois (%)", Alignment.Right, 0, "Les pires 12 mois du fond au cours depuis sa début", "decimal")
AddColumn(GridPanel12, "Worst12MoDate", "End Date", Alignment.Right, 0, "La date qui correspond à la fin de la période des pires 12 mois du fond au cours depuis sa début", "date")
GridPanel12.StoreID = "storeTabs"


AddColumn(GridPanel6, "FundGroup", " ", Alignment.Left, 20, "Codification couleure des groupes de fonds", "group")
AddColumn(GridPanel6, "FundNameFull", "Nom du fond", Alignment.Left, 400, "Nom complet du fond", "link")
'AddColumn(GridPanel6, "NAV12", "Prix-12mois", Alignment.Right, 0, "Prix unitaire par part en fin de mois d?il y a du 12 mois, utiliser pour calcul du rendement", "curr")
AddColumn(GridPanel6, "DistFrequency", "Fréquence", Alignment.Right, 0, "Fréquence de distribution")
AddColumn(GridPanel6, "DistType", "Type", Alignment.Right, 0, "Type de distribution (fixe ou variable) ")
AddColumn(GridPanel6, "DistFixedAmount", "Montant fixe", Alignment.Right, 0, "Le montant prédéterminé pour la distribution fixe", "decimal")
'AddColumn(GridPanel6, "NumDist", "NumDist", Alignment.Right, 0, "Nombre de distributions pendant les 12 derniers mois", "decimal")
'AddColumn(GridPanel6, "DistTotal", "Dist Total", Alignment.Right, 0, "Valeur Totale de la distribution pendant les 12 derniers mois", "decimal")
AddColumn(GridPanel6, "CurrentYield", "Rendement actuel (%)", Alignment.Right, 0, "Rendement actuel (%) sur la distribution du fond pendant les 12 derniers mois", "decimal")
'AddColumn(GridPanel6, "RegularDist", "Regular Dist", Alignment.Right, 0, "Distribution mensuel, si existante, basée sur l?historique de la distribution du fond pendant les 12 derniers mois", "decimal")
'AddColumn(GridPanel6, "ImpliedYield", "ImpliedYield", Alignment.Right, 0, "Rendement presume base sur une distribution régulière (excluant le gain de capital et le retour de capital ) pendant les 12 derniers mois", "decimal")
GridPanel6.StoreID = "storeTabs"


AddColumn(GridPanel7, "FundGroup", " ", Alignment.Left, 20, "Codification couleure des groupes de fonds", "group")
AddColumn(GridPanel7, "FundNameFull", "Nom du fond", Alignment.Left, 400, "Nom Complet du fond", "link")
AddColumn(GridPanel7, "FundCategory", "Classification", Alignment.Left, 300, "Classification CFI du fond")
AddColumn(GridPanel7, "StyleCapBias", "Capitalisation", Alignment.Left, 100, "Tendance de la capitalisation (Plafond bas, Plafond moyen, Plafond haut)")
AddColumn(GridPanel7, "StyleApproach", "Style", Alignment.Left, 100, "Style d?investissement (Valeur, Mélange, Croissance)")
AddColumn(GridPanel7, "BenchmarkName", "Benchmark Name", Alignment.Left, 400, "Nom du point de reference/de l?index applicable")
GridPanel7.StoreID = "storeTabs"


AddColumn(GridPanel10, "FundGroup", " ", Alignment.Left, 20, "Codification couleure des groupes de fonds", "group")
AddColumn(GridPanel10, "FundNameFull", "Nom du fond", Alignment.Left, 400, "Nom Complet du fond", "link")
AddColumn(GridPanel10, "MorningstarRating", "Classification Morningstar", Alignment.Left, 400, "Classification Morningstar", "imgstar")
GridPanel10.StoreID = "storeTabs"


AddColumn(GridPanel8, "FundGroup", " ", Alignment.Left, 20, "Codification couleure des groupes de fonds", "group")
AddColumn(GridPanel8, "FundNameFull", "Nom du fond", Alignment.Left, 400, "Nom Complet du fond", "link")
AddColumn(GridPanel8, "FundservPrefix", "Préfixe", Alignment.Left, 70, "Préfixe du code Fundsev")
AddColumn(GridPanel8, "FundservCodes", "Code du Fond", Alignment.Left, 600, "Code d?achat Fundserv par types de frais")
GridPanel8.StoreID = "storeTabs"


AddColumn(GridPanel9, "FundGroup", " ", Alignment.Left, 20, "Codification couleure des groupes de fonds", "group")
AddColumn(GridPanel9, "FundNameFull", "Nom du fond", Alignment.Left, 400, "Nom Complet du fond", "link")
AddColumn(GridPanel9, "FundManagers", "Gestionnaire du fond", Alignment.Left, 600, "Gestionnaire(s) actuel du portefueille")
GridPanel9.StoreID = "storeTabs"


tabPanel.Title = "Fund Listings"
Tab1.Title = "Aperçu"
Tab1.TabTip = "Onglet de l'aperçu général : visualiser le dernier prix unitaire par part, catégorie, ration des frais de gestion, et actifs"
Tab2.Title = "???Récente"
Tab2.TabTip = "Onglet de performance ???récente : visualiser les retours pour 1-mois à 4-année"
Tab3.Title = "Long terme"
Tab3.TabTip = "Onglet de la performance à long terme : visualiser les retours de 5-ans à 20-ans"
Tab4.Title = "Calendrier"
Tab4.TabTip = "Onglet de la performance annuelle (année calendrier) : visualiser les performances aucours des 10 dernières années calendriers"
Tab5.Title = "Risque"
Tab5.TabTip = "Onglet du risque : visualiser la déviation standard et la tolérance aux risques"
Tab6.Title = "Revenu"
Tab6.TabTip = "Onglet du revenu : visualiser la distribution et le rendement"
Tab7.Title = "Style"
Tab7.TabTip = "Onglet du style : style de gestion, approche d'investissement, repère"
Tab8.Title = "Codes"
Tab8.TabTip = "Onglet de code des fonds : visualiser les codes d'achat Fundserv par type de frais"
Tab9.Title = "Gestionnaires"
Tab9.TabTip = "Onglet de gestionnaires : visualiser les gestionnaires de fonds actuels"
Tab10.Title = "Classification"
Tab10.TabTip = "Onglet de classification Morningstar"
Tab11.Title = "Prix unitaire"
Tab11.TabTip = "Onglet de prix unitaire par part : visualiser le dernier prix unitaire par part"
Tab12.Title = "Meilleur/Pire"
Tab12.TabTip = "Onglet Meilleur/Pire : visualiser le meilleur et le pire 12 mois du fond au cours depuis sa début"


lblFundGroup.Text = "Groupe de Fonds"
lblSeries.Text = "Séries"
lblAssetClass.Text = "Groupe d?actifs"
lblCurrency.Text = "Monnaie"


GridPanel1.LoadMask.Msg = "Téléchargement de l&amp;rsquo;information..."
GridPanel2.LoadMask.Msg = "Téléchargement de l&amp;rsquo;information..."
GridPanel3.LoadMask.Msg = "Téléchargement de l&amp;rsquo;information..."
GridPanel4.LoadMask.Msg = "Téléchargement de l&amp;rsquo;information..."
GridPanel5.LoadMask.Msg = "Téléchargement de l&amp;rsquo;information..."
GridPanel6.LoadMask.Msg = "Téléchargement de l&amp;rsquo;information..."
GridPanel7.LoadMask.Msg = "Téléchargement de l&amp;rsquo;information..."
GridPanel8.LoadMask.Msg = "Téléchargement de l&amp;rsquo;information..."
GridPanel9.LoadMask.Msg = "Téléchargement de l&amp;rsquo;information..."
GridPanel10.LoadMask.Msg = "Téléchargement de l&amp;rsquo;information..."
GridPanel11.LoadMask.Msg = "Téléchargement de l&amp;rsquo;information..."
GridPanel12.LoadMask.Msg = "Téléchargement de l&amp;rsquo;information..."


storeSeries.AjaxPostBackConfig.EventMask.Msg = "Chargement des statistiques de série de fonds..."
storeCategories.AjaxPostBackConfig.EventMask.Msg = "Chargement des statistiques de groupe d?actifs..."
storeCurrencies.AjaxPostBackConfig.EventMask.Msg = "Chargement des statistiques de monnaie..."


ddlGroups.EmptyText = "Choisissez un groupe"
ddlSeries.EmptyText = "Téléchargement"
ddlCategory.EmptyText = "Téléchargement"
ddlCurrency.EmptyText = "Téléchargement"
End If


GridPanel1.View.Add(MakeNewGroupingView())
GridPanel2.View.Add(MakeNewGroupingView())
GridPanel3.View.Add(MakeNewGroupingView())
GridPanel4.View.Add(MakeNewGroupingView())
GridPanel5.View.Add(MakeNewGroupingView())
GridPanel6.View.Add(MakeNewGroupingView())
GridPanel7.View.Add(MakeNewGroupingView())
GridPanel8.View.Add(MakeNewGroupingView())
GridPanel9.View.Add(MakeNewGroupingView())
GridPanel10.View.Add(MakeNewGroupingView())
GridPanel11.View.Add(MakeNewGroupingView())
GridPanel12.View.Add(MakeNewGroupingView())


If iTab >= 0 Then tabPanel.ActiveTabIndex = iTab
End If
End Sub


Protected Function MakeNewGroupingView() As GroupingView
Dim gv As GroupingView = New GroupingView()
gv.HideGroupedColumn = True
gv.ForceFit = True
gv.AutoFill = True
gv.StartCollapsed = False
If sLang = "EN" Then
gv.GroupTextTpl = "{text} ({[values.rs.length]} {[values.rs.length > 1 ? ""funds"" : ""fund""]})"
Else
gv.GroupTextTpl = "{text} ({[values.rs.length]} {[values.rs.length > 1 ? ""fonds"" : ""fonds""]})"
End If


Return gv
End Function


Protected Sub dsGroups_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEv entArgs) Handles dsGroups.Selecting
e.Command.Parameters("@LANG").Value = sLang
End Sub


Protected Sub dsSeries_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEv entArgs) Handles dsSeries.Selecting
'If Ext.IsAjaxRequest Then
If ddlGroups.SelectedItem.Value <> "" Then
e.Command.Parameters("@GROUP").Value = ddlGroups.SelectedItem.Value
Else
e.Command.Parameters("@GROUP").Value = "*"
End If
'End If
End Sub


Protected Sub dsCategories_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEv entArgs) Handles dsCategories.Selecting
'If Ext.IsAjaxRequest Then
If ddlGroups.SelectedItem.Value <> "" Then
e.Command.Parameters("@GROUP").Value = ddlGroups.SelectedItem.Value
Else
e.Command.Parameters("@GROUP").Value = "*"
End If


If ddlSeries.SelectedItem.Value <> "" Then
e.Command.Parameters("@SERIES").Value = ddlSeries.SelectedItem.Value
Else
e.Command.Parameters("@SERIES").Value = "*"
End If
'End If
End Sub


Protected Sub dsCurrencies_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEv entArgs) Handles dsCurrencies.Selecting
'If Ext.IsAjaxRequest Then
If ddlGroups.SelectedItem.Value <> "" Then
e.Command.Parameters("@GROUP").Value = ddlGroups.SelectedItem.Value
Else
e.Command.Parameters("@GROUP").Value = "*"
End If


If ddlSeries.SelectedItem.Value <> "" Then
e.Command.Parameters("@SERIES").Value = ddlSeries.SelectedItem.Value
Else
e.Command.Parameters("@SERIES").Value = "*"
End If
If ddlCategory.SelectedItem.Value <> "" Then
e.Command.Parameters("@ASSETCLASS").Value = ddlCategory.SelectedItem.Value
Else
e.Command.Parameters("@ASSETCLASS").Value = "*"
End If
'End If
End Sub


Protected Sub dsTabs_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEv entArgs) Handles dsTabs.Selecting
If Ext.IsAjaxRequest Then
If ddlGroups.SelectedItem.Value <> "" Then
e.Command.Parameters("@FUNDGROUP").Value = ddlGroups.SelectedItem.Value
Else
e.Command.Parameters("@FUNDGROUP").Value = "*"
End If


If ddlSeries.SelectedItem.Value <> "" Then
e.Command.Parameters("@SERIES").Value = ddlSeries.SelectedItem.Value
Else
e.Command.Parameters("@SERIES").Value = "*"
End If


If ddlCategory.SelectedItem.Value <> "" Then
e.Command.Parameters("@CATEGORYCODE").Value = ddlCategory.SelectedItem.Value
Else
e.Command.Parameters("@CATEGORYCODE").Value = "*"
End If


If ddlCurrency.SelectedItem.Value <> "" Then
e.Command.Parameters("@CURRENCY").Value = ddlCurrency.SelectedItem.Value
Else
e.Command.Parameters("@CURRENCY").Value = "*"
End If


e.Command.Parameters("@LANG").Value = sLang
End If
End Sub


Protected Sub storeTabs_RefreshData(ByVal sender As Object, ByVal e As Coolite.Ext.Web.StoreRefreshDataEventArgs)
If Ext.IsAjaxRequest Then
Me.storeTabs.DataBind()
End If
End Sub


Private Sub AddColumn(ByRef theGrid As Coolite.Ext.Web.GridPanel, ByVal dataIndex As String, ByVal header As String, ByVal alignment As Coolite.Ext.Web.Alignment, ByVal width As Integer, ByVal colTip As String, Optional ByVal RenderType As String = Nothing, Optional ByVal DecimalPlaces As Integer = 2)
c = New Coolite.Ext.Web.Column
c.DataIndex = dataIndex
c.Header = header
c.Align = alignment
c.Tooltip = colTip
If RenderType = "group" Then
c.Resizable = False
'c.MenuDisabled = False
End If
c.MenuDisabled = True
If width > 0 Then c.Width = width
Dim renderer As New Coolite.Ext.Web.Renderer
Dim sDateFormat As String = "m/d/Y"
If sLang = "FR" Then sDateFormat = "Y/m/d"


Select Case RenderType
Case "date"
renderer.Fn = "Ext.util.Format.dateRenderer('" &amp; sDateFormat &amp; "')"
Case "link"
renderer.Handler = "return myLinkRenderer(record.data['" &amp; dataIndex &amp; "'],'" &amp; sLang &amp; "',record.data['FundCode'], record.data['SeriesName'],record.data['Currency'],'" &amp; fa &amp; "')"
Case "curr"
renderer.Handler = "return myCurrencyRenderer(record.data['" &amp; dataIndex &amp; "'],'" &amp; sLang &amp; "'," &amp; DecimalPlaces &amp; ")"
Case "decimal"
renderer.Handler = "return myDecimalRenderer(record.data['" &amp; dataIndex &amp; "'],'" &amp; sLang &amp; "'," &amp; DecimalPlaces &amp; ")"
Case "percent"
renderer.Handler = "return myPercentRenderer(record.data['" &amp; dataIndex &amp; "'],'" &amp; sLang &amp; "'," &amp; DecimalPlaces &amp; ")"
Case "imgstar"
renderer.Handler = "return myImageRenderer(record.data['" &amp; dataIndex &amp; "'])"
Case "direction"
renderer.Handler = "return myDirectionRenderer(record.data['" &amp; dataIndex &amp; "'])"
Case "group"
renderer.Handler = "return myGroupRenderer(record.data['" &amp; dataIndex &amp; "'])"
Case "imgrisk"
renderer.Handler = "return myImgRiskRenderer(record.data['" &amp; dataIndex &amp; "'])"
End Select


c.Renderer = renderer


theGrid.ColumnModel.Columns.Add(c)
End Sub


and here is some javascript being used to pre-populate the combo boxes, which I have disabled for now. I'd rather have them stateful.



<script language="javascript" type="text/javascript">
var setFirstValue = function(el, s) {
// uses sQSGroup passed from querystring
var theValue, thePreconfiguredValue;

theValue = el.store.getAt(0).get(s);

switch(s) {
case 'ClientGroup':
thePreconfiguredValue = sQSGroup;
sQSGroup = '';
break;
case 'SeriesCode':
thePreconfiguredValue = el.store.getAt(0).get(s);
break;
case 'FundCategoryCode':
thePreconfiguredValue = el.store.getAt(0).get(s);
break;
case 'CurrencyCode':
thePreconfiguredValue = el.store.getAt(0).get(s);
break;
default:
thePreconfiguredValue = '';
}

if (thePreconfiguredValue != '') {
theValue = thePreconfiguredValue;
}

////////disable for now to test if Stateful works
////////el.setValue(theValue);
}
</script>

geoffrey.mcgill
Nov 21, 2008, 12:21 PM
Hi Peter,

This is a common problem with "ajax" enabled web applications. We have a possible solution, although I need to do some testing. If you can give me a couple days, I should be able to put together a sample for you. 

peterdiplaros
Nov 21, 2008, 12:24 PM
Please try as soon as you can.
Peter