Is there a way to have custom button set as active(true)
Is there a way to have custom button set as active(true)
theshrestha
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)}
This discussion has been closed.
Answers
Hi @theshrestha ,
You could add that
button().active()
call into theinitComplete
, so the button is made active when the table has fully loaded.Cheers,
Colin