Telerik hide PivotGridCalculatedItem programmatically

2 posts, 0 answers
  1. Sagar
    Sagar avatar
    6 posts
    Member since:
    Feb 2016

    Posted 26 Feb Link to this post

    Hi ,

    I want to hide PivotGridCalculatedItem column programmatically on checkbox change event,is there any provision to do so.



    Sagar Jaunjalkar

  2. Eyup
    Eyup avatar
    2941 posts

    Posted 02 Mar Link to this post

    Hello Sagar,

    You can use the following approach to achieve this requirement:
    protected void Button1_Click(object sender, EventArgs e)
        PivotGridColumnField field = RadPivotGrid1.Fields["Year"] as PivotGridColumnField;
        var calItems = field.CalculatedItems.OfType<PivotGridCalculatedItem>();
        PivotGridCalculatedItem item = calItems.Where(x => x.GroupName == "Forecast for 1999").FirstOrDefault();

    The example above is adjusted for this live sample:

    I hope this will prove helpful.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top