jestges
jestges

Reputation: 3740

display only selected columns in kendo grid while edit

Hi is there any way to display only few columns while edit in Kendo Grid?

I'm trying to update grid values in popup mode. When I click on edit button it is displaying all column in popup. But I wanted to display only selected columns like name and dept in the popup.

Upvotes: 1

Views: 994

Answers (1)

Gurmeet
Gurmeet

Reputation: 3314

For this you need to define your custom template for editing.Make changes like this:

In kendo grid:

editable: {
                    mode: "popup",
                    template: kendo.template($("#editTemplate").html())
          }  

Define your editTemplate here like:

<script type="text/x-kendo-template" id="editTemplate">

    <div class="k-edit-form-container">
    <table style="margin:0 auto;">
      <tr>
              <td>
                  <input type="text"  class="k-input k-textbox" **data-bind="value:your_column_to_bind"**/>
              </td>
      </tr>
     </table>
    </div>
 </script>

Upvotes: 1

Related Questions