Is it possible to use the load event to add columns and values in Pivot Table?

Answer:

Yes, We can add Columns and Values by using load events.
public void load(LoadEventArgs args)
{
List columns = new List(); columns.Add(new IFieldOptions() { Name = "Year", Caption = "Year" });
args.DataSourceSettings.Columns = columns;
List rows = new List(); rows.Add(new IFieldOptions() { Name = "Products", Caption = "Products" });
args.DataSourceSettings.Rows = rows;
List values = new List(); values.Add(new IFieldOptions() { Name = "Sold", Caption = "Units Sold" });
args.DataSourceSettings.Values = values;
}

Find the sample to add Columns and Values by using load event from here.


Loader.
Up arrow icon