Hiding and Sorting fields in the ConfigurationPanel

2 posts, 0 answers
  1. chrisL
    chrisL avatar
    64 posts
    Member since:
    Dec 2005

    Posted 03 Aug 2014 Link to this post

    Hi there.

    How can I hide certain fields in the All Fields list in the ConfigurationPanel?

    I can iterate through the pvtAD.Fields collection in the pvtAD_PreRender method and find the fields I want to hide but when I use pvtAD.Fields[i].IsHidden = true; it doesn't hide it. It still appears and also the update doesn't work when I apply any config changes.

    And how can I do something like this?
    pvtAD.Fields = pvtAD.Fields.OrderBy(x => x.Caption).ToList();

    Many thanks,
  2. Eyup
    Eyup avatar
    3628 posts

    Posted 07 Aug 2014 Link to this post

    Hello Chris,

    You can use the following approach to access the field elements:
        <ClientEvents OnPivotGridCreated="pivotGridCreated" />
    function pivotGridCreated(sender, args) {
        var panel = sender.get_configurationPanel().get_element();
        var container = $(panel).find("rpgAllFieldsContainer,.rpgFieldsContainer")[0];
        var fields = $(container).children();
        fields.each(function (i, el) {
            if (el.id.endsWith("_ShipName_Hidden") || el.id.endsWith("_ShipCountry_Hidden")) {
                el.style.display = "none";

    Hope this helps.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top