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
Hello,
I create a aspx page with selfReferencing webGrid and ISDataSource,The first-level data can be displayed properly,when I click the plus icon to get second level data, raise this error.
SQL:
CREATE TABLE [dbo].[FrameOU]( [OUGuid] [nvarchar](50) NOT NULL, [OUName] [nvarchar](50) NULL, [OrderNumber] [int] NULL, [HasChildOu] [int] NULL, [HasChildUser] [int] NULL, [ParentOUGuid] [nvarchar](50) NULL, CONSTRAINT [PK_FrameOU] PRIMARY KEY NONCLUSTERED ( [OUGuid] ASC ) ON [PRIMARY] )
Thanks!
From the snippet code, it seems that you are trying to implement “load-on-demand child retrieval” scenario where the load-on-demand data retrieval is handled at DataSource level, in this case is ISDataSource.
A sample, SelfRef_LoadOnDemandChildRetrieval.aspx, that shows this such scenario is available in WebGridSamples project. The live sample version is available at http://live.intersoftpt.com/cs/WebGrid/LoadonDemandChildRetrieval.aspx?.
The sample demonstrates load on demand child data retrieval. The sample uses ISDataSource control to perform codeless load on demand data retrieval. Follow are the important things you need to know to perform codeless load on demand data retrieval:
Please refer to this sample or the walkthrough article, Walkthrough: Creating Self Reference LoadOnDemand WebGrid, that can be found in WebGrid’s documentation.
Hope this helps.
Hello Yudi,
Problems remain. In order to reproduce the problem, I uploaded a sample code. Please read the ReadMe.txt.
The first grid raise error when expand the top level row,but the second grid work well.
Please try to configure the SQL Select Statement of your Northwind.xsd file into the following.
select * from frame_OU where ParentGuid=@ParentGuid SELECT * FROM Frame_OU WHERE (ParentGuid IS NULL) OR (ParentGuid = ?)
This should helps.
Is the sql wrong?
You can see the sample by the url:
http://demo.epoint.com.cn:8080/Website2/Default.aspx
Thanks.
Sorry for the late respond.
I was able to reproduce the same issue on my local end as shown in the following link: http://demo.epoint.com.cn:8080/Website2/Default.aspx.
After investigate the issue further, it was clear that the issue was caused by the usage of “_” (underline) character as the table-name.
In the ReadMe.txt file – enclosed as attachment in your previous post – “Frame_OU” table is created after execute following sql command.
Using this table, Frame_OU, will raise the problem. Next, I tried to create a new table named “FrameOU”; set the the new sql select statement command of the Northwind.xsd into the following; bind WebGrid to FrameOU table through ISDataSource; and view the page in browser.
The “FrameOU” table works smoothly without any error.
This problem is considered as bug and has been forwarded to WebGrid development team to be fixed. It is filed under work item #955. Until the hotfix release, the quickest workaround is to avoid using _ (underline) character in the table-name.
I enclosed the modified sample as reference. Please try to open Default.aspx sample file and compare it to Default2.aspx in browser. The Default.aspx sample file is the sample that works.
Hope this helps. Thank you.
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