Block the grouping disability of a field

4 posts, 0 answers
  1. Federico
    Federico avatar
    21 posts
    Member since:
    Oct 2017

    Posted 27 Oct 2017 Link to this post

    I'd like to block this event (group closing)..

    it must not be clickable (attachment file)

     

    <div id="mt" data-role="grid"
        data-groupable="true"
        data-pageable='{ "pageSize": 10}'
        data-reorderable="true"
        data-resizable="true"
        data-sortable="true"
        data-columns="[
                    { 'field': 'nome','title':'Nome'}
                  ]"
        data-bind="source: Product"></div>

     

  2. Stefan
    Admin
    Stefan avatar
    2491 posts

    Posted 31 Oct 2017 Link to this post

    Hello, Federico,

    In this scenario, I can suggest two approaches:

    1) To remove the "X" icon on the group event of the Grid using jQuery:

    https://docs.telerik.com/kendo-ui/api/javascript/ui/grid#events-group

    2) On the group event to check the current length of the groups and prevent the event if a group is about to be removed:

    https://dojo.telerik.com/EnazI

    I hope this is helpful.

    Regards,
    Stefan
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Federico
    Federico avatar
    21 posts
    Member since:
    Oct 2017

    Posted 31 Oct 2017 Link to this post

    Can I do this with MVVM?

     

  4. Stefan
    Admin
    Stefan avatar
    2491 posts

    Posted 01 Nov 2017 Link to this post

    Hello,

    Yes, it can be done using MVVM.

    Most of all the examples can be done with the MVVM approach, they just have a different syntax for setting the properties:

    http://dojo.telerik.com/oSAZIY

    Regards,
    Stefan
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top