Wednesday, April 22, 2015

Enable SELECT ALL in a Table and GridX table

  •  Go to Table Coach View 
  •  Under the Event Handlers, Select the LOAD( )  option
  •  With in the code we need to replace this
    gridOptions.plugins.indirectSelection = {headerSelector:true};     in place of 
     gridOptions.plugins.indirectSelection = true;


 GRIDX Table:

    For GRIDX table we need to add two modules. 
  • Indirect Select
  • Extended Select Row 
Go to GridX Coach View
Search for the Indirect Select Module ,you will find below code as commented.

   if (rowSelect != "None") {
                            /*
                                      modules.push(
                                        {
                                              "moduleClass": IndirectSelect,
                                             "all": true
                                        },
                                            RowHeader
                                      );
 
                                      if (rowSelect == "Multiple") {
                                            modules.push(
                                                 {
                                                          "moduleClass": ExtendedSelectRow
                                                    });
                                          } else {
                                modules.push(
                                {
                                  "moduleClass": SelectRow,
                                   "multiple": false
                                });
                          }
                  */

Uncomment the Indirect Extended Select Row and place the following Highlighted code instead of that.

modules.push(
                                        {

                                              "moduleClass": SelectRow,

                                              "multiple": rowSelect == "Multiple",

                                              "selectByIndex": true,

                                              "triggerOnCell": true

                                            },

                                                    RowHeader,

                                                     {

                                                              "moduleClass": IndirectSelect,

                                                              "all": true

                                                        }

                                              );

                                                    } // End of rowSelect != None





No comments:

Post a Comment