Adding a Dropdown to a template column

2 posts, 0 answers
  1. Melinda
    Melinda avatar
    1 posts
    Member since:
    May 2015

    Posted 16 Jun 2015 Link to this post

    I am trying to make the category field of a template, that when in edit mode turns into a dropdown box that lists all the available categories. Is there a simple way to do this?

     I would like to keep the dropdown hidden until the field is actually edited.


    This is my current template: 

    <script id="rowTemplate" type="text/x-kendo-template">
            <tr class="k-master-row" data-uid=#: uid #> 
                <td class="k-hierarchy-cell">
                    <a href="\\#" class="k-icon k-plus" title="transaction details"></a>
                <td>#= kendo.toString(transactionDate, 'MM/dd/yyyy') #</td>
                <td>#: description.description #</td>
                <td>#: category.categoryName #</td>
               <td>#: account.accountName #</td>
                <td class="currencyField">#=kendo.toString(amount.amount, 'c') #</td>
                <td class="tId">#: transactionBaseType #</td>
                  <a class="k-button k-button-icontext k-grid-edit" href="\#">
                    <span class="k-icon k-edit"></span>Edit

  2. Daniel
    Daniel avatar
    2109 posts

    Posted 18 Jun 2015 Link to this post

    Hello Melinda,

    Are you using a grid? If yes, then you should use a custom editor or a foreignkey column in order to show a dropdownlist in edit mode.

    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top