Current filter:
                                You should refresh the page.
                                  • Hi,

                                    How i can apply the filter on Web dashboard based on the value i get from query string ?

                                    Thanks,
                                    Venkat

                                Show all comments
                                • John (DevExpress Support) 10.10.2019

                                  Hello Venkat,

                                  Your question is unclear. Would you please clarify the following points:

                                  1. What kind of filter do you wish to apply to a dashboard in our application? Our dashboards support multiple types of filters: Master Filtering, Item's Filtering, DataSource Filtering, etc.
                                  2. Do you manually perform the query (whose value you need to apply the filter) or do you wish to get values from a query performed by the Web Dashboard control?
                                • Venkata Pavan 10.10.2019

                                  Hi John,

                                  Thanks for proving the filter types :

                                  As per my requirement i need to apply Master Filter across all charts.

                                  I have below mentioned tree view for selecting the required value.

                                  [XML]
                                  <TreeView ComponentName="treeViewDashboardItem1" Name="Build/Serial Number" DataSource="dashboardSqlDataSource3" DataMember="Data_View" IsMasterFilterCrossDataSource="true" EnableSearch="true"> <InteractivityOptions IgnoreMasterFilters="false" /> <DataItems> <Dimension DataMember="Build" DefaultId="DataItem0" /> <Dimension DataMember="Number" DefaultId="DataItem1" /> <Dimension DataMember="Name" DefaultId="DataItem2" /> </DataItems> <FilterDimensions> <Dimension DefaultId="DataItem0" /> <Dimension DefaultId="DataItem2" /> <Dimension DefaultId="DataItem1" /> </FilterDimensions> </TreeView>

                                  My requirement is to load all/single values based on the value i get from querystring.

                                  How can i apply Master filter based on values i get from querystring ?

                                  Thanks,
                                  Venkat

                                • John (DevExpress Support) 10.11.2019

                                  Hello Venkat,

                                  If you wish to specify initially selected values for the TreeView filter item, handle the server-side DashboardExtensionSettings.InitialDashboardState event. This event allows specifying the initial state of a dashboard, not only master filters but also Drill-Down states, Dashboard Parameters' values and other state elements described in the Manage Dashboard State topic.

                                  If you wish to set master filers at runtime, use the client-side ASPxClientDashboard.SetDashboardState or ASPxClientDashboard.SetMasterFilter(itemName, values) methods.

                                • Venkata Pavan 10.14.2019

                                  Hi John,

                                  Thanks for providing the links.

                                  I went thru all the links you provided ..

                                  In ASPxClientDashboard.SetMasterFilter(itemName, values) link, i see  SetMasterFilter method in initializeFilters class.

                                  To use that method :

                                  Do i need add Ajax call for for getting the querystring value to MasterFiltering.js ?
                                  or  is there any way to pass the value from controller to MasterFiltering.js ?

                                  Thanks,
                                  Venkat

                                • John (DevExpress Support) 10.15.2019

                                  Hi Venkata,

                                  You can use JavaScript standard methods to get values from the query string and then pass them to the SetMasterFilter method. For instance, review the How can I get query string values in JavaScript? topic where a similar task was discussed. I suggest you can find much useful information regarding the task in Internet in public resources.

                                • Venkata Pavan 10.15.2019

                                  Hi John,

                                  looks like you don't understood my question.

                                  I am able to extract the values from Querystring.

                                  My question is how to pass those values to javascript file.(I achieved through ajax call)

                                  [XML]
                                  <TreeView ComponentName="treeViewDashboardItem1" Name="Build/Serial Number" DataSource="dashboardSqlDataSource3" DataMember="ServoTorqueMetrics_Pithos_Data_View" IsMasterFilterCrossDataSource="true" EnableSearch="true"> <InteractivityOptions IgnoreMasterFilters="false" /> <DataItems> <Dimension DataMember="Build" DefaultId="DataItem0" /> <Dimension DataMember="Unit Number" DefaultId="DataItem1" /> <Dimension DataMember="TestName" DefaultId="DataItem2" /> </DataItems> <FilterDimensions> <Dimension DefaultId="DataItem0" /> <Dimension DefaultId="DataItem2" /> <Dimension DefaultId="DataItem1" /> </FilterDimensions> </TreeView>

                                  How can i set these 3 dimensions from javascript ?

                                  i found below mentioned code related to button..How can do the same for Treeview ?

                                  [JavaScript]
                                  function setParameterValues() { $("#setParameterValuesButton").dxButton({ text: 'Specify parameter values', onClick: function () { var parameters = webViewer.GetParameters(); var parameter1 = parameters.GetParameterByName("categoryParameter"), parameter2 = parameters.GetParameterByName("startDateParameter"); parameter1.SetValue("Condiments"); parameter2.SetValue(new Date(2015, 3, 1)); } }); $("#showParametersForm").dxButton({ text: 'Show Parameters Form', onClick: function () { webViewer.ShowParametersDialog(); } }); };

                                  Thanks,
                                  Venkat

                                • Venkata Pavan 10.16.2019

                                  Hi John,

                                  [JavaScript]
                                  function setParameterValues() { $("#setParameterValuesButton").dxButton({ text: 'Specify parameter values', onClick: function () { var parameters = webViewer.GetParameters(); var parameter1 = parameters.GetParameterByName("categoryParameter"), parameter2 = parameters.GetParameterByName("startDateParameter"); parameter1.SetValue("Condiments"); parameter2.SetValue(new Date(2015, 3, 1)); } }); $("#showParametersForm").dxButton({ text: 'Show Parameters Form', onClick: function () { webViewer.ShowParametersDialog(); } }); };

                                  How can i do the same like setting 3 dimensions in my Tree View ? 

                                • John (DevExpress Support) 10.16.2019

                                  Hi Venkata,

                                  The code snippet you provided relates to dashboard parameters and is not applicable to filter items. To select values in the Tree View filter item use the ASPxClientDashboard.SetMasterFilter(itemName, values) method that I mentioned in my previous post. The corresponding help topic contains a useful code snippet demonstrating how to use this method. Also it contains a link to a complete sample project demonstrating this method in action.

                                • Venkata Pavan 10.16.2019

                                  Hi John,

                                  Thanks for providing the link.

                                  I am able to apply the filter and treeview is getting filtered when i click on button.

                                  One thing i am not able to do is setting the filters while loading.

                                  Which client side Event should i use to set the filter while loading dashboard ?

                                  looks like init is not working.

                                  Thanks,
                                  Venkat

                                • John (DevExpress Support) 10.17.2019

                                  Hi Venkat,

                                  If you wish to specify Master filter values, before the dashboard and data has been loaded, handle the server-side DashboardExtensionSettings.InitialDashboardState event.
                                  The client side control does not provide a similar event. So if you wish to set master filter values on the client side handle the ItemEndUpdate event as shown below:

                                  [JavaScript]
                                  var setFilter = true; function onItemEndUpdate(s, args){ if (args.ItemName === " your master filter name" && setFilter) { ASPxDashboard1.SetMasterFilter..... setFilter = false; } }

                                0 Solutions

                                Creation Date Importance Sort by