This example demonstrates some of the utility methods available in Flexicious Ultimate to navigate to specific rows within the grid.

The first method is :

 

gotoKey: This method iterates through the data provider, looking for an object whose “seletedKeyField” property matches the value that is passed in to the method. If this objects exists on a different page, this method will rebuild the grid to draw that page, and navigate to that record. The method will then scroll to the record. If no record is found, this method does nothing.

This example also demonstrates how to add a item to the selection via the selectedKeys property. If you specify the “selectedKeyField”, please add the value of the “selectedKeyField” property on the object that you wish to be selected. If you have not specified a selectedKeyField, please add the object itself.

Also, calling clearSelection will clear out the selected items.

There is an additional piece of functionality that is demonstrated here, which is the quickFind method. Basically, you pass in a string you are looking for, and the grid will iterate through the data provider, adding items where one of the columns has the text that is being search for. This method will return an array collection of such matched objects. You can then call gotoItem on each of the matched objects to navigate to the found records .