kendo-uikendo-gridangular-kendo

How to disable/hide/remove fields inside the kendo UI pop up editable for HTTP POST


I have this code for my schema:

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
                        }
                    }
                }
            }

Columns code snippet

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

I would like to disable the last two (status and unlocalized count). As you can see I have already used the editable and nullable. My goal is to send an HTTP post without the two which has this JSON format

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

Solution

  • UPDATE: I used a editor that has a function.

    function(container){
    
      $('label[for=status]').parent().remove();
    
    }
    

    which looks like this now

    {
      field: "status",
      title: "Status",
      editable:false,
      editor:function(container){
                           $('label[for=status]').parent().remove();
                       }
    }