Hello!
I using Grid on page and want to do some editing of cells.
I generate row on this template:
How can I make the data-bind?
For example: <td role="gridcell"><input type="text" data-bind="value: value.name" /></td>
I using Grid on page and want to do some editing of cells.
var
grid = $(
"#daily-tasks-detail-grid"
).kendoGrid({
dataSource: {
transport: {
read: {
url:
'/json/ords'
,
dataType:
'json'
}
}
},
columns: [
{ title:
"Worker"
},
{ title:
"Description"
}
],
rowTemplate: kendo.template($(
"#rowTemplate"
).html())
}).data(
'kendoGrid'
);
<
script
id
=
"rowTemplate"
type
=
"text/x-kendo-tmpl"
>
<
tr
role
=
"row"
>
<
td
role
=
"gridcell"
></
td
>
<
td
role
=
"gridcell"
></
td
>
</
tr
>
<
tr
role
=
"row"
>
<
td
role
=
"gridcell"
></
td
>
<
td
role
=
"gridcell"
></
td
>
</
tr
>
</
script
>
For example: <td role="gridcell"><input type="text" data-bind="value: value.name" /></td>
6 Answers, 1 is accepted
0

Nikita
Top achievements
Rank 1
answered on 02 Aug 2013, 12:23 PM
I have done so:
http://jsbin.com/edives/3
Why does not the date-bind at all tr?
http://jsbin.com/edives/3
Why does not the date-bind at all tr?
0
Hello Nikita,
You have only 3 models in your collection and 3 rows should be created. However you have created your template to contain two TR elements which is invalid inside row template.
Consider using one TR and separate table inside (something like this) or consider using the ListView widget instead.
Kind Regards,
Petur Subev
Telerik
You have only 3 models in your collection and 3 rows should be created. However you have created your template to contain two TR elements which is invalid inside row template.
Consider using one TR and separate table inside (something like this) or consider using the ListView widget instead.
Kind Regards,
Petur Subev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0

Nikita
Top achievements
Rank 1
answered on 08 Aug 2013, 05:47 AM
I need to use a table like this:
1 post - a few lines. <tr> <td> </ td> <td> </ td> </ tr>
And the ability to edit certain cells.
Can I do it?
1 post - a few lines. <tr> <td> </ td> <td> </ td> </ tr>
And the ability to edit certain cells.
Can I do it?
0
Hello Nikita,
Yes you can, here is an example:
http://jsbin.com/utazis/2/edit
Kind Regards,
Petur Subev
Telerik
Yes you can, here is an example:
http://jsbin.com/utazis/2/edit
Kind Regards,
Petur Subev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0

Nikita
Top achievements
Rank 1
answered on 12 Aug 2013, 05:04 AM
You do not understand me.
I need to have one model had a few rows in the table.
This is not standard, but it should be.
I need to have one model had a few rows in the table.
This is not standard, but it should be.
0
Hi Nikita,
Rendering more than one table row per data item is not supported by Kendo Grid. By design a <tr> element is rendered for each data item. As my colleague Petur explained the row template which you are trying to use is not valid. Please reconsider the layout of your application.
Regards,
Alexander Valchev
Telerik
Rendering more than one table row per data item is not supported by Kendo Grid. By design a <tr> element is rendered for each data item. As my colleague Petur explained the row template which you are trying to use is not valid. Please reconsider the layout of your application.
Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!