Error: An item with the same key has already been added

My implementation of dhtmlxRequestHandler is failing in ProcessRequest. Based on the error, I expected to see duplicate keys in Request.Params, but they all appear to be unique. Any idea what else I should look for?


Here’s the stack trace:

at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) at System.Collections.Generic.Dictionary2.Add(TKey key, TValue value)
at dhtmlxConnectors.DataRequest.GetRowValues(NameValueCollection QueryString, String rowID)
at dhtmlxConnectors.DataRequest.ParseDataActions(NameValueCollection QueryString)
at dhtmlxConnectors.DataRequest.ProcessRequest(NameValueCollection QueryString, NameValueCollection Form)
at dhtmlxConnectors.dhtmlxConnector`1.ProcessRequest(NameValueCollection QueryString, NameValueCollection Form)
at dhtmlxConnectors.dhtmlxRequestHandler.ProcessRequest(HttpContext context)
at cadeDhtmlxRequestHandler.ProcessRequest(HttpContext context) in c:\projects\NPSAS12\Alpha - Dev\SchoolSite\npsasschool\App_Code\cadeDhtmlxRequestHandler.cs:line 25

Found the problem. I was selecting the same column more than once in my connector.

Maybe it would be nicer for this to fail earlier. It failed when I tried to update the values in the grid; the linkage to the select statement isn’t obvious at that point. :bulb: