Hello together,
my company has many tables with much more rows. So i had programmed a background loader, that loads these rows into da .net dataset.
Now my question is:
Is it possible to show the rows of a table while the table get filled? This means, that the ultra grid has to show the rows which are currently in this table.
Currently it is, that all rows will be displayed, after the load has finished.
If it is possible it would be very great.
Best regards,
The LittleProgrammer
This is possible, but it's not easy. You cannot bind the grid to a data source that is being populated on another thread, because the data source will send notifications to the grid that are not on the same thread and this is almost certain to cause problems. If you are going to use a separate thread, then you have to make sure that the data is properly marshalled to the UI Thread. It's really too complex a subject to discuss in a forum post, but I don't think what you are trying to do is very practical. After all, if you load the data onto the UI thread in parts, then it would defeat the purpose of using the background thread... if you are going to do that, you might as well just load the data on the UI Thread.
The WinGrid does have Load-On-Demand functionality, but you would probably need to use the UltraDataSource as an intermediary between the grid and the data source. Again, I'm not sure threading would help here.
Hello,
first thanks for your informations. So i would like to try to use the UltraDataSource. But i don't know how i could bind an dataset to the UltraDataSource. Could you give me an example or an link?
This would be very nice from you.
r_senapati said:From sample that is installed, shows only output, can you tell me the code where it is written about the binding of UltraDataSource to UltraGrid, Try to reply asap.
I'm not sure what you mean. The samples and all of the source code for them is included in the NetAdvantage SDK, which you can download separately from the Infragistics web site.
Hi,
From sample that is installed, shows only output, can you tell me the code where it is written about the binding of UltraDataSource to UltraGrid, Try to reply asap.
Thanks in advance.
No, UltraDataSource is a data source. You can bind controls to it, but it does not bind to another data source.
The idea behind the Load-On-Demand functionality is that you bind a control, like UltraWinGrid, to the UltraDataSource and the UltraDataSource fires event to let you know when it needs data. This way, you do not have to load all of the data at once.
Where the data comes from is irrelevant to the UltraDataSource. So it's up to you to determine how to load the data from the data base as needed.
Hello Mike,
thanks for this information, but i had seen this before. I think your ultradatasource is a very good programmed tool, the standard binding source from microsoft doesn't have these high-performance. This is an criterion why i want to use it.
My problem is, i have an dataset and this will get filled by my data access tool (it only accept datasets or datatables) and i don't want to use an other tool for data access.
Is there any chance to bind this dataset or an datatable to an ultradatasource?
I know i can enumerate on dataset tables rows and add them manualy to the ultradatasource. But this workaround is not that want i'm going to try. This costs much runtime and if i want to save my dataset or datatable with my tool, i have to convert the ultradatasource to an dataset (same procedure like above, but revers).
This isn't very efficient.
I hope you understand what i mean.
Best greets and have a nice weekend.
Hi Tobias,
There's a sample installed with NetAdvantage that displays 1 million rows in the grid. The data in this example is just generated randomly, but the principle is the same - you just get the data from your data source.
I beleive the same sample exists both under the UltraDataSource samples and in the WinGrid SamplesExplorer sample.