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 have a table with 3 columns:
- ID [GUID] autoincrement
- LineID [GUID] foreignkey
- ProductID [GUID] foreignkey
For columns LineID and ProductID I use ValueLists.
I set UseValueListForSorting = ValueListSorting.Yes because I want to sort by the DataTextField of Valuelist.
If the data are not grouped I can add or delete rows without problems.
But are the data grouped by LineID I get an errormessage like attached picture.
Regards
Michael
Hello Michael,Thank you for pointing out the issue in this scenario.We have been able to replicate your problem with the exact error message you reported, and will fix it in the upcoming hotfix.The work item # is 431 for your tracking reference.
Hello Michael,
Thank you for pointing out the issue in this scenario.
We have been able to replicate your problem with the exact error message you reported, and will fix it in the upcoming hotfix.
The work item # is 431 for your tracking reference.
As an additional note for the complete solution, you'll need to clear the cached data source upon the data update process to avoid data-locking issue that may happen during the batch update process. This is only required if you're binding to datasource object through InitializeDataSource event.
For example,
protected void grdProductLine_BatchUpdate(object sender, BatchUpdateEventArgs e) { DataRowState rs = DataRowState.Added | DataRowState.Deleted; DataSet dsModified = ((DataSet)grdProductLine.GetCachedDataSource()).GetChanges(rs); if (dsModified != null) { PutDataMaintenanceProductLine(dsModified); grdProductLine.ClearCachedDataSource(); // clear data cache after update } }
Note: You'll need to apply the above codes _in addition_ to applying the upcoming hotfix.
Based on the sample created using the scenario you describe, the issue could not be replicated. Feel free to modify the sample in order to replicate the sample.
Hi Glenn
I send you Database-Backup (SQL Server 2008) file and my sample. I hope you can now replicate the issue.
After changing Connectionstring you should be able to run the sample and get the error like my last post.
In Event grdProductLine_PrepareDataBinding you can commenting out following line (samlpe run without error):
grdProductLine.RootTable.UseValueListForSorting = ValueListSorting.Yes;
Thanks for help!
We failed to open the Database you attach in the previous post. However, using the setting in the code we are able to replicate the issue in our environment. An issue report has been sent to our developer.
In order to solve this issue, we suggest to set the UseValueListForSorting property on the individual column that has WebValueList. For example in the first sample the code used:
grdObj.RootTable.Columns[1].UseValueListForSorting = ValueListSorting.Yes;grdObj.RootTable.Columns[2].UseValueListForSorting = ValueListSorting.Yes;
Instead of:
grdObj.RootTable.UseValueListForSorting = ValueListSorting.Yes;
Now I set the property on the individual column (in PrepareDataBinding Event), but i get the same error message!
WebGridColumn Dependencies = grd.RootTable.Columns[0]; WebGridColumn ID = grd.RootTable.Columns[1]; WebGridColumn ProductID = grd.RootTable.Columns[2]; WebGridColumn AttributeID = grd.RootTable.Columns[3]; WebGridColumn Setpoint = grd.RootTable.Columns[4]; WebGridColumn Min = grd.RootTable.Columns[5]; WebGridColumn Max = grd.RootTable.Columns[6]; WebGridColumn FormatID = grd.RootTable.Columns[7]; WebGridColumn ValueIndex = grd.RootTable.Columns[8]; Dependencies.UseValueListForSorting = ValueListSorting.No; ID.UseValueListForSorting = ValueListSorting.No; ProductID.UseValueListForSorting = ValueListSorting.Yes; AttributeID.UseValueListForSorting = ValueListSorting.Yes; Setpoint.UseValueListForSorting = ValueListSorting.No; Min.UseValueListForSorting = ValueListSorting.No; Max.UseValueListForSorting = ValueListSorting.No; FormatID.UseValueListForSorting = ValueListSorting.Yes; ValueIndex.UseValueListForSorting = ValueListSorting.No;
It's interesting that the data is still inserted into the database!
Michael,
Make sure your column-level initialization codes are not inside !IsPostBack or other conditions. That means, those codes should always be executed during PrepareDataBinding.
Hope this helps,James.
The code was always executed!
Thanks for tip.
Thanks for the additional note.
I am very grateful for such advice!
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