Quantcast
Viewing all articles
Browse latest Browse all 7205

How to import large amounts of data into ListView (Example)


See the K18260 KB Article for more information.

See also:
ORM Magic–Importing from any datasource

Note
This example cannot be converted to VB.NET because of the VB.NET compiler limitations. We apologize for any inconvenience...

Example Comments

Added By: Tony Tadros at: 12/11/2012 7:51:05 AM    

Hello Devexpress ,

do yo have any update about such functionality,do you have a plan to create or update current rows from excel as built in in the future

Added By: Dennis (DevExpress Support) at: 2/6/2013 1:55:49 AM    

@Tony: Here is a recent blog post on this functionality:
http://community.devexpress.com/blogs/eaf/archive/2012/12/29/orm-magic-importing-from-any-datasource.aspx

You can find more solutions in www.devexpress.com/issue=AS10553

Added By: A. Mummenhoff at: 8/22/2013 10:50:48 PM    

Hello Dennis,

regarding VB conversion and porting to 13.1, here a short guide:

At first you have to fix one line in the C# project to convert it to 13.1
...
RuleSetValidationResult validationResult =
                                    Validator.RuleSet.ValidateTarget(
                                    nestedImportObjectSpace, obj, new ContextIdentifiers(DefaultContexts.Save.ToString()));

After that you can use a converter to create a VB solution.
Then in the VB project Dennis.ImportData, you have to fix the delegate definitions:
...
Public Delegate Function ImportDataDelegate(Of T)(
               ByVal objectSpace As IObjectSpace, <[ParamArray]> ByVal args() As Object) As T

Public Delegate Function ValidateDataDelegate(Of T)(
               ByVal data As T, <[ParamArray]> ByVal args() As Object) As Boolean

and at least you have to be correct in creating a delegate in

Public Shared Function CreateCoolPersonImportDataFromExcelDelegate() As ImportDataDelegate(Of Person)
     Return Function(os As IObjectSpace, args() As Object) As Person
               Throw New NotImplementedException("TODO: you can use the FileHelpers library to ...")
          End Function

End Function

Then the project will run in VB too :-)


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>