Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I hav a Kendo Popup it contains a Kendo Grid and a Html Search Box

if i give a text in search box the particular details will come and display in the grid


the problem am facing is that am getting the searched details but it is not binding in the grid

here is my code

JavaScript
<script type="text/javascript">
    

    $("#btnSearch").click(function () {

        var TxtsearchvalULN = $("#txtSearch").val();
        $.ajax({

            cache: false,
            type: "POST",
            url: "@(Url.Action("CreditSystemManageMerchantInfoSearch", "Revenue"))",
            dataType: 'json',
            data: { "TxtsearchvalULN": TxtsearchvalULN },
            success: function (jsonData) {
                var grid = $('#ManageDetails').getKendoGrid(); 
                grid.dataSource.data(jsonData);
            },
            error: function (xhr, ajaxOptions, thrownError) {
            }
        });

    });
 </script>
Posted
Updated 27-May-14 2:15am
v2

1 solution

First Emptied the existing grid
JavaScript
$("#ManageDetails").data('kendoGrid').dataSource.data([]);

//Fill the current grid with new data 

$("#ManageDetails").data('kendoGrid').dataSource.data(jsonData.Data);
 
Share this answer
 
v2

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