简体   繁体   English

如何将复选框列添加到jquery JTable?

[英]How Add Check box Column to jquery JTable?

I read Jtable references and saw samples , I want to add check box column to Jtable result and each of them have unique ID . 我读了Jtable引用并看了样本,我想在Jtable结果中添加复选框列,每个都有唯一的ID。

Have Jquery Jtable check box column by default ? 默认情况下有Jquery Jtable复选框列吗?

Or can every body tell me sample ? 或者每个人都可以告诉我样品吗? this is my code : 这是我的代码:

     $('#PersonTableContainer').jtable({
        title: 'Table of people',
        actions: {
            listAction: '/GettingStarted/PersonList',
            createAction: '/GettingStarted/CreatePerson',
            updateAction: '/GettingStarted/UpdatePerson',
            deleteAction: '/GettingStarted/DeletePerson'
        },
        fields: {
            PersonId: {
                key: true,
                list: false
            },
            Name: {
                title: 'Author Name',
                width: '40%'
            },
            Age: {
                title: 'Age',
                width: '20%'
            },
            RecordDate: {
                title: 'Record date',
                width: '30%',
                type: 'date',
                create: false,
                edit: false
            }
        }
    });

Have you seen this page: SelectingRows 你看过这个页面了吗: SelectingRows

You add the checkbox field like this: 您可以像这样添加复选框字段:

            RowCheckbox: {
                title: 'Status',
                width: '12%',
                type: 'checkbox',
                values: { 'false': 'Passive', 'true': 'Active' },
                defaultValue: 'true'
            },

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM