在jQgrid中编辑功能?

时间:2012-11-02 05:24:10

标签: jquery asp.net-mvc jqgrid-asp.net

我有一个jQgrid,我需要为它提供编辑功能,当用户点击某一行时,该行详细信息应该弹出显示...

这是我视图中的jquery代码

    <table id="list" class="scroll" cellpadding="0" cellspacing="0"  width="175"></table>

    <script type="text/javascript">
    $(function () {

        jQuery("#list").jqGrid({
            url: '/Home/GetStudents/',
            datatype: 'json',
            mtype: 'POST',
            colNames: ['StudentID', 'FirstName', 'LastName', 'Email'],
            colModel: [
      { name: 'StudentID', index: 'StudentID', width: 150, align: 'center',sortable:false },
      { name: 'FirstName', index: 'FirstName', width: 150, align: 'center', sortable: true },
      { name: 'LastName', index: 'LastName', width: 150, align: 'center', sortable: false },
      { name: 'Email', index: 'Email', width: 200, align: 'center', sortable: false}],

            pager: jQuery('#pager'),
            width:750,
            rowNum: 15,
            rowList: [5, 10, 20, 50],
            sortname: 'StudentID',
            sortorder: "asc",
            viewrecords: true,
            caption: ' My First JQgrid'
        });

    });

</script>

1 个答案:

答案 0 :(得分:0)

你看起来像那样吗? screen

See here