Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Plumsail add a button to the left side of the toolbar, which will be hidden until an item is selected

fd.spRendered(function() {
    //new button
    var button = {
        text: 'Get info',
        class: 'btn-primary',
        visible: false,
        icon: 'Info',
        iconType: 0,
        click: function() {
            var items = fd.control('SPDataTable1').selectedItems;
            var ids = 'Selected item IDs: ';
            items.forEach(function(item){
              ids += item.ID + '; ';
            });
            alert(ids);
        }
    }

    fd.control('SPDataTable1').ready(function(dt) {
        //dt parameter is the same as fd.control('SPDataTable1')
        dt.buttons.push(button);

        dt.$watch('selectedItems', function(items) {
            if(items.length > 0){
                button.visible = true;
            }
            else{
                button.visible = false;
            }
        });
    });

});
Comment

PREVIOUS NEXT
Code Example
Javascript :: devlop 
Javascript :: js get data from liocalstorage 
Javascript :: plumsail on change event value 
Javascript :: terraform for loop json 
Javascript :: html vue input enabled 
Javascript :: multiple variables in one live javascript 
Javascript :: convert string to file angular 
Javascript :: folder array randomizer 
Javascript :: negative index javascript 
Javascript :: javascrript Wrap all individual words in a span tag based on their first letter 
Javascript :: { "typeof": false } 
Javascript :: Angularjs different dependency injection for factories inside controller 
Javascript :: ! function in javascript 
Javascript :: show user profile nodejs pug 
Javascript :: Angular.js : recursive call to an $mdDialog controller 
Javascript :: Json response reactnative fetch login data 
Javascript :: Check if a user joins, leaves, or moves channels discord.js 
Javascript :: javascript array add method 
Javascript :: how to set the x and y axis title in plotly express bar 
Javascript :: Transfer file to server using rsync 
Javascript :: saves javascript 
Javascript :: online jquery converter 
Javascript :: javascript get next month name 
Javascript :: jquery attrib 
Javascript :: Javascript Encapsulation Inheritance Polymorphism Composition 
Javascript :: What Is A Closure: Informal Explanation 
Javascript :: mdn javascript array 
Javascript :: 1--Reverse Bits Algo 
Javascript :: withrouter in react-router v6 
Javascript :: Calculating with Functions 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =