kendo ui - How do I make a edit button in a template for a grid in KendoUI? -
My basic question is how do I create a button in the template that will turn on the editing mode in Kandogrid? I have the following types of templates:
& lt; Script id = "serviceGridRowTemplate" type = "text / x-kendo-template" & gt; & Lt; TR & gt; & Lt; Td> & Lt; Span data-bind = "text: sequence" & gt; & Lt; / Span & gt; & Lt; / Td> & Lt; Td> & Lt; Span data-bind = "text: service" & gt; & Lt; / Span & gt; & Lt; / Td> & Lt; Td> & Lt; Input data-role = "datepicker" data-bind = "expressdate: se_data" /> & Lt; / Td> @ * & Lt; Td> & Lt; Span data-bind = "xpressdate: from_date" data-date format = "mm / dd / yyyy" & gt; & Lt; / Span & gt; & Lt; / Td> * @ & Lt; TD & gt; & Lt; Span data-bind = "expressdate: to_adet" data-date format = "mm / dd / yay" & gt; & Lt; / Span & gt; & Lt; / Td> & Lt; Td> & Lt; Span data-bind = "text: provider" & gt; & Lt; / Span & gt; & Lt; / Td> & Lt; Td> & Lt; Span data-bind = "text: name" & gt; & Lt; / Span & gt; & Lt; / Td> & Lt; Td> & Lt; Span data-bind = "text: status" & gt; & Lt; / Span & gt; & Lt; / Td> & Lt; Td> & Lt; Span data-bound = "text: deny_cd" & gt; & Lt; / Span & gt; & Lt; / Td> & Lt; Td> & Lt; Span data-bind = "xpressdate: add_date" data-date format = "mm / dd / yyyy" & gt; & Lt; / Span & gt; & Lt; / Td> & Lt; Td> & Lt; Span data-bind = "text: add_init" & gt; & Lt; / Span & gt; & Lt; / Td> & Lt; Td> & Lt; Span data-bind = "xpressdate: change_date" data-date format = "mm / dd / yyyy" & gt; & Lt; / Span & gt; & Lt; / Td> & Lt; Td> & Lt; Span data-bind = "text: change_init" & gt; & Lt; / Span & gt; & Lt; / Td> & Lt; Td> & Lt; Button & gt; Turn on edit & lt; / Button & gt; & Lt; / Td> & Lt; / TR & gt;
I have tried to force an order but do not like it. I can easily put a datatypeer in this line, but I just have to have text and then click on an edit button or as soon as I created the template I had created the template, it starts editing. Just for reference, this is a div with the grid.
& lt; Div data-roles = "grid" data-bind = "source: referral data service" data-scrolls = "true" data - diemplate = "servicegridraw template" data-editable = "{mode: 'inline', template : "Sequence", "Width": 70, "Title", "Title", "Service", "Service", "Service" : 'Sequence #'}, {'Field': 'Service', Width: 70, Title: 'Service'}, {'Field': 'From_date', 'Width': 70, 'Title': 'Effective Date '}', '' 'To_date', 'width': 70, 'title': 'end date'}, {field: 'provider', 'title': 'provider', width: 70}, { 'Field': 'name', 'title': 'provider name'}, {'field': 'position', 'width': 180, 'title': 'service status code'}, {'field': ' '' Field ':' add_date ',' width ': 70,' title ':' add date '}, {' field ':' deny_cd ',' width ': 180,' title ':' service reason code '} '' Add_init ',' width ': 70,' title ':' added '}, {' field ':' change_date ',' width ': 70,' title ':' revised date '}, {' field ' 'Change_init ',' Width ': 80,' title ':' modified by '}, {command:' edit '}] "style =" width: 100%; A final note, ExpressDet is just a custom data picker that is essential for strange formatted dates from DB. P> Anyone know about an example or how to do it?
Just a few small things In Closed, row-template includes data-UID = "# = UID #" on tr.
& lt; Tr data-uid = "# = UID #" & gt;
Then within the line template, add it as an edit button
& lt; Td> & Lt; A class = "k-button k-button-icontext k-grid-edit
" href = "\ #" & gt; & Lt; Span class = "k-icon k-edit" & gt; & Lt; / Span & gt; Edit & lt; / A & gt; It should contain a fully customized editing button with a grid-style grid that should change the special gridro to editing mode.
View Sample
Comments
Post a Comment