Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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...

VB
@(Html.Telerik().ComboBox().Name("GridDisplayComboBox")
                               .AutoFill(true)
                               .ClientEvents(e=>e.OnChange("onChangeGDCB")))


and in scripting part,
JavaScript
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....
Posted
Updated 17-Jun-12 22:19pm
v3
Comments
P_A_1 18-Jun-12 2:11am    
Still no reply ? :(
Sandeep Mewara 18-Jun-12 2:52am    
You are regular here and yet you fail to compose your question completely.

Share the grid-binding part that you have done. Update question with it. Do add the outcome of it too - error, issue, anything!
P_A_1 18-Jun-12 2:57am    
Hai Thanks for ur suggestions

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900