Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
240
UltraDataSource and Dataset
posted

Earlier I was using directly binding dataset to Datagrid and at in some other function used to get that dataset from grid. e.g.

dataSetSubTabData = (

DataSet) ugGridData.DataSource;

But after changing grid datasource to UltraDataSource, above line of code is not working and gives wrong casting exception.

Is there any way to get the dataset from grid now? I need that dataset because some operation needs to be done on that.

 

  • 12773
    posted

    Hello,

    If I understood correctly, you are using now UltraDataSource and you want to retrieve back the dataset from the grid. I guess that you are using some function to transfer the dataset that you load to UltraDataSource.Am I right? First you can’t use a direct cast to retrieve DataSet, the DataSet and UltraDataSource are completely different types.

    You probably may take all the records of the UltraDataSource and build the DataSet, but you will lose the advantage of the UltraDataSource. Or another way to get back your data is to have cached DataSet that you need to synchronize with the current DataSource of the grid.
    But generally using DataSet and UltraDataSource is not efficient.

    I think you may found here more details about your scenario: http://forums.infragistics.com/forums/p/5781/25750.aspx#25750

    You may take a look also at:  WinGrid Performance Guide

     I hope this is helpful for you scenario.

    Best regards,
    Dimi
    Developer Support Engineer
    Infragistics Inc.