Resize and add/remove columns from KendoGrid

#1

Is it possible to give the user the ability to resize, add, or remove columns from a KendoGrid?

I have tried the resizable, draggable and togglable fields on the UIViewKendoGrid type but they don’t seem to have any effect

0 Likes

#2

@scott.kruyswyk this can help to fulfill part of your requirement Kendogrid - Intercept Cell when Mouse Click

0 Likes

#3

Thanks Marco! after further inspection it looks like resizable does the trick for changing column width.

As for adding/removing columns, it looks like the option to add/remove any column from the grid isn’t supported. The togglable field allows the grid to be specified with some columns which are also set with the "togglable": true parameter - this will result in a checkbox being rendered which toggles hiding/showing all columns with the togglable field there:

{
    "component": "UIViewKendoGrid",
    "id": "ListView",
    "icon": "bar-chart",
    "paginate": true,
    "small": true,
    "checkBoxes": true,
    "resizable": true,
    "togglable": true,
    "preventReloadOnPageParamsChange": true,
    "fuzzyCount": null,
    "sortNullsLast": true,
    "windowResizeEvent": true,
    "data": {
        "collection": "collection"
    },
    "columns": [
        {
            "id": "name",
            "label": "Name",
            "field": "name",
            "align": "left"
        },
        {
            "id": "description",
            "label": "Description",
            "field": "description",
            "togglable": true,
            "hidden": true,
            "align": "left"
        },
       ...
0 Likes