03 Oct 2008, 11:21 AM
|
tmshealth
Joined on 10-03-2008
Posts 1
|
issue with ultimatetabstrip and gridviews
|
|
|
|
Hi, I'm having an issue concerning a specific type of error using a databound gridview within the ultimatetabstrip control. I think it probably has something to do with the form posting back to itself, but thats just me hypothesizing. It might also have to do with the fact that the gridviews are in web user controls.
App environment: .NET 3.5, Visual Studio 2008, latest version of Karamasoft UI Suite, ASP.NET front end, C# codebehinds, SQL Server 2000 backend.
I have a launch page, admin.aspx. This page contains an instance of the UltimateTabStrip. In each tab content section I have a reference to a web user control, which contains a databound gridview.
Loading this admin page works fine, and the ultimatetabstrip loads up as normal. Paging between the tabs works perfectly too, rendering the gridviews with no issues. The problem is, I have dynamic editing/deleting/inserting turned on for the gridviews. And when you click on, lets say, the edit link, I get the following error:
Item has already been added. Key in dictionary: 'DISPOSITIONCODE' Key being added: 'DISPOSITIONCODE' Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Item has already been added. Key in dictionary: 'DISPOSITIONCODE' Key being added: 'DISPOSITIONCODE'
Now bear in mind that it doesnt matter what gridview I hit an edit link on, I will get this same error (the key its referring to is for the very first gridview rendered, on the first tab, or I guess the default tab). Please help!
Listed below is the (truncated) listing of: a) the admin launch page, housing the ultimatetabstrip control b) one of the user control pages which renders the gridview within the UTS control
a) (admin.aspx) <kswc:UltimateTabstrip ID="UltimateTabstrip1" runat="server" Scheme="Windows"> <Tabs> <kswc:Tab HeaderText="Dispositions"> <ContentTemplate> <uc1:adminDispositions id="adminDispositions1" runat="server"></uc1:adminDispositions> </ContentTemplate> </kswc:Tab> <kswc:Tab HeaderText="Materials"> <ContentTemplate> <uc2:adminMaterials id="adminMaterials1" runat="server"></uc2:adminMaterials> </ContentTemplate> </kswc:Tab> <kswc:Tab HeaderText="Messages"> <ContentTemplate> <uc3:adminMessages id="adminMessages1" runat="server"></uc3:adminMessages> </ContentTemplate> </kswc:Tab> </Tabs> </kswc:UltimateTabstrip>
b) (adminCustomers.ascx) <asp:GridView ID="gvDispositions" runat="server" AutoGenerateColumns="False" CellPadding="4" DataKeyNames="DISPOSITIONCODE" DataSourceID="dsDispo" ForeColor="#333333" GridLines="None"> <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" /> <RowStyle BackColor="#E3EAEB" /> <Columns> <asp:CommandField ShowEditButton="True" ShowInsertButton="True" /> <asp:BoundField DataField="DISPOSITIONCODE" HeaderText="Code" ReadOnly="True" SortExpression="DISPOSITIONCODE" /> <asp:BoundField DataField="DISPOSITIONDESC" HeaderText="Description" SortExpression="DISPOSITIONDESC" /> <asp:BoundField DataField="DISPOSITIONTYPE" HeaderText="Type" SortExpression="DISPOSITIONTYPE" /> <asp:BoundField DataField="ACTIVE" HeaderText="Active" SortExpression="ACTIVE" /> </Columns> <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" /> <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" /> <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" /> <EditRowStyle BackColor="#7C6F57" /> <AlternatingRowStyle BackColor="White" /> </asp:GridView> <asp qlDataSource ID="dsDispo" runat="server" ConnectionString="<%$ ConnectionStrings ataConnection %>" SelectCommandType="StoredProcedure" SelectCommand="XXX" DeleteCommand="XXX" InsertCommand="XXX" UpdateCommand="XXX"> <DeleteParameters> XXX </DeleteParameters> <UpdateParameters> XXX </UpdateParameters> <InsertParameters> XXX </InsertParameters> </asp qlDataSource>
|
|
|
|
|
|
|
|
|