Hai all,
I am using Telerik Grid Control.
Procedure:
I will select any one of the table name from combobox and in onchange event of this combobox i am doing ajax request and now i want to bind the data to Telerik Grid using Ajax response.
Every thing working fine except, this binding data to grid using this Ajax response..
I used Combobox like this...
@(Html.Telerik().ComboBox().Name("GridDisplayComboBox")
.AutoFill(true)
.ClientEvents(e=>e.OnChange("onChangeGDCB")))
and in scripting part,
function onChangeGDCB(e) {
var data1 = e.value;
$.ajax({ type: 'POST',
url: '@Url.Action("CallMyGrid")',
data: { data: data1 },
async: true,
success: function (response) {
var grid = $('#MyGrid').data('tGrid');'
grid.rebind( // He re i am not able to get idea for code to rebind the data to Grid...
alert('I am Grid '+response);},
error: function (xhr, ajaxOptions, thrownError) {
alert(xhr.responseText);
}
});
}
Can any gudie me regading this....