How to export the Jqgrid Filtered data into Excel in asp.net

greatergood

New Member
I made a Jqgrid for dispalying database with filterToolbar option using Asp.netNow As per my need i want the filtered data to get exported into .excel formate ..Here i am posting my code....\[code\]var categoriesStr = ":All;1:vikas;2:Ankur"; $(function () { $("#UsersGrid").jqGrid({ url: 'jqGridHandler.ashx', datatype: 'json', height: 250, colNames: ['UserID', 'UserName', 'FirstName', 'MiddleName', 'LastName', 'EmailID'], colModel: [ { name: 'UserID', index: 'UserID', width: 100, sortable: true }, { name: 'UserName', width: 100, sortable: true, formatter: 'select',stype: 'select', searchoptions: { sopt: ['eq'], value: categoriesStr} }, { name: 'FirstName', width: 100, sortable: true }, { name: 'MiddleName', width: 100, sortable: true }, { name: 'LastName', width: 100, sortable: true }, { name: 'EmailID', width: 150, sortable: true }, // { name: 'ContactNo', width: 150, sortable: true }, //{ name: 'Address', width: 150, sortable: true } ], rowNum: 10, rowList: [10, 20, 30], pager: '#UsersGridPager', sortname: 'UserID', viewrecords: true, sortorder: 'asc', autowidth:true //caption: 'JSON Example' }); $("#UsersGrid").jqGrid('navGrid', '#UsersGridPager', { edit: false, add: false, del: false,search:false }); $("#UsersGrid").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: true, defaultSearch: 'cn' });$("#UsersGrid").jqGrid('navButtonAdd', '#UsersGrid-pager',{ caption: "Filter", title: "Toggle Searching Toolbar",buttonicon: 'ui-icon-search',onClickButton: function () {$("#UsersGrid")[0].toggleToolbar(); }});\[/code\]plz Guys Help me to complete my task .Thanx in advance...
 
Back
Top