Premium forums

Disable cascading functionnality

  • Benoit
    Benoit avatar

    09 Mar 2012 (Link to this post)

    Hello,

    I'm using the PanelBar and my problem is that when i have UL elements imbricated in others UL elements, the UL children have the PanelBar functionnality activated althought i don't want it so.

    Code example (i don't want the UL with the "NOT-EXPANDABLE" class to be used as a PanelBar) :

    <ul class="expandable">
        <li>
            Projects
            <ul>
                <li>
                    Sales Forecasts
                    <ul class="NOT-EXPANDABLE">
                        <li>Q1 Forecast</li>
                        <li>Q2 Forecast</li>
                        <li>Q3 Forecast</li>
                        <li>Q4 Forecast</li>
                    </ul>
                </li>
                <li>Sales Reports</li>
            </ul>
        </li>
    </ul>


    Thanks a lot for your help !
  • Benoit
    Benoit avatar

    09 Mar 2012 (Link to this post)

    I solved my problem but i don't know if it's the best solution ... Anyway, if it could help, here is the modified "kendo.all.js" file.
    Modified lines :

    L 16322 : I added an option to the defaults (true : will work like the default library, false : will only activate the PanelBar on the main parent and no its children)

    expandAllSubItems: false

    L 16687 - 16696 :

    if(that.options.expandAllSubItems == false)
    {
        updateItemClasses(items[0], that.element);
    }
    else
    {
        items.each(function () {
            updateItemClasses(this, that.element);
        });
    }

    And here we are !

    If you've got something better, i'd enjoying to hear it :)

    Bye

Read FAQ or see Kendo UI in action!

Launch Demos