diff --git a/CHANGE-LOG b/CHANGE-LOG index e299ad1..a0fa231 100644 --- a/CHANGE-LOG +++ b/CHANGE-LOG @@ -1,10 +1,11 @@ -v1.37 2015-09-13 使用优化、性能优化、BUG修复 +v1.37 2015-11-24 使用优化、性能优化、BUG修复 1,修复pageSize为0或pageAll为tue且数据条数为0时隐藏不了表头列的bug; 2,增加参数showPageToolbar控制是否显示分页工具条,默认值true显示; 3,增加9个方法,获取分页及排序相关值; 4,修复当页记录条数为0时不执行afterRenderGridMethods系列方法的bug; 5,增加grid属性ajaxType,默认post,可修改为get; +6,增强分页工具条的按钮显示、最小宽度自定义; diff --git a/README.md b/README.md index b768ec4..5d22369 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,13 @@ jQuery.bsgrid - 简单实用、功能丰富、易扩展的jQuery Grid插件 源码:[Github](https://github.com/baishui2004/jquery.bsgrid/)   -演示:皮肤 -  示例 -  文档 +演示:皮肤 +  示例 +  文档
-版本:1.36 +版本:1.37    协议:Apache Licence 2 - 更新:2015-06-25 + 更新:2016-01-21
依赖:jQuery 1.4.4 ~~ jQuery 1.11.2     @@ -19,32 +19,32 @@ jQuery.bsgrid - 简单实用、功能丰富、易扩展的jQuery Grid插件 QQ群交流:254754154      -捐助:支持长远发展,感谢您的认可! +捐助:支持长远发展,感谢您的认可! ###皮肤效果### -内置多套皮肤(点击图片查看示例页面),并可非常容易的定制皮肤[示例:Custom Blue Style] +内置多套皮肤(点击图片查看示例页面),并可非常容易的定制皮肤[示例:Custom Blue Style]
- - + + ###bsgrid的由来###   首先,解释插件名称为何叫bsgrid,是因为作者常用bs开头的字符做英文账号的缘故。bsgrid的诞生因为主流插件、框架的grid使用或扩展比较复杂,而本插件作者力图开发一款使用简单、功能实用、容易扩展的grid控件,目前已初步实现此目标。 ###bsgrid的特点### -  1,简单、轻量,基于jQuery及HTML Table,简单的表格只需数十行代码,支持大数据量表格; -
  2,内置多套经典皮肤,且非常容易定制,字体定制只需要修改两处CSS代码即可; -
  3,实用便捷的功能:表格编辑、 - 表底聚合、 - 不分页、 - 多行表头、 - 多字段排序、 - 本地数据、 - 处理Userdata、 - 拖动列宽、 - 滚动表格数据等; -
  4,易与其他插件集成使用,示例展示了集成Layui、 - ArtDialog、 - jquery.validationEngine、 +  1,简单、轻量,基于jQuery及HTML Table,简单的表格只需数十行代码,支持大数据量表格; +
  2,内置多套经典皮肤,且非常容易定制,字体定制只需要修改两处CSS代码即可; +
  3,实用便捷的功能:表格编辑、 + 表底聚合、 + 不分页、 + 多行表头、 + 多字段排序、 + 本地数据、 + 处理Userdata、 + 拖动列宽、 + 滚动表格数据等; +
  4,易与其他插件集成使用,示例展示了集成Layui、 + ArtDialog、 + jquery.validationEngine、 第三方分页工具条等的使用;
  5,扩展性好,插件有特别好的扩展性,易于对插件本身进行局部甚至较大的修改,易于改变展现样式;插件放开了属性及方法的全局修改权限,所有方法都可在外部进行全局重写,而无需修改插件本身的代码;
  6,模块化JS、CSS代码,可按需加载,代码精致简洁,对于阅读、修改、扩展非常容易。 diff --git a/builds/css/grid.paging.min.css b/builds/css/grid.paging.min.css index d0872e8..4f18850 100644 --- a/builds/css/grid.paging.min.css +++ b/builds/css/grid.paging.min.css @@ -1 +1 @@ -@CHARSET "UTF-8";.bsgridPaging{font-size:13px;font-family:'微软雅黑',Verdana,sans-serif,'宋体',serif;width:770px;border-collapse:collapse}.bsgridPaging.pagingLittleToolbar{width:550px}.bsgridPaging.noPageSizeSelect{width:650px}.bsgridPaging.pagingLittleToolbar.pagingLittleToolbar{width:430px}.bsgridPaging td{text-align:center}.bsgridPaging select{font-size:inherit;width:auto;height:auto;padding:1px;margin:1px}.bsgridPaging .pagingBtn{cursor:pointer;border:solid 1px #ccc;background:url(../images/skins/default/bg.gif) repeat-x #f4f4f4;font-size:inherit;font-family:inherit;color:inherit;padding:1px 3px;margin:1px}.bsgridPaging.pagingLittleToolbar .pagingBtn{width:16px;border-width:0;background:transparent no-repeat;padding:0;margin:3px}.bsgridPaging .pagingBtn.disabledCls{color:#999;filter:alpha(opacity=50);opacity:.5;-moz-opacity:.5}.bsgridPaging.pagingLittleToolbar .pagingBtn.firstPage{background-image:url(../images/icons/paging/go-first-view.png)}.bsgridPaging.pagingLittleToolbar .pagingBtn.prevPage{background-image:url(../images/icons/paging/go-previous-view.png)}.bsgridPaging.pagingLittleToolbar .pagingBtn.nextPage{background-image:url(../images/icons/paging/go-next-view.png)}.bsgridPaging.pagingLittleToolbar .pagingBtn.lastPage{background-image:url(../images/icons/paging/go-last-view.png)}.bsgridPaging .gotoPageInputTd{width:44px}.bsgridPaging .gotoPageInput{width:40px;height:auto;font-size:inherit;line-height:1em;color:inherit;border:solid 1px #ccc;padding:1px;margin:1px}.bsgridPaging .gotoPageButtonTd{text-align:left}.bsgridPaging .refreshPageTd{text-align:right;padding-right:4px}.bsgridPaging.pagingLittleToolbar .pagingBtn.gotoPage{background-image:url(../images/icons/paging/go-jump-2.png)}.bsgridPaging.pagingLittleToolbar .pagingBtn.refreshPage{background-image:url(../images/icons/paging/view-refresh-3.png)} \ No newline at end of file +@CHARSET "UTF-8";.bsgridPaging{font-size:13px;font-family:'微软雅黑',Verdana,sans-serif,'宋体',serif;width:770px;border-collapse:collapse}.bsgridPaging.pagingLittleToolbar{width:550px}.bsgridPaging.noPageSizeSelect{width:650px}.bsgridPaging.pagingLittleToolbar.noPageSizeSelect{width:430px}.bsgridPaging td{text-align:center}.bsgridPaging select{font-size:inherit;width:auto;height:auto;padding:1px;margin:1px}.bsgridPaging .pagingBtn{cursor:pointer;border:solid 1px #ccc;background:url(../images/skins/default/bg.gif) repeat-x #f4f4f4;font-size:inherit;font-family:inherit;color:inherit;padding:1px 3px;margin:1px}.bsgridPaging.pagingLittleToolbar .pagingBtn{width:16px;border-width:0;background:transparent no-repeat;padding:0;margin:3px}.bsgridPaging .pagingBtn.disabledCls{color:#999;filter:alpha(opacity=50);opacity:.5;-moz-opacity:.5}.bsgridPaging.pagingLittleToolbar .pagingBtn.firstPage{background-image:url(../images/icons/paging/go-first-view.png)}.bsgridPaging.pagingLittleToolbar .pagingBtn.prevPage{background-image:url(../images/icons/paging/go-previous-view.png)}.bsgridPaging.pagingLittleToolbar .pagingBtn.nextPage{background-image:url(../images/icons/paging/go-next-view.png)}.bsgridPaging.pagingLittleToolbar .pagingBtn.lastPage{background-image:url(../images/icons/paging/go-last-view.png)}.bsgridPaging .gotoPageInputTd{width:44px}.bsgridPaging .gotoPageInput{width:40px;height:auto;font-size:inherit;line-height:1em;color:inherit;border:solid 1px #ccc;padding:1px;margin:1px}.bsgridPaging .gotoPageButtonTd{text-align:left}.bsgridPaging .refreshPageTd{text-align:right;padding-right:4px}.bsgridPaging.pagingLittleToolbar .pagingBtn.gotoPage{background-image:url(../images/icons/paging/go-jump-2.png)}.bsgridPaging.pagingLittleToolbar .pagingBtn.refreshPage{background-image:url(../images/icons/paging/view-refresh-3.png)} \ No newline at end of file diff --git a/builds/js/common.min.js b/builds/js/common.min.js index e7c8507..dbcfbc6 100644 --- a/builds/js/common.min.js +++ b/builds/js/common.min.js @@ -1,5 +1,5 @@ /** -* jQuery.bsgrid v1.36 by @Baishui2004 +* jQuery.bsgrid v1.37 by @Baishui2004 * Copyright 2014 Apache v2 License * https://github.com/baishui2004/jquery.bsgrid */ diff --git a/builds/js/export.min.js b/builds/js/export.min.js index cb245ec..39672ca 100644 --- a/builds/js/export.min.js +++ b/builds/js/export.min.js @@ -1,5 +1,5 @@ /** -* jQuery.bsgrid v1.36 by @Baishui2004 +* jQuery.bsgrid v1.37 by @Baishui2004 * Copyright 2014 Apache v2 License * https://github.com/baishui2004/jquery.bsgrid */ diff --git a/builds/js/form.min.js b/builds/js/form.min.js index c4ec81f..ea0bcd8 100644 --- a/builds/js/form.min.js +++ b/builds/js/form.min.js @@ -1,5 +1,5 @@ /** -* jQuery.bsgrid v1.36 by @Baishui2004 +* jQuery.bsgrid v1.37 by @Baishui2004 * Copyright 2014 Apache v2 License * https://github.com/baishui2004/jquery.bsgrid */ diff --git a/builds/js/grid.extend.min.js b/builds/js/grid.extend.min.js index 928a454..63d723b 100644 --- a/builds/js/grid.extend.min.js +++ b/builds/js/grid.extend.min.js @@ -1,5 +1,5 @@ /** -* jQuery.bsgrid v1.36 by @Baishui2004 +* jQuery.bsgrid v1.37 by @Baishui2004 * Copyright 2014 Apache v2 License * https://github.com/baishui2004/jquery.bsgrid */ diff --git a/builds/js/grid.min.js b/builds/js/grid.min.js index a2bc4ff..e238a53 100644 --- a/builds/js/grid.min.js +++ b/builds/js/grid.min.js @@ -1,6 +1,6 @@ /** -* jQuery.bsgrid v1.36 by @Baishui2004 +* jQuery.bsgrid v1.37 by @Baishui2004 * Copyright 2014 Apache v2 License * https://github.com/baishui2004/jquery.bsgrid */ -(function($){$.fn.bsgrid={version:"1.36",defaults:{dataType:"json",ajaxType:"post",localData:false,url:"",otherParames:false,autoLoad:true,pageAll:false,showPageToolbar:true,pageSize:20,pageSizeSelect:false,pageSizeForGrid:[5,10,20,25,50,100,200,500],pageIncorrectTurnAlert:true,multiSort:false,displayBlankRows:true,lineWrap:false,stripeRows:false,rowHoverColor:false,rowSelectedColor:true,pagingLittleToolbar:false,pagingToolbarAlign:"right",pagingBtnClass:"pagingBtn",displayPagingToolbarOnlyMultiPages:false,isProcessLockScreen:true,longLengthAotoSubAndTip:true,colsProperties:{align:"center",maxLength:40,indexAttr:"w_index",sortAttr:"w_sort",alignAttr:"w_align",lengthAttr:"w_length",renderAttr:"w_render",hiddenAttr:"w_hidden",tipAttr:"w_tip"},requestParamsName:{pageSize:"pageSize",curPage:"curPage",sortName:"sortName",sortOrder:"sortOrder"},beforeSend:function(options,XMLHttpRequest){},complete:function(options,XMLHttpRequest,textStatus){},processUserdata:function(userdata,options){},event:{selectRowEvent:false,unselectRowEvent:false,customRowEvents:{},customCellEvents:{}},extend:{initGridMethods:{},beforeRenderGridMethods:{},renderPerRowMethods:{},renderPerColumnMethods:{},afterRenderGridMethods:{}},additionalBeforeRenderGrid:function(parseSuccess,gridData,options){},additionalRenderPerRow:function(record,rowIndex,trObj,options){},additionalRenderPerColumn:function(record,rowIndex,colIndex,tdObj,trObj,options){},additionalAfterRenderGrid:function(parseSuccess,gridData,options){}},gridObjs:{},init:function(gridId,settings){if(!$("#"+gridId).hasClass("bsgrid")){$("#"+gridId).addClass("bsgrid")}var options={settings:$.extend(true,{},$.fn.bsgrid.defaults,settings),gridId:gridId,noPagingationId:gridId+"_no_pagination",pagingOutTabId:gridId+"_pt_outTab",pagingId:gridId+"_pt",sortName:"",sortOrder:"",otherParames:settings.otherParames,totalRows:0,totalPages:0,curPage:1,curPageRowsNum:0,startRow:0,endRow:0};if($("#"+gridId).find("thead").length==0){$("#"+gridId).prepend("");$("#"+gridId).find("tr:lt("+($("#"+gridId+" tr").length-$("#"+gridId+" tfoot tr").length)+")").appendTo($("#"+gridId+" thead"))}if($("#"+gridId).find("tbody").length==0){$("#"+gridId+" thead").after("")}if($("#"+gridId).find("tfoot").length==0){$("#"+gridId).append('')}options.columnsModel=$.fn.bsgrid.initColumnsModel(options);if(settings.pageSizeForGrid!=undefined){options.settings.pageSizeForGrid=settings.pageSizeForGrid}options.settings.dataType=options.settings.dataType.toLowerCase();if(options.settings.pageSizeSelect){if($.inArray(options.settings.pageSize,options.settings.pageSizeForGrid)==-1){options.settings.pageSizeForGrid.push(options.settings.pageSize)}options.settings.pageSizeForGrid.sort(function(a,b){return a-b})}var gridObj={options:options,getPageCondition:function(curPage){return $.fn.bsgrid.getPageCondition(curPage,options)},page:function(curPage){$.fn.bsgrid.page(curPage,options)},search:function(params){$.fn.bsgrid.search(params,options)},loadGridData:function(dataType,gridData){$.fn.bsgrid.loadGridData(dataType,gridData,options)},getPageSize:function(){return options.settings.pageSize},getTotalRows:function(){return options.totalRows},getTotalPages:function(){return options.totalPages},getCurPage:function(){return options.curPage},getCurPageRowsNum:function(){return options.curPageRowsNum},getStartRow:function(){return options.startRow},getEndRow:function(){return options.endRow},getSortName:function(){return options.sortName},getSortOrder:function(){return options.sortOrder},getRows:function(){return $.fn.bsgrid.getRows(options)},getRow:function(row){return $.fn.bsgrid.getRow(row,options)},getRowCells:function(row){return $.fn.bsgrid.getRowCells(row,options)},getColCells:function(col){return $.fn.bsgrid.getColCells(col,options)},getCell:function(row,col){return $.fn.bsgrid.getCell(row,col,options)},getSelectedRow:function(){return $.fn.bsgrid.getSelectedRow(options)},getSelectedRowIndex:function(){return $.fn.bsgrid.getSelectedRowIndex(options)},selectRow:function(row){return $.fn.bsgrid.selectRow(row,options)},unSelectRow:function(){return $.fn.bsgrid.unSelectRow(options)},getUserdata:function(){return $.fn.bsgrid.getUserdata(options)},getRowRecord:function(rowObj){return $.fn.bsgrid.getRowRecord(rowObj)},getAllRecords:function(){return $.fn.bsgrid.getAllRecords(options)},getRecord:function(row){return $.fn.bsgrid.getRecord(row,options)},getRecordIndexValue:function(record,index){return $.fn.bsgrid.getRecordIndexValue(record,index,options)},getColumnValue:function(row,index){return $.fn.bsgrid.getColumnValue(row,index,options)},getCellRecordValue:function(row,col){return $.fn.bsgrid.getCellRecordValue(row,col,options)},sort:function(obj){$.fn.bsgrid.sort(obj,options)},getGridHeaderObject:function(){return $.fn.bsgrid.getGridHeaderObject(options)},getColumnModel:function(colIndex){return $.fn.bsgrid.getColumnModel(colIndex,options)},appendHeaderSort:function(){$.fn.bsgrid.appendHeaderSort(options)},setGridBlankBody:function(){$.fn.bsgrid.setGridBlankBody(options)},createPagingOutTab:function(){$.fn.bsgrid.createPagingOutTab(options)},clearGridBodyData:function(){$.fn.bsgrid.clearGridBodyData(options)},getPagingObj:function(){return $.fn.bsgrid.getPagingObj(options)},getCurPage:function(){return $.fn.bsgrid.getCurPage(options)},refreshPage:function(){$.fn.bsgrid.refreshPage(options)},firstPage:function(){$.fn.bsgrid.firstPage(options)},prevPage:function(){$.fn.bsgrid.prevPage(options)},nextPage:function(){$.fn.bsgrid.nextPage(options)},lastPage:function(){$.fn.bsgrid.lastPage(options)},gotoPage:function(goPage){$.fn.bsgrid.gotoPage(options,goPage)},initPaging:function(){return $.fn.bsgrid.initPaging(options)},setPagingValues:function(){$.fn.bsgrid.setPagingValues(options)}};$.fn.bsgrid.gridObjs[gridId]=gridObj;if(options.settings.pageAll||options.settings.pageSize<1){options.settings.pageAll=true;options.settings.pageSize=0}gridObj.appendHeaderSort();gridObj.createPagingOutTab();if(!options.settings.showPageToolbar){$("#"+options.pagingId).hide();$("#"+options.pagingOutTabId).hide()}if(!options.settings.pageAll){gridObj.pagingObj=gridObj.initPaging();try{var minWidth=$.trim($("#"+options.pagingId).children().width());minWidth=minWidth==""?0:parseInt(minWidth);if(minWidth!=0){$("#"+gridId).css("min-width",minWidth+16);$("#"+options.pagingOutTabId).css("min-width",minWidth+16)}$("#"+options.pagingOutTabId).width($("#"+gridId).width());$(window).resize(function(){$("#"+options.pagingOutTabId).width($("#"+gridId).width())})}catch(e){}}if(options.settings.isProcessLockScreen){$.fn.bsgrid.addLockScreen(options)}try{$.fn.bsgrid.extendInitGrid.initGridExtendOptions(gridId,options)}catch(e){}for(var key in options.settings.extend.initGridMethods){options.settings.extend.initGridMethods[key](gridId,options)}if(options.settings.autoLoad){setTimeout(function(){gridObj.page(1)},10)}else{gridObj.setGridBlankBody()}return gridObj},initColumnsModel:function(options){var columnsModel=[];$.fn.bsgrid.getGridHeaderObject(options).each(function(){var colsProperties=options.settings.colsProperties;var columnModel={};columnModel.sortName="";columnModel.sortOrder="";var sortInfo=$.trim($(this).attr(colsProperties.sortAttr));if(sortInfo.length!=0){var sortInfoArray=sortInfo.split(",");columnModel.sortName=$.trim(sortInfoArray[0]);columnModel.sortOrder=$.trim(sortInfoArray.length>1?sortInfoArray[1]:"")}columnModel.index=$.trim($(this).attr(colsProperties.indexAttr));columnModel.render=$.trim($(this).attr(colsProperties.renderAttr));columnModel.tip=$.trim($(this).attr(colsProperties.tipAttr));var maxLen=$.trim($(this).attr(colsProperties.lengthAttr));columnModel.maxLen=maxLen.length!=0?parseInt(maxLen):colsProperties.maxLength;var align=$.trim($(this).attr(colsProperties.alignAttr));columnModel.align=align==""?colsProperties.align:align;columnModel.hidden=$.trim($(this).attr(colsProperties.hiddenAttr));columnsModel.push(columnModel)});return columnsModel},getGridObj:function(gridId){var obj=$.fn.bsgrid.gridObjs[gridId];return obj?obj:null},buildData:{gridData:function(type,curPage,data){if(type=="json"){return $.fn.bsgrid.buildJsonData.gridData(curPage,data)}else{if(type=="xml"){return $.fn.bsgrid.buildXmlData.gridData(curPage,data)}}return false}},parseData:{success:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.success(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.success(gridData)}}return false},totalRows:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.totalRows(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.totalRows(gridData)}}return false},curPage:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.curPage(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.curPage(gridData)}}return false},data:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.data(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.data(gridData)}}return false},userdata:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.userdata(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.userdata(gridData)}}return false},getDataLen:function(type,gridData){if(type=="json"||type=="xml"){return $.fn.bsgrid.parseData.data(type,gridData).length}return 0},getRecord:function(type,data,row){if(type=="json"){return $.fn.bsgrid.parseJsonData.getRecord(data,row)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.getRecord(data,row)}}return false},getColumnValue:function(type,record,index){if(type=="json"){return $.fn.bsgrid.parseJsonData.getColumnValue(record,index)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.getColumnValue(record,index)}}return false}},buildJsonData:{gridData:function(curPage,data){return{success:true,totalRows:data.length,curPage:curPage,data:data}}},parseJsonData:{success:function(json){return json.success},totalRows:function(json){return json.totalRows},curPage:function(json){return json.curPage},data:function(json){return json.data},userdata:function(json){return json.userdata},getRecord:function(data,row){return data[row]},getColumnValue:function(record,index){return $.trim(record[index])}},buildXmlData:{gridData:function(curPage,data){return'true'+$(""+data+"").find("row").length+""+curPage+""+data+""}},parseXmlData:{success:function(xml){return $.trim($(xml).find("gridData success").text())=="true"},totalRows:function(xml){return parseInt($(xml).find("gridData totalRows").text())},curPage:function(xml){return parseInt($(xml).find("gridData curPage").text())},data:function(xml){return $(xml).find("gridData data row")},userdata:function(xml){return $(xml).find("gridData userdata")},getRecord:function(data,row){return data.eq(row)},getColumnValue:function(record,index){return $.trim(record.find(index).text())}},getPageCondition:function(curPage,options){var params=new StringBuilder();if(options.otherParames==false){}else{if((typeof options.otherParames).toLowerCase()=="string"||options.otherParames instanceof String){params.append("&"+options.otherParames)}else{if(options.otherParames instanceof Array){$.each(options.otherParames,function(i,objVal){params.append("&"+objVal.name+"="+objVal.value)})}else{for(var key in options.otherParames){params.append("&"+key+"="+options.otherParames[key])}}}}var condition=params.length==0?"":params.toString().substring(1);condition+=(condition.length==0?"":"&")+options.settings.requestParamsName.pageSize+"="+options.settings.pageSize+"&"+options.settings.requestParamsName.curPage+"="+curPage+"&"+options.settings.requestParamsName.sortName+"="+options.sortName+"&"+options.settings.requestParamsName.sortOrder+"="+options.sortOrder;return condition},search:function(params,options){options.otherParames=params;$.fn.bsgrid.page(1,options)},page:function(curPage,options){if($.trim(curPage)==""||isNaN(curPage)){$.fn.bsgrid.alert($.bsgridLanguage.needInteger);return}var dataType=options.settings.dataType;if(options.settings.localData!=false){if(dataType=="json"){$.fn.bsgrid.loadGridData(dataType,$.fn.bsgrid.buildData.gridData(dataType,curPage,options.settings.localData),options)}else{if(dataType=="xml"){$.fn.bsgrid.loadGridData(dataType,""+$.fn.bsgrid.buildData.gridData(dataType,curPage,options.settings.localData)+"",options)}}return}$.ajax({type:options.settings.ajaxType,url:options.settings.url,data:$.fn.bsgrid.getPageCondition(curPage,options),dataType:dataType,beforeSend:function(XMLHttpRequest){if(options.settings.isProcessLockScreen){$.fn.bsgrid.lockScreen(options)}options.settings.beforeSend(options,XMLHttpRequest)},complete:function(XMLHttpRequest,textStatus){options.settings.complete(options,XMLHttpRequest,textStatus);if(options.settings.isProcessLockScreen){$.fn.bsgrid.unlockScreen(options)}},success:function(gridData,textStatus){$.fn.bsgrid.loadGridData(dataType,gridData,options)},error:function(XMLHttpRequest,textStatus,errorThrown){$.fn.bsgrid.alert($.bsgridLanguage.errorForSendOrRequestData)}})},loadGridData:function(dataType,gridData,options){var parseSuccess=$.fn.bsgrid.parseData.success(dataType,gridData);for(var key in options.settings.extend.beforeRenderGridMethods){options.settings.extend.beforeRenderGridMethods[key](parseSuccess,gridData,options)}options.settings.additionalBeforeRenderGrid(parseSuccess,gridData,options);if(parseSuccess){var userdata=$.fn.bsgrid.parseData.userdata(dataType,gridData);$.fn.bsgrid.storeUserdata(userdata,options);options.settings.processUserdata(userdata,options);var totalRows=parseInt($.fn.bsgrid.parseData.totalRows(dataType,gridData));var curPage=parseInt($.fn.bsgrid.parseData.curPage(dataType,gridData));curPage=Math.max(curPage,1);if(options.settings.pageAll){curPage=1;options.settings.pageSize=totalRows;$("#"+options.noPagingationId).html(totalRows)}var pageSize=options.settings.pageSize;var totalPages=parseInt(totalRows/pageSize);totalPages=parseInt((totalRows%pageSize==0)?totalPages:totalPages+1);var curPageRowsNum=$.fn.bsgrid.parseData.getDataLen(dataType,gridData);curPageRowsNum=curPageRowsNum>pageSize?pageSize:curPageRowsNum;curPageRowsNum=(curPage*pageSize   ';$(this).append(sortHtml).find(".sort").click(function(){$.fn.bsgrid.sort($(this).parent("th"),options)})}})},setGridBlankBody:function(options){$.fn.bsgrid.getRows(options).remove();var header=$.fn.bsgrid.getGridHeaderObject(options);var columnsModel=options.columnsModel;for(var hi=0;hi0){var trSb=new StringBuilder();trSb.append("");for(var hi=0;hi ")}trSb.append("");rowSb=trSb.toString()}var rowsSb=new StringBuilder();var curPageRowsNum=options.settings.pageSize;if(!options.settings.displayBlankRows){curPageRowsNum=options.endRow-options.startRow+1;curPageRowsNum=options.endRow>0?curPageRowsNum:0}if(curPageRowsNum==0){rowsSb.append(''+$.bsgridLanguage.noDataToDisplay+"")}else{for(var pi=0;pi