Hi
I have textbox, a button and a Grid in my screen, i am binding data to it on a button click with the textbox input.
If the user clicks the button again with different inputs, i have to go to DB, get data and append the new data to the existing Grid data.
I should not lose the existing data and i need to append new data to the same grid I should be able to call the same URL to get data.
Please let me know how I can achieve this.
Sample Code:
<input type="text" class="k-textbox"/>
<button id="btnAdd">Add</button></td>
<div id="grid"></div>
<script>
$("#btnAdd").on('click', function () {
$("#grid").kendoGrid({
dataSource: {
type: "json",
transport: {
read:
{
url: // my url with textbox inputs,
cache: false
}
},
schema: {
model: {
fields: {
ID: {type: "string"},
Name: {type: "String"}
}
}
},
columns: [
//{ hidden: true, field: "AssetID", editable: false },
{ template: "<input type='checkbox' class='checkbox' />" },
{ field: "ID"},
{ field: "Name"}]
}).data("kendoGrid");
});
});
</script>