This is a migrated thread and some comments may be shown as answers.
Grid Checkbox multi select filter - form customization
5 Answers 28 Views
This is a migrated thread and some comments may be shown as answers.
Aleksandr
Top achievements
Rank 1
Aleksandr asked on 04 Sep 2017, 09:46 PM

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

5 Answers, 1 is accepted

Sort by
0
Accepted
Preslav
Telerik team
answered on 05 Sep 2017, 10:21 AM
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.
0
Aleksandr
Top achievements
Rank 1
answered on 05 Sep 2017, 07:11 PM
yes, this is what i was looking for, i will implement & let you know the result 
0
Aleksandr
Top achievements
Rank 1
answered on 05 Sep 2017, 08:57 PM
provided solution works as expected, big thx 
0
Aleksandr
Top achievements
Rank 1
answered on 06 Sep 2017, 09:53 AM
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? 
0
Aleksandr
Top achievements
Rank 1
answered on 06 Sep 2017, 02:32 PM
never-mind, i got what i need 
Tags
Grid
Asked by
Aleksandr
Top achievements
Rank 1
Answers by
Preslav
Telerik team
Aleksandr
Top achievements
Rank 1
Share this question
or