iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
how add ChartPivotFilterConfig in server side
Dim settings As ChartFilterDataSettings = e.ChartConfig.ChartFilterCollection
' I want to add this code in the server side
(<ChartCategoryCollection><ISWebGrid:ChartPivotFilterConfig DataMember="ubicacion" DateFormat="" /> </ChartCategoryCollection> )
this for config my report
The ChartImageProcessing event handler could not be used if you wish to add the data or category in the drop zone. You will need to use the Page_Load event handler.
If the ActionName conditional does not work you could try checking if the data or category is already available in the collection and if not add it to the collection. Here is the snippet:
Sub page_load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load If wgTest.ChartCategoryCollection.Exists("Interest") = False Then wgTest.ChartCategoryCollection.Add(New ChartPivotFilterConfig() With {.DataMember = "Interest"}) wgTest.ChartDataCollection.Add(New ChartPivotDataConfig() With {.DataMember = "ID"}) End If End Sub
You will need to add a new ChartPivotDataConfig in the chart data collection and a new ChartPivotFilterConfig in the char category collection. Here is the snippet, I'm using lambda expression to insert the property in the object:
Protected Sub WebGrid1_ChartImageProcessing(ByVal sender As Object, ByVal e As ISNet.WebUI.WebGrid.Chart.WebGridChartEventArgs) Handles WebGrid1.ChartImageProcessing e.ChartConfig.ChartDataCollection.Add(New ChartPivotDataConfig() With {.DataMember = "ID"}) e.ChartConfig.ChartCategoryCollection.Add(New ChartPivotFilterConfig() With {.DataMember = "Interest"})End Sub
please give me your lambda expression, because i can't reproduce your example
thanks
I wrote this code, and apply filters and pivot class but does not show the filter field in eyelashes
ProtectedSubWebGrid2_ChartImageProcessing(ByValsender AsObject, ByVale AsISNet.WebUI.WebGrid.Chart.WebGridChartEventArgs) HandlesWebGrid2.ChartImageProcessing
DimCHARPIVOT AsChartPivotDataConfig = NewChartPivotDataConfig
CHARPIVOT.DataMember = "quantity"
CHARPIVOT.AutoCalc = AutoCalc.Sum
Dim ChartPivotFilter As ChartPivotFilterConfig = New ChartPivotFilterConfig ChartPivotFilter.DataMember = "ubicacion"
e.ChartConfig.ChartDataCollection.Add(CHARPIVOT)
e.ChartConfig.ChartCategoryCollection.Add(ChartPivotFilter)
End Sub
We call the area Drop Zone, and in order to show the field in the drop zone you will need to fill the collection during page load server side event handler. You could determine if the grid is in charting mode by inspecting the ActionMode property. Here is the snippet for C#:
protected void Page_Load(object sender, EventArgs e){ if (wgTest.ActionName == "Charting") { wgTest.ChartCategoryCollection.Add(new ChartPivotFilterConfig() { DataMember = "Interest" }); wgTest.ChartDataCollection.Add(new ChartPivotDataConfig() { DataMember = "ID" }); }}
In my previous snippet, I use lambda expression in order to fill the property of the ChartPivotDataConfig and ChartPivotFilterConfig property, for example:
New ChartPivotDataConfig() With {.DataMember = "ID"}New ChartPivotFilterConfig() With {.DataMember = "Interest"}
From your snippet this will be:
New ChartPivotDataConfig() With {.DataMember = "quantity", .AutoCalc = AutoCalc.Sum}New ChartPivotFilterConfig() With {.DataMember = "ubicacion"}
hello good day. I'm using the Page_Load method or WebGrid2_ChartImageProcessing but does not display filter fields in the report (photo dont_show.JPG), see Picture2 (show.JPG) here shows the filter fields in the report. I want to do this for server code.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
OR
Hi . Thanks Glenn Layaar
i finish my ex
i using the 2 dropdownnlist show columns and chose data need show to chart
here is my EX:
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { ChartPivotDataConfig t = new ChartPivotDataConfig(); t.DataMember = DropDownList1.SelectedValue; ; t.AutoCalc = AutoCalc.Count; WebGrid1.ChartDataCollection.Add(t); }
protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e) { ChartPivotFilterConfig t1 = new ChartPivotFilterConfig(); t1.DataMember = DropDownList2.SelectedValue; ; WebGrid1.ChartCategoryCollection.Add(t1); }
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname