2X faster development
The ultimate ASP.NET Web Forms UI toolkit to boost your development speed.
This KB illustrates that how to pass additional information from client-side to server-side. SolutionYou can pass the cube name or any other additional information to the control through custom object. The following code example explains this. JS<div> <select id="cube"> <option value="Adventure">Adventure</option> <option value="Mined">Mined</option> </select> </div> <script type="text/javascript"> $("#PivotChart").ejPivotChart({ url: "../wcf/OlapChartService.svc" }); $(function () { $("#cube").ejDropDownList({ fields: { text: "option" }, width: "100px" }); ddlTarget = $('#cube').data("ejDropDownList"); ddlTarget.setSelectedText(ddlTarget.items[0].innerHTML); $("#cube").ejDropDownList("option", "change", "CubeChange"); }); function CubeChange(args) { $("#PivotChart").remove(); var chartpanel = ej.buildTag("div#OlapChart")[0].outerHTML; $(chartpanel).appendTo(".control"); $("#PivotChart").ejPivotChart({ url: "../wcf/OlapChartService.svc", customObject: { CubeName: args.value } }); } </script> MVC<div> <select id="cube"> <option value="Adventure">Adventure</option> <option value="Mined">Mined</option> </select> </div> <div class="control"> @Html.EJ().Pivot().PivotChart("PivotChart").Url(Url.Content("~/wcf/OlapChartService.svc")) </div> <script> $(function () { $("#cube").ejDropDownList({ fields: { text: "option" }, width: "100px" }); ddlTarget = $('#cube').data("ejDropDownList"); ddlTarget.setSelectedText(ddlTarget.items[0].innerHTML); $("#cube").ejDropDownList("option", "change", "CubeChange"); }); function CubeChange(args) { $("#PivotChart").remove(); var chartpanel = ej.buildTag("div#PivotChart")[0].outerHTML; $(chartpanel).appendTo(".control"); $("#PivotChart").ejPivotChart({ url: "../wcf/OlapChartService.svc", customObject: { CubeName: args.value } }); } </script> ASP.NET<div> <select id="cube"> <option value="Adventure">Adventure</option> <option value="Mined">Mined</option> </select> </div> <ej:PivotChart ID="PivotChart" runat="server" Url="../wcf/OlapChartService.svc"></ej:PivotChart> <script> $(function () { $("#cube").ejDropDownList({ fields: { text: "option" }, width: "100px" }); ddlTarget = $('#cube').data("ejDropDownList"); ddlTarget.setSelectedText(ddlTarget.items[0].innerHTML); $("#cube").ejDropDownList("option", "change", "CubeChange"); }); function CubeChange(args) { $("#PivotChart").remove(); var chartpanel = ej.buildTag("div#PivotChart")[0].outerHTML; $(chartpanel).appendTo(".control"); $("#PivotChart").ejOlapChart({ url: "../wcf/OlapChartService.svc", customObject: { CubeName: args.value } }); } </script>
|
2X faster development
The ultimate ASP.NET Web Forms UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.