|
<script type="text/javascript">
$("#TreeGridContainer").ejTreeGrid({
filterSettings: {
filterBarMode: "onEnter"
},
create: function () {
$("#TreeGridContainer_taskName_filterbarcell").bind('keyup', function (e) {
timer = setTimeout(function () {
var text = $("#TreeGridContainer_taskName_filterbarcell").val();
var treeObject = $("#TreeGridContainer").data("ejTreeGrid");
treeObject.filterColumn("taskName", "startswith", text, "and");
},2000);
});
},
})
</script> |
jQuery delay() will not do the job. The problem with delay() is it's part of the animation system, and only applies to animation queues. As per jQuery Documentation: The .delay() method is best for delaying between queued jQuery effects. Because it is limited—it doesn't, for example, offer a way to cancel the delay—.delay() is not a replacement for JavaScript's native setTimeout function, which may be more appropriate for certain use cases to jQuery wait.
setTimeout(
function()
{
//do something special
}, 5000);
Hi paulwings ,
As we did not suggest anything regarding delay() method. We cant understand your query properly. We request you to elaborate on your query which helps us to provide you a better solution.
Regards,
Premkumar S