Using tab to select the next cell

Resolved
Accobat Development asked on May 10, 2021

Hello,
 
Is when possible to move the selected cell indicator using Tab.
Selected cell = rowIndex = 4, columnIndex = 2
pressing tab
New selected cell = rowIndex = 4, columnIndex = 3
 
Or is it possible to get a setSelectedCell method.
so you can call pivot.setSelectedCell(4,3)
 
/Jimmy

6 answers

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster May 11, 2021

Hi Jimmy,
 
Thank you for posting your question.
 
Currently, it is not possible to move the cell selection with the Tab key. Instead, please use the arrow keys to select different cells in the grid. 
 
Please let us know if this helps.
 
Best regards,
Mykhailo

Public
Accobat Development May 11, 2021

Hi Mykhailo,
 
Is it possible to get a setSelectedCell method then?
 
/Jimmy

Public
Accobat Development May 11, 2021

And will this be possible in the future?
 
/Jimmy

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster May 12, 2021

Hi Jimmy,
 
Thank you for your swift response.
 
We are not planning to introduce cell focus shifting with the Tab key in the near future.
 
Speaking of setSelectedCell(), yes, there is an experimental API call with that name. You can try using it like this:
 

flexmonster.setSelectedCell(5,4);

 
where 5 is the row index, and 4 is the column index of the cell you want to select. 
 
Hope you find this helpful!
 
Regards,
Mykhailo

Public
Accobat Development July 19, 2021

Hello Mykhailo,
How do you expose the `setSelectedCell()` function when using typescript?
/Jimmy

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster July 20, 2021

Jimmy,
 
Since the setSelectedCell() function is not defined in the flexmonster.d.ts types definition file, it is not by default available for use in TypeScript.
 
To get around this, simply set any as the Flexmonster instance's type:
 

const pivot: any = new Flexmonster({
...

 
Once you do this, you can use the setSelectedCell() function without any limitations:
 

pivot.setSelectedCell(3,3);

Please let us know if this helps.
 
Best regards,
Mykhailo

Please login or Register to Submit Answer