View Full Version : Changing the selecte item in a dataview

14 May 2012, 5:38 AM
I have a dataview that allows single selection only. And that leads to the opening of a document, when a document is open it's possible to change to the next and previous document.

I was wondering if there is a method in data view or a way to change the item that has a selection class.

I'd want to do the same with a grid and a tree.

I've tried to find a method or methods that fit my needs in the docs, but I've come up empty handed.

I'm hoping for either a confirmation that there's no direct method or an easy way to do this.

14 May 2012, 8:14 AM
view.select its the method that you want:

select( Ext.data.Model[]/Number records, [Boolean keepExisting], [Boolean suppressEvent] )
Selects a record instance by record instance or index.

records : Ext.data.Model[]/Number
An array of records or an index
keepExisting : Boolean (optional)
True to retain existing selections
suppressEvent : Boolean (optional)
Set to true to not fire a select event

14 May 2012, 9:40 AM
that definitely eased the search and nearly instantly led me to how I can do it with trees and grids THANKS