cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

List select everything by default

fgrondin
12-Amethyst

List select everything by default

Hey guys,

How can I select all item in the list by default? Now this is what I have so far, but as you see, the selected rows in the list doesn't show anything. But then, if I change the selection, the grid is populated with the new selected item. So basically, I can select every rows by default, but the it appears like the selected rows is null. And I would need the selected rows to be All instead at default.

ACCEPTED SOLUTION

Accepted Solutions
posipova
20-Turquoise
(To:fgrondin)

I created a Jira on this, /PSPT-3737.

I can select all items of the list at default (upon mashup loading) but they do not reflect in the grid immediately:

View solution in original post

3 REPLIES 3
posipova
20-Turquoise
(To:fgrondin)

Let me run this on my instance, and I will get back to you soon.

fgrondin
12-Amethyst
(To:posipova)

Just for more information about this,

I've tried adding a property like the autoselectfirstrow.

I've got this part of code which doesn't work.

//else if ( this.getProperty( 'SelectAllDefault' ) === true )

                    //{

                    //    TW.log.error( "1b" );

                    //    // do this with delay ... if you have a lot of grids accessing the same data, they may not have populated and we're already telling them the row to select

                    //    setTimeout( function ()

                    //    {

                    //        // make sure we haven't been destroyed

                    //        if ( mygrid !== null )

                    //        {

                    //            TW.log.error( "2b" );

                    //            // select the first row

                    //            var numRows = mygrid.getRowsNum();

                    //            TW.log.error( numRows );

                    //            var selected = [];

                    //            for ( var i = 0; i < numRows; i++ )

                    //            {

                    //                selected.push( i );

                    //                TW.log.error( "numb : "  +numRows );

                    //            }

                    //            thisWidget.ignoreSelectionChanges = true;

                    //            for ( var i = 0; i < selected.length; i++ )

                    //            {                                

                    //                mygrid.selectRow( selected, false, false, true );

                    //                TW.log.error( "selected : " + selected );

                    //            }

                    //            thisWidget.ignoreSelectionChanges = false;

                    //            thisWidget.updateSelection( 'Data', selected );

                    //        }

                    //    }, 100 );

                    //}

posipova
20-Turquoise
(To:fgrondin)

I created a Jira on this, /PSPT-3737.

I can select all items of the list at default (upon mashup loading) but they do not reflect in the grid immediately:

Announcements


Top Tags