Grid Checkbox multi select filter - form customization

6 posts, 1 answers
  1. Aleksandr
    Aleksandr avatar
    70 posts
    Member since:
    May 2016

    Posted 04 Sep 2017 Link to this post

    i need to remove "Select All", N items selected & change the font of the text for checkboxes.

    I was able to achieve first "Select All", but could you please help me figure out how to implement 2 left?

    P.S - kendo ui for jquery

    Thx Alex

  2. Answer
    Preslav
    Admin
    Preslav avatar
    591 posts

    Posted 05 Sep 2017 Link to this post

    Hello Alex,

    Based on the provided information, I believe that your project requires having a Grid with Multi Checkboxes filter. In the filter pop-up, the "check all" checkbox and the "selected items" div should be removed, as well as, the font in the pop-up should be customized. Please, correct me if I am wrong.

    To achieve the above, I would suggest handling the filterMenuInit event. In the event handler function, select the closest "li" element of the "check all" checkbox and the "div" of the "selected items" and use the jQuery remove method. Furthermore, to change the font, use the jQuery css method.
    For example, the code of the filterMenuInit event handler function could look like:

    function onFilterMenuInit(e) {
        var container = e.container;
        var checkAll = container.find(".k-check-all").closest("li");
        var selectedItems = container.find(".k-filter-selected-items");
     
        checkAll.remove();
        selectedItems.remove();
        setTimeout(function(e) {
            $("form.k-filter-menu.k-popup").css("font-family", "Comic Sans MS")
        })
    };

    For a runnable example, check my testing Dojo:
    I hope this helps.


    Regards,
    Preslav
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Aleksandr
    Aleksandr avatar
    70 posts
    Member since:
    May 2016

    Posted 05 Sep 2017 in reply to Preslav Link to this post

    yes, this is what i was looking for, i will implement & let you know the result 
  4. Aleksandr
    Aleksandr avatar
    70 posts
    Member since:
    May 2016

    Posted 05 Sep 2017 in reply to Aleksandr Link to this post

    provided solution works as expected, big thx 
  5. Aleksandr
    Aleksandr avatar
    70 posts
    Member since:
    May 2016

    Posted 06 Sep 2017 Link to this post

    i have a problem with item style changing, the data to the filter loaded by ajax call, so it гшы possible to click on filter & see the spinneк that the data is loading, settimeout will finish earlier than data loaded, is it possible to subscribe on container datasource loaded even & just after change the font of the items? 
  6. Aleksandr
    Aleksandr avatar
    70 posts
    Member since:
    May 2016

    Posted 06 Sep 2017 in reply to Aleksandr Link to this post

    never-mind, i got what i need 
Back to Top