Hello,
I'm in the process of upgrading some Telerik controls to KendoUI but am trying to only use javascript.
I have a kendo UI grid that shows some data including an edit button for each. When an edit button for a row is pressed I'd like a new page to be displayed showing that row's data in a form so it can be edited. I'm having problems creating the button though. The telerik version of the page (written with MVC) renders this HTML:
<a class="t-button t-grid-Edit" href="/BMDE/FI/Edit/13?Id=13">Edit</a>
And, ideally, this is what I'd like to replicate using Kendo UI with javascript.
At, the moment I've got this:
<script type="text/javascript">
var modelDataSource = new kendo.data.DataSource({
data: $.parseJSON('@modelString')
});
$(document).ready(function () {
$("#grid").kendoGrid({
dataSource: modelDataSource,
columns:
[
{ title: "Name", field: "Name"},
{ title: "Age", field: "Age"},
{ title: " ", command: { text: "Edit"}},
]
});
});
</script>
Can anyone let me know what I need to do to redirect the page when pressing the edit button?
Cheers,
Adam
I'm in the process of upgrading some Telerik controls to KendoUI but am trying to only use javascript.
I have a kendo UI grid that shows some data including an edit button for each. When an edit button for a row is pressed I'd like a new page to be displayed showing that row's data in a form so it can be edited. I'm having problems creating the button though. The telerik version of the page (written with MVC) renders this HTML:
<a class="t-button t-grid-Edit" href="/BMDE/FI/Edit/13?Id=13">Edit</a>
And, ideally, this is what I'd like to replicate using Kendo UI with javascript.
At, the moment I've got this:
<script type="text/javascript">
var modelDataSource = new kendo.data.DataSource({
data: $.parseJSON('@modelString')
});
$(document).ready(function () {
$("#grid").kendoGrid({
dataSource: modelDataSource,
columns:
[
{ title: "Name", field: "Name"},
{ title: "Age", field: "Age"},
{ title: " ", command: { text: "Edit"}},
]
});
});
</script>
Can anyone let me know what I need to do to redirect the page when pressing the edit button?
Cheers,
Adam