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
My webgrid errors when I use the self-referencing feature. Click the Link
Hi George,
The issue is not in the WebGrid, but I think on the ISDataSource configuration. When load on demand is used and the Grid is bound to ISDataSource, you need to configure the SelectSelfReferenceRowMethod property in your ISDataSourceTable, which points to an existing method defined in your table adapter.
To understand further, see the SelfRef_LoadOnDemandChildRetrieval.aspx sample in WebGrid C# Solution. Then open the dsNorthwind_LoadOnDemand.xsd and notice the GetDataBy method defined in the table adapter, which is used to retrieve the self referencing children.
If you need a walkthrough, paste this url in your VS Document Explorer, ms-help://ISNet.WebUI.WebGrid.V7/ISNet.WebUI.WebGrid/Creating Self Reference LoadOnDemand WebGrid.html
James.
James I DID Not get it working.
The sample you provide uses a microsoft Access database. I am using SQL Server, and it does not accept a paremeter in the form (ParentID=?) but rather (ParentID=@Param1)
Hi George, thanks for your response.
I presume you've managed to get it work in SQL Server? Please let me know if you still have other issues.
George,
When using SQL Server, you need to use the named parameter such as @ReportsTo. For instance,
SELECT * FROM Employees WHERE (ReportsTo IS NULL) OR (ReportsTo = @ReportsTo)
Make sure the method name is properly assigned to the SelectSelfReferenceRowMethod in your ISDataSource, then your page should run properly. Note: I've tried to use SQL and it works fine using the above query.
Hope this helps, James.
James, I got it to work. Except that it only goes 1 generation deep.
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