I need to read a large xml file and show it using a WinGrid. Now i use a DataSet. I created a xsd schema and created the DataSet with MSDataSetGenerator (VS2008)
I read that the UltraDataSource has some advantages over the DataSet. Is it possible to create a schema for the UltraDataSource as easy as with MSDataSetGenerator.
The only option i could find was the 'UltraDataSource Designer'.Because it's a complicated xml file, i don't like to create it using the 'UltraDataSource Designer'.
I'm missing something ?
Hi,
I'm not familiar with MSDataSetGenerator, so it's hard to say for sure what you are trying to do. But there isn't any utility to create an UltraDataSet other than the designer.
You could write code to build the bands and columns of the UltraDataSource and then populate it with data in code and then use the Save method to save the data to an XML file, though.
What advantages are you concerned with here? The UltraDataSet does have certain advantages over a DataSet. For one thing, it tends to be faster, since it's relationships are pre-defined. And it also has a load-on-demand mode. But there are also disavantages, like it doesn't have dynamic relationships, and it's not really built to handle interaction between itself and a back end (database) so it doesn't have change tracking.
Thx Mike.
The only thing i need to do is read a xml file and show the contents in a hierarchical grid. I 'm in particular interested in the speed and the load-on-demand mode. I don't need dynamic relationships and interaction between itself and the xml file. (this is not even allowed !). Is it somehow possible to export the layout from WinGrid (created earlier) and import it.
I'm afraid you lost me. There's no way to convert data from a DataSet/DataTable into an UltraDataSource automatically. You would have to load the data into the UltraDataSource programmatically by writing code to copy one to the other. There's no way to convert the DataTable XML into UltraDataSource XML.
If your users cannot update the XML anyway, then you could do this in one of two ways.
1) You can load your XML and then write code to build the UltraDataSource and copy the data into it up front.
2) You could build the structure of the UltraDataSource (bands and columns) and then load the XML data on-demand by handling the events of the UltraDataSource such as CellDataRequested. There's a sample of this technique called the "Virtual Mode Sample" under both the UltraDataSource samples and in the WinGrid Samples explorer.
Mike Saltzman"]There's no way to convert data from a DataSet/DataTable into an UltraDataSource automatically. You would have to load the data into the UltraDataSource programmatically by writing code to copy one to the other. There's no way to convert the DataTable XML into UltraDataSource XML.
When i open the 'UltraWinGrid Designer' all bands and columns are there !
Mike Saltzman"]2) You could build the structure of the UltraDataSource (bands and columns) and then load the XML data on-demand by handling the events of the UltraDataSource such as CellDataRequested. There's a sample of this technique called the "Virtual Mode Sample" under both the UltraDataSource samples and in the WinGrid Samples explorer.