为什么easyui 的datagrid的URL访问action没有效果?不会进入action 60

我用的SSH和easyui==jsp页面===<scripttype="text/javascript">$(function(){$('#tt').datagrid({... 我用的SSH和easyui
==jsp页面===
<script type="text/javascript">
$(function(){
$('#tt').datagrid({
url: 'findcityaction.action',
title: '城市列表',
width: 700,
height: 'auto',
fitColumns: true,
columns:[[
//{field:'itemidd',title:'Item ID',width:80},
{field:'id',title:'ID',width:120},
{field:'cityname',title:'城市名称',width:80,align:'right'},
]],
});
});
</script>
展开
 我来答
yangxing5200
2014-05-14 · TA获得超过105个赞
知道答主
回答量:84
采纳率:100%
帮助的人:19.6万
展开全部

具体还得贴代码出来才知道。下面我贴出我的两个例子

        $(datagridId).datagrid({
            url: '@Url.Action("GetUsers")',
        fit: true,
        rownumbers: true,
        pagination: true,
        singleSelect: false,
        pageSize: 10,
        pageList: [10, 20, 50],
        sortName: "UserID",
        sortOrder: "desc",
        loadMsg: "数据加载中",

        columns: [[
            { field: 'ck', checkbox: true },
            { field: 'UserID', title: 'ID', width: 100, hidden: true },
            { field: 'UserName', title: '账号', width: 100 },
            { field: 'FullName', title: '全名', width: 100 },
            { field: 'EntityName', title: '公司' },
            { field: 'DepartmentName', title: '部门', width: 100 },
            { field: 'Email', title: '邮箱' },
            {
                field: 'action',
                title: '操作',
                align: 'center',
                formatter: function (value, row, index) {
                    return '<button  onclick="resetPassword(this)" >重置密码</button>' +
                           '<button  onclick="editRow(this)" >修改</button>' +
                           '<button onclick="deleterow(this)">删除</button>';
                }
            }
        ]],
        toolbar: "#tb",
        onDblClickRow: function (rowIndex, rowData) {
            $(datagridId).datagrid('unselectAll');
            $(datagridId).datagrid('selectRow', rowIndex);
            $(dialogId).dialog({ title: "正在编辑:" + rowData.UserName }).dialog("open");
            $(formId).form('load', rowData);
        }
    });
    
    
    
    <table id="dataGrid" class="easyui-datagrid" data-options="url:'@Url.Action("GetAgreementList")',fit: true,rownumbers: true, pagination: true,singleSelect: false,sortName: 'AGREEMENTID',sortOrder: 'desc',toolbar: '#tb'">
    <thead>
        <tr>
            <th data-options="field: 'ck', checkbox: true "></th>

            <th data-options="field: 'AGREEMENTID', title: 'AGREEMENTID', width: 100, hidden: true"></th>
            <th data-options="field: 'AGREEMENTCODE', title: '协议号', width: 100, hidden: false"></th>
            <th data-options="field: 'STATUS', title: '状态', width: 30, hidden: false" formatter="formatter"></th>
            <th data-options="field: 'CustomerName', title: '货主单位',  hidden: false"></th>
          
            <th data-options="field:'action',title: '操作',align: 'center', formatter: function (value, row, index) { return '<button class=\'easyui-linkbutton\' data-options=\'\'  onclick=\'openUpdateWindow(this)\' >修改</button>'}"></th>
        </tr>
    </thead>

</table>
更多追问追答
追问
我想知道URL的各种写法和意思
追答
URL 也就是一个能返回json对象的地址。
你可以写成xxxx.json 可以写成你对应的action地址,或者ashx里面对应的请求地址
总之通过这个url 要返回一个符合datagrid 数据规范的json对象。
q372106673
2014-08-28
知道答主
回答量:1
采纳率:0%
帮助的人:1317
展开全部
问题解决了哥们吗?? 我也遇到这个问题了 求解决方案
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 1条折叠回答
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式