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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

List select everything by default

fgrondin
5-Regular Member

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.

1 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
5-Regular Member
(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:

Top Tags