How to get last row first column cell dynamiccly

Closed
Toumku asked on May 19, 2021

Im understanding getCell method gets rowIdx and colIdx.
I want to get last row and first column. example getCell("lastRow", 1).
I can get last row staticly. example getCell(3, 1) 3 is last row in table
But what if i dont know last row in table dynamiccly?
im creating score card which is only gets last row and first column's value. Table's data is refreshable and if user select getCell(3, 1) then clicked refresh button data is refreshed. Two row added in data(again i dont know how many row added). Now last row is no longer 3. it's 5. How to i get last row? im stuck

4 answers

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster May 19, 2021

Hello,

Thank you for contacting us.
 
Please note that the component uses the virtual grid, which is responsible for rendering only rows and columns visible to the user. It allows visualizing thousands of rows without freezing the page. Still, it limits the number of cells available for the mentioned getCell API call. The cell may not be returned if it is not currently rendered or cached in the memory. Therefore, even knowing the last row/column of the table does not always allow to obtain its actual value.
 
Instead, we suggest checking out the following forum thread, describing the workaround for a similar functionality: https://www.flexmonster.com/question/show-subtotal-and-grand-total-in-first-row-in-classic-form/. The sample mentioned in this thread demonstrates how to automatically scroll the table to the last row/column and restore the position afterward.
 
We hope it helps.

Regards,
Illia

Public
Toumku May 19, 2021

Hello Illia,
Your example is scrolling to last row. but it's not selecting any row. i dont need to scroll to total rows or columns. i just need to select last row. u told me "Therefore, even knowing the last row/column of the table does not always allow to obtain its actual value.". so is it imposibble?

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster May 20, 2021

Hello,
 
Thank you for your feedback. We replied to your latest question via email.
 
Please contact us if other questions arise.
 
Regards,
Illia

Public
Toumku May 20, 2021

I responded your email. 
Please check

This question is now closed