Is there a way to have custom button set as active(true)

Is there a way to have custom button set as active(true)

theshresthatheshrestha Posts: 1Questions: 1Answers: 0

i have a custom button

{

                        extend: 'collection',

                        text: 'Custom',

                        autoClose: true,

                        buttons:

                           GetAdditionalButtons(),

                        fade: true,

                    },


//i get button collection as 
function GetAdditionalButtons(){
...............
//loop 
int i=0;
 var tempButton = ({
                    text: .........,
                    value: ......,
                    data: .........,
                    action: function (e, dt, node, config)
                        additionalButtonPress(config.value, tempButton)
                    }
                })
i++;
//endloop
ButtonsCollection.push(tempButton)

...............
}

where i get the collection via a js. How could i make the third button in the array of button active when load.
I am looking at something like

if(i==3){button.active(false)}

Answers

Sign In or Register to comment.