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,
In our project we use WebCombo 6.0 integrated in a WebGrid 9. Data source and columns are assigned at runtime based on the current setup for both WebGrid and WebCombos.
The scenario we used for many years and worked fine assigns the datasource to a web combo at the InitializeDatasource event. In there, a data table is assigned to the .datasource property of WebCombo. After this, WebComboColumn objects are created programmatically and added to WebCombo columns property since not all datasource's columns need to be displayed. Additionally at this step, captions are assigned.
A few days ago, we upgraded to WebGrid 10 and WebCombo 7 (Premier studio 2016 R1) in order to deal with the problem in the latest version of Firefox where editing was not working on WebGrid. We applied successfully the patch you mention in another thread and everything worked almost ok.
The aforementioned scenario does not work anymore. Whenever a WebGrid page is loaded that contains one or more WebCombos, we get the following error:
An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at ISNet.WebUI.ISCollectionBase.IntInsert(Int32 index, INamedObject value)
at ?.?.(DataView ??)
at ?.?.??(DataView
, String ?)
at ISNet.WebUI.WebCombo.WebCombo.DataBind()
at ISNet.WebUI.WebCombo.WebCombo.OnInitializeDataSource(Object dataSource, Boolean isFlyRequest, String queryText, Int32 startRow, Int32 endRow, Int32 rowCount, String additionalFilters, Boolean isDDClicked)
at ISNet.WebUI.WebCombo.WebCombo.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I assume that after the call of our InitializeDatasource handler, combo columns are created by the framework itself resulting to duplicates.
Apparently we need to adapt our way of dealing with the component's events but we haven't come up with something up to now.
This is a quite urgent problem so any help would be appreciated,
Regards,
Dimitris
Adding the following line in InitializeLayout event handler seems to solve the problem:
combo.LayoutSettings.AutoColumnOrdering = False
Many thanks to Jolis from Live Chat!
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