Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
45
Access to ultrapivot grid Filters
posted

Hi

I would like to know if it´s possible to access by code to the manual fiters you make in the ultrapivotgrid component. Take a look at the picture.

Thanks, Gorka.

Parents
  • 100
    Offline posted

    Hello Gorka,

    You can add or remove Columns & Rows via the public method exposed by the datasource of the WinPivotGrid. Please refer to the below sample of code, adding extra column with the click of a button:

    private void ultraButton1_Click(object sender, EventArgs e)
            {
                var ds = this.ultraPivotGrid1.DataSource;
                ds.AxisAddHierarchyAsync(AxisType.Column, "[SportsData].[Nation]", true, ultraPivotGrid1);  
            }

    Adding Columns & Rows can be achieved via AxisAddHierarchyAsync and AxisRemoveHierarchyAsync methods. Adding and removing Measures can be done via AddMeasureAsyncRemoveMeasureAsync methods. 

    More information about OlapDataSource Class  API reference can be found on our website.

    Should you have more questions, please let me know.

    Sincerely,
    Tihomir Tonev
    Associate Software Developer

Reply Children