Hello,
Is it possible, in a listformcomponent, to show/scroll from code to a specific row?
For example for the aggrid: foundset.setSelectedIndex(15) will automatically scroll the grid to the 15th row.
Thank you,
Diana
Hello,
Is it possible, in a listformcomponent, to show/scroll from code to a specific row?
For example for the aggrid: foundset.setSelectedIndex(15) will automatically scroll the grid to the 15th row.
Thank you,
Diana
Or does anyone have some tricks to scroll to the bottom of the listformcomponent?
I tried with:
.ag-center-cols-viewport {
display: flex;
flex-direction: column-reverse;
}
but it did nothing for the scrollbar.
Would appreciate some ideas,
Thank you,
Diana
Hi Diana,
did you look into using the plugins.ngclientutils.scrollIntoView() function?
Hi Marc,
I tried with your suggestion,
Unfortunately I could not make it work with the scroll of the listformcomponent, it is either not possible or I could not find the right selector (I also tried with the selectionClass).
But thank you for the idea, good to know this option is there.
Diana
why do you want to scroll to the bottom?
And which bottom? of the currently loaded records (which are only a viewport of the thousands of records that you can have)?
Or really to the last record of the foundset so possible record number 1 million ?
If you want to see the last record sort the other way…
Hi Johan,
Thank you for your reply.
I was trying to build a chat using listformcomponent. To show the last message in a (normal) chat I need to scroll to the bottom of the list.
Since I could not build it using listformcomponent, I moved to building the chat in the aggrid. When you learn how to style the aggrid, it can look very nice
There if i set the foundset’s selectedIndex to the last record, scroll goes down to the bottom, although it often jumps a couple of records up.
//i build my qb
foundset.loadRecords(qb)
var size = databaseManager.getFoundSetCount(foundset)
foundset.setSelectedIndex(size)
It is an aggrid based on the form foundset, and I have max 50 records.
I tried with running this piece of code in the onShow of the chat form, also before showing the chat form, and in both cases I get the same jumpy behavior.
Any ideas in how to eliminate that will be very appreciated.
Thank you,
Diana