   {
    "keyColumn": "category_id",
    "wildsearch": "true",   
     "reference": {
        "referenceTable": " cms_page_sections",
        "referenceColumn": "section_id",
        "referenceTableForiegnKey": "section_id"
    },
    "detailHeaderColumnPrefix": "Categories: ",
    "handleFile": "true",
    "detailHeaderColumns": [
        "title"
    ],
    "breadCrumbColumn": "title",
    "orderBy": {
        "category_id": "DESC"
    },
    "listColumns": [        
        "category_id",
        "category_parent_id",        
        "title",      
        "category_alias",        
        "icon",
        "enabled"
    ],
    "showColumns": [
        "category_id",
        "section_id",
        "category_parent_id",
        "title",        
        "category_alias",
        "description",
        "icon",
        "enabled"
    ],
    "detailColumns": [        
        "category_id",
         "section_id",
        "category_parent_id",        
        "title",      
        "category_alias",
        "description",
        "icon",
        "enabled"
    ],     
    "columns": {
            "category_id": {
                "name": "ID",
                "editoptions": {
                    "type": "hidden"
                }
            },
            "category_parent_id": {
                "name": "Parent",    
                "sortable": "true",
                "searchable": "true",                 
                "editoptions": {
                      "type": "select",
                      "source": "Cmshelper::getAllParentCategory",
                      "source_type": "function",
                      "label": "Parent",
                      "class": "select"
                  },
                 "external": "true",
                 "externalOptions": {
                    "externalTable": "cms_category",
                    "externalColumn": "category_id",
                    "externalShowColumn": "title"
                    }
            },
            "section_id": {
                "name": "Section",
                "sortable": "true",
                "searchable": "true",
                "external": "true",
                "externalOptions": {
                    "externalTable": "cms_page_sections",
                    "externalColumn": "section_id",
                    "externalShowColumn": "title"
                    },
                    "editoptions": {
                        "type": "hidden"
                    }
            },                     
            "title": {
            "name": "Title",
            "searchable": "true",
            "sortable": "true",
            "editoptions": {
                "type": "textbox",
                "label": "Title",
                "class": "textbox",
                "hint": "Title of the page category",
                "validations": [
                    "required"
                ]
                }
            },
            "category_alias": {
                "name": "Alias",
                "searchable": "true",
                "sortable": "true",
                "editoptions": {
                    "type": "textbox",
                    "label": "Alias",
                    "class": "textbox",
                    "validations": [
                        "required"
                    ]
                }
            },
            "description": {
                "name": "Description",
                "searchable": "true",
                "sortable": "true",
                "editoptions": {
                   "type": "htmlEditor",
                    "label": "Description",
                    "class": "textarea",
                    "hint": "Description for the category"
                }
            },
            "icon": {
            "name": "Icon",
            "editoptions": {
                "type": "file",
                "label": "Icon",
                "class": "file",
                "hint": "Upload file for this section"
            },
            "external": "true",
            "externalOptions": {
                "externalTable": "tbl_files",
                "externalColumn": "file_id",
                "externalShowColumn": "file_id"
            }
            },           
            "enabled": {
                "name": "Status",
                "searchable": "true",
                "sortable": "true",
                "listoptions": {
                    "type": "button",
                    "customaction": "Cmshelper::changePageCategoryStatus",
                    "enumvalues": {
                        "Y": "Enabled",
                        "N": "Disabled"
                    },
                    "buttonColors": {
                        "Y": "green",
                        "N": "red"
                    }
                },
                "editoptions": {
                    "type": "select",
                    "source": {
                        "Y": "Enabled",
                        "N": "Disabled"
                    },
                   "default":"Y",
                    "source_type": "array",
                    "label": "status",
                    "class": "select",
                    "enumvalues": {
                        "Y": "Enabled",
                        "N": "Disabled"
                    },
                  "validations": [
                    "required"
                ]
                }
            }
    },
   "relations": {
        "Contents": {
            "name": "Contents",
            "section": "pageContent",
            "child_table": "cms_content",
            "parent_join_column": "category_id",
            "child_join_column": "category_id"
        }
     },
        "opertations": [
            "add",
            "view",
            "edit",
            "delete"
        ]
    }
    
   