Hello out there,
I've implemented a lazy load algorithm for the grid before using some grid events. This worked very good for all scrolling possibilities (with the scroll bar and also with the keyboard): the grid loads the next row block when the end of the grid/data is reached.
Now I want to implement this with an grid in cards mode and this seems not to work so easily.
Can someone suggest some way to do this easily?
Thanks alot,
Frank
Hi Frank,
It's hard to say without knowing more about which events you are using to load the grid. Why does CardView make any difference?
Are you aware that the UltraDataSource allows you to load the data into the grid on-demand? Check out the Virtual Mode sample in the WinGrid Samples explorer.
At the moment I'm using normal DataSets and the Grid event "AfterRowRegionScroll" to load new chunks of data from an WCF service.
This event is not called in the card mode, instead AfterCardsScroll is called, but this behaves different.
Is it possible to load blocks (e.g. 40 rows) at once when using the UltraDataSource Virtual Mode?
Thanks,
Frank Hauptlorenz said:At the moment I'm using normal DataSets and the Grid event "AfterRowRegionScroll" to load new chunks of data from an WCF service.
So I guess you are loading a few more rows than you need at any one time so that the scrollbar has room to scroll a little?
I'm afraid I've never tried anything like that, so I really can't offer much advice on how to do it.
Frank Hauptlorenz said:Is it possible to load blocks (e.g. 40 rows) at once when using the UltraDataSource Virtual Mode?
The way the virtual mode works is that the UltraDataSource fires events any time it needs more data. If you scroll the grid down a page, the grid will ask the data source for the rows it needs to display at that time. It fires the events on a row-by-row basis, but you you load the data is up to you. You can certainly load more data that the grid requests if you like - although I can't see why you would want to.
Hi Mike,
it's working ;-)
The HeaderClickAction is really tough to find, I did a search within the infragistics documentation to find it....
Thank you very very much,
Frank Hauptlorenz said:the first issue is working when I set "SyncWithCurrencyManager" to false.
So then this means that the CurrencyManager was setting the position to the first row of data for some reason. You are probably doing something to the data source that is causnig it to Reset.
Frank Hauptlorenz said:the second one... hm, it seems to me that the grid itsself want's to sort (I'm supplying already sorted data).
The grid has to load all of the data in order to sort it. If you don't want the grid to do any sorting, then you can set the HeaderClickAction to one of the External options. This will make the headers display the sort indicators but the grid will not perform any actual sorting, so you can sort the data source yourself.
the first issue is working when I set "SyncWithCurrencyManager" to false.
the second one... hm, it seems to me that the grid itsself want's to sort (I'm supplying already sorted data).
Do you have any suggestions?
Thanks,Frank
it's me again.
I've implemented now the same solution with the UltraDataSource which is working very good, but there are still 2 issues existing:
1st:
scrolling with the keys is working very fine. Scrolling with the scrollbar not. If the scrollbar reaches it's end, it issues the loading of the next rows and afterwards the grid switches back to the first row. Why?
2nd:
The event for supplying the data is normally only called for the visible rows. But if I activate sorting on one of the columns (remember: card mode) the event is called again and again and again... Why?
We are using NA 2008.1 at the moment and are forced to.
That makes sense. So then basically, when the UltraDataSource asks you for a single row and you haven't already loaded it, you could load that row and as many others as you want in one operation. Then when one of the other rows is loaded, you will already have it in memory and you can just pass in the data without loading it from the back end.
I've forward this thread over to our Developer Support group so they can check it out.