我试图将参数传递给Flexigrid的Web服务调用。如何使用FlexiGrid将参数传递到Web服务调用
我已经设置FlexiGrid工作得很好,除非当我尝试传递一个参数到我的Web服务调用,但当尝试加载具有该参数的网格时看到500内部服务器错误。
理想情况下,当用户点击提交时,它会调用一个javascript函数来调用flexigrid的ajax调用,但是我在哪里看到Firebug中的500内部服务器错误。
这是说lastName
参数从Web服务调用中丢失。该参数是从姓氏搜索文本框中获取的。
任何帮助表示赞赏,因为我是FlexiGrid的新手。
这里是我的Ajax调用:
$("#userflexiGrid").flexigrid({
url: 'FlexiGridService.asmx/GetDirectory',
params: [{ name: 'lastName', value: 'doe'}],
dataType: 'xml',
colModel: [
{ display: 'Id', name: 'Employeeno', width: 30, sortable: true, align: 'left' },
{ display: 'Name', name: 'Employee', width: 130, sortable: true, align: 'left' },
{ display: 'Bureau', name: 'Bureau', width: 180, sortable: true, align: 'left' }
],
searchitems: [
{ display: 'Name', name: 'Employee' },
{ display: 'Bureau', name: 'Bureau' },
],
sortname: "Name",
sortorder: "asc",
usepager: true,
title: 'Flexi Users',
useRp: true,
rp: 20,
showTableToggleBtn: false,
pagestat: 'Displaying: {from} to {to} of {total} matches.',
//width: 700,
singleSelect: true,
onSubmit: addFormData,
height: 260
});
'PARAMS' 我的作品。看到这里http://stackoverflow.com/a/7468213/588759 – rofrol 2012-04-18 11:47:25