Multiple columns of bit data type

Multiple columns of bit data type

Chandler242Chandler242 Posts: 36Questions: 12Answers: 0

Hello,

I have multiple fields in Editor, which all have a data type of bit or Booleans:

editor_0 = new $.fn.dataTable.Editor({
                ajax: {
                    url: "/api/dataSetComplete",
                },
                table: "#dsAll",
                fields: [{                   
                    label: "Median",
                    name: "A_Run_Proj_Input_Data.MedianIncluded",
                    type: "select",  
                    options: {
                        "Yes": true,
                        "No": false
                    }
                }, {                   
                    label: "Shoulder",
                    name: "A_Run_Proj_Input_Data.ShldIncluded",
                    type: "select", 
                    options: {
                        "Yes": true,
                        "No": false
                    }
                }, {                   
                    label: "Ramp",
                    name: "A_Run_Proj_Input_Data.RampIncluded",
                    type: "select", 
                    options: {
                        "Yes": true,
                        "No": false
                    }
                }
                ]
            });

It seems that these fields interfere each other by allowing only one to be 'true' at the same time. If one is chosen to be true the other fields two will become false automatically.

Could anyone can explain why?

Thank you,

YL

Sign In or Register to comment.