Click here to Skip to main content
14,668,708 members
Rate this:
Please Sign up or sign in to vote.
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

<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

Rate this:
Please Sign up or sign in to vote.

Solution 1

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

//Fill the current grid with new data 

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

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100