Jquery Ready function?

When I just try something simple like this I get the following errors.  Seems like I cannot reference any controls in the the Ready() function.


<script type="text/javascript">
$(function () {
        var grid = $("#OneCloudGrid").ejGrid("instance");  //error on this line
        grid.clearFiltering();
    });
</script>



1 Reply

AS Alan Sangeeth S Syncfusion Team October 19, 2017 08:57 AM UTC

Hi Michael, 

You are creating instance for the Grid control before it is rendered in DOM which is the cause of the issue. We suspect that you would like to clear filter in grid as soon as it rendered. If so, please use “dataBound” Grid event to achieve your requirement. Please refer the API documentation link. 


Regards,
Alan Sangeeth S 


Loader.
Up arrow icon