iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi!I am trying to bind a custom object list to a WebGrid by using the ISDataSource. Its exact the same as in example BindingGenericCollection.aspx from the ISDataSource samples.I always get the error message:
Unable to cast object of type System.Collections.Generic.List[GridTest1.Customer] to type ISNet.WebUI.DataSource.IHierarchicalListCan you help me please?I have attached a piece of code to demonstrate the issue.Thanks in advance for your help.Best regardsMartin
In order to bind the CustomObject to the WebGrid, you will need a collection object which implements at least CollectionBase and IHierarchicalList. A sample for such scenario has been provided in the BindtoHierchicalCustomObject.aspx sample on the WebGrid sample. In the sample, the collection also implements IObjectRelations in order to support the hierarchical data.
In your scenario, you could opt to not implement the IObjectRelationssince you are not using hierarchical data.
Thanks for your answer!
This worked fine!
regards Martin
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname