make a field with command buttons non resizable

5 posts, 1 answers
  1. Vadim
    Vadim avatar
    16 posts
    Member since:
    Jul 2013

    Posted 09 Nov 2017 Link to this post

    Hi.

    There is a good example how to make a column non-resizable.

    My grid has a command button plus a template button on the left side of the grid and I don't know how to refer to these buttons to make them non-resizable. 

     toolbar: [{ name: "create", text: "Add New Asset" }, { template: kendo.template($("#DueDateTemplate").html()) }, { template: kendo.template($("#rightToolbarTemplate").html()) }],
                    columns: [
                        {
                            command: [{ name: "edit", text: { edit: " ", update: " ", cancel: " " } },
                              { name: "confirmButton", text: " ", template: "<a class='k-button k-grid-confirmButton' onclick ='onItemConfirm(this)'><span class='k-icon k-i-checkbox'></span></a>" },
                            ], title: "Edit / Confirm", width: "120px", locked: true
                        },
                        { field: "Attested", template: $("#attestedTemplate").html(), title: "Attested", width: "100px", locked: true },

     

    Thank you

  2. Vadim
    Vadim avatar
    16 posts
    Member since:
    Jul 2013

    Posted 09 Nov 2017 in reply to Vadim Link to this post

    forgot to paste a link to example
    https://dojo.telerik.com/agAPAv
  3. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2466 posts

    Posted 10 Nov 2017 Link to this post

    Hi Vadim,

    You can disable the resizing by using the index of the column. Please refer to the following example with the modified condition:
    Hope this helps.


    Regards,
    Konstantin Dikov
    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.
  4. Vadim
    Vadim avatar
    16 posts
    Member since:
    Jul 2013

    Posted 10 Nov 2017 in reply to Konstantin Dikov Link to this post

    Hi ,
    Thank you Konstantin for a quick reply, Works perfect.
    few more questions I have, referring to the example you have posted:

    1. Do I need always to include a default style? And what is a purpose of it?
    <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2017.3.1026/styles/kendo.default.min.css">
    2. Is it possible on grid load to maximize the width all columns to their content, but the same time maintain a min width defined in columns [ ] templates?

    Thank you
  5. Answer
    Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2466 posts

    Posted 14 Nov 2017 Link to this post

    Hello Vadim,

    For detailed information about the themes you could refer to the following help article:
    As for your second question, you could use the autoFitColumn method once the Grid is loaded, but it will not take into account the minResizableWidth defined in the column (if you are referring to that property):
    The autoFitColumn method will traverse all records and the values in each cell in order to calculate the max width.


    Best Regards,
    Konstantin Dikov
    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