开发者

JqGrid getGridParam dont work

开发者 https://www.devze.com 2023-03-04 12:34 出处:网络
I working 开发者_运维问答on a project where use a JqGrid plugin to list the results for users search, when I try get row data on a Grig like this sample

I working 开发者_运维问答on a project where use a JqGrid plugin to list the results for users search, when I try get row data on a Grig like this sample

jQuery("#a1").click( function(){
    var id = jQuery("#list5").jqGrid('getGridParam','selrow');
    if (id) {
        var ret = jQuery("#list5").jqGrid('getRowData',id);
        alert("id="+ret.id+" invdate="+ret.invdate+"...");
    } else { alert("Please select row");}
}); 

got the message "[object Object]". I try get the multiple parameters with getGridParam like rowNum , sortname and this method don't send any value. So I ask what the problem, probably miss load any jqGrid library. The list below represent library that I've included

  <script type="text/ecmascript"  src="<%= Url.Content("~/Scripts/jquery.jqGrid.js") %>" ></script>
    <script  src="<%= Url.Content("~/Scripts/js/jqModal.js") %>"  type="text/ecmascript"></script>
    <script  src="<%= Url.Content("~/Scripts/js/jqDnR.js") %>"  type="text/ecmascript"></script>

Thanks for help..

If anyone knows the solution to that issue please tell me.. I try several way to do this if I delete the row on my grid :

jQuery("#list").delRowta(id); - that is OK

but when try do this :

var selectedRow =  jQuery("#list").getGridParam('selrow'); //this work
var data =  jQuery("#list").getRowData(id);// this method doesn't work

I need the way to get data from row

0

精彩评论

暂无评论...
验证码 换一张
取 消