0
Reply

close after search in jqgrid ( in ASP.NET MVC3 )

Marish Littu

Marish Littu

Jun 25 2012 9:05 AM
2.7k

$('#jqgProducts').jqGrid('navGrid', '#jqgpProducts',

{ edit: false, add: false, del: true, search: false }, { width: 'auto', url: '@Url.Action("DeleteProduct")' }).jqGrid('navButtonAdd', '#jqgpProducts',


{

caption: 'Search',

buttonicon: 'ui-icon-search',

onClickButton: function ()

{

$('#jqgProducts').jqGrid('searchGrid', { closeOnEscape: true, multipleSearch: true, closeAfterSearch: true });


},

position: 'last',

title: 'Search'

}

);

});


*CloseOnEscape: true : while we press on escape key the search box automatically get closed

*CloseAfeterSearch: true: Once we find the value the search box automatically gets closed