1

私のスキーマには次のコードがあります。

schema: {
                model: {
                    fields: {
                        col1: {
                            type: "string", editable: true, nullable: false,
                            validation:{ required: { message: "Name is Required." } }
                        },
                        col2: {
                            type: "string", editable: true, nullable: false,
                            validation:{ required: { message: "Please Select a Main Language." } }
                        },
                        col3:{
                            type: "Array[]", editable: true, nullable: false,
                            validation:{ required: { message: "Please Select Supported Language(s)." } }
                        },
                        col4: {
                            type: "string", editable: false, nullable: true
                        },
                        col5: {
                            type: "string", editable: false, nullable: true
                        }
                    }
                }
            }

列のコード スニペット

{
                    field: "col4",
                    title: "Column4",
                    width:"200px",
                    editable:false,
                    nullable: true
                },
                {
                    field: "col5",
                    title: "Column5",
                    width:"200px",
                    editable:false,
                    nullable: true
                }

最後の 2 つ (ステータスとローカライズされていないカウント) を無効にしたいと思います。ご覧のとおり、私は既に editable と nullable を使用しています。私の目標は、この JSON 形式の 2 つを使用せずに HTTP 投稿を送信することです

{"col1":"string", "col2":"string","col3":["string"]}
4

2 に答える 2

0

更新:機能を持つエディターを使用しました。

function(container){

  $('label[for=status]').parent().remove();

}

これは今このように見えます

{
  field: "status",
  title: "Status",
  editable:false,
  editor:function(container){
                       $('label[for=status]').parent().remove();
                   }
}
于 2013-11-26T16:51:21.967 に答える