.
<ig:DropDownProvider ID="UOM_DropDownProvider"> <EditorControl DropDownContainerMaxHeight="200px" EnableAnimations="False" ID="EditorControl" runat="server" EnableDropDownAsChild="False" DropDownContainerWidth="150px"> <Items> <ig:DropDownItem Key="Kgs" Text="Kgs" Value="1"> </ig:DropDownItem> <ig:DropDownItem Key="Liters" Text="Lts" Value="2"> </ig:DropDownItem> <ig:DropDownItem Key="Meeters" Text="Mtls" Value="3"> </ig:DropDownItem> </Items> </EditorControl> </ig:DropDownProvider>
<ig:BoundDataField DataFieldName="ItemPriority" Key="ItemPriorityKey" Width="7%"> <Header Text="Priority" /> </ig:BoundDataField>
<ig:BoundDataField DataFieldName="RemarksTooltip" Key="RemarksKey"> <Header Text="Remarks" /> </ig:BoundDataField> <ig:UnboundCheckBoxField Key="testKey" HeaderCheckBoxMode="BiState" HeaderChecked="true" /> <ig:TemplateDataField Key="ViewKey" Header-Text="View"> <ItemTemplate > <div id="javawwwww" style="width: 99%; float: left"> <asp:LinkButton CssClass="editDoc-button" OnClick="BtnPRItemViewDoc_Click" TabIndex="112" Visible='<%#Eval("HasDoc")%>' ToolTip="Click to view documents" CommandArgument='<%#Eval("Id")%>' runat="server"></asp:LinkButton> </div> </ItemTemplate> </ig:TemplateDataField> <ig:BoundDataField DataFieldName="Id" Key="Id" Hidden="true"> </ig:BoundDataField> </Columns>
<ig:EditingColumnSetting ColumnKey="ItemPriorityKey" EditorID="WebDataGrid1_DropDownProvider1" ReadOnly="False" /> <ig:EditingColumnSetting ColumnKey="RemarksKey" ReadOnly="True" /> </ColumnSettings>
on 'edit any field and post back' above code trigger following error :(
Multiple controls with the same ID 'it11_0' were found. FindControl requires that controls have unique IDs.
if i don't use any TemplateDataField it working fine
any workaround for solving this issue?
Hello Vishnu,
Which is the the code that produces this error and which control do you try to access via FindControl ? Please provide these answers and I will be happy to suggest accordingly.
hi thanks for your quick response :)
error happen when ever adding following code to the webDataGrid
<EditorProviders><ig:DropDownProvider ID="UOM_DropDownProvider"> <EditorControl DropDownContainerMaxHeight="200px" EnableAnimations="False" ID="EditorControl" runat="server" EnableDropDownAsChild="False" DropDownContainerWidth="150px"> <Items> <ig:DropDownItem Key="Kgs" Text="Kgs" Value="1"> </ig:DropDownItem> <ig:DropDownItem Key="Liters" Text="Lts" Value="2"> </ig:DropDownItem> <ig:DropDownItem Key="Meeters" Text="Mtls" Value="3"> </ig:DropDownItem> </Items> </EditorControl> </ig:DropDownProvider> </EditorProviders>
....... then edit any editable cell
then click on any button placed in TemplateDataField.
i think its not happen in user code.
Hi Hristo, Thanks for your quick response
<%@ Page Language="C#" MasterPageFile="~/XXXXXXX.master" AutoEventWireup="true" EnableEventValidation="false" CodeFile="PRDetails.aspx.cs" Inherits="XXXXXX_Purchase_PRDetails" %><%@ Register TagPrefix="ig" Namespace="Infragistics.Web.UI.ListControls" Assembly="Infragistics4.Web.v12.1, Version=12.1.20121.1005, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" %><%@ Register TagPrefix="ig" Namespace="Infragistics.Web.UI.GridControls" Assembly="Infragistics4.Web.v12.1, Version=12.1.20121.1005, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" %><%@ Register TagPrefix="uclCal" TagName="Calender" Src="~/UserControls/Calender.ascx" %><%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="Ajax" %><asp:Content ID="Content1" ContentPlaceHolderID="PageContent" runat="Server"> <form> <asp:UpdatePanel runat="server" ID="upPnlSpare" UpdateMode="Always"> <ContentTemplate> <ig:WebDataGrid ID="WebDataGrid1" runat="server" Height="350px" AutoGenerateColumns="False" DataKeyFields="id" DefaultColumnWidth="200px"> <Columns> <ig:BoundDataField Key="id" DataFieldName="id"> <Header Text="id"> </Header> </ig:BoundDataField> <ig:BoundDataField Key="Number" DataFieldName="Number"> <Header Text="Number"> </Header> </ig:BoundDataField><%-- <ig:BoundDataField Key="Date" DataFieldName="Date"> <Header Text="Date"> </Header> </ig:BoundDataField>--%> <ig:TemplateDataField Key="Date" Header-Text="View"> <ItemTemplate > <div id="javawwwww" style="width: 99%; float: left"> <asp:LinkButton Text="Link" ID="LinkButton1" OnClick="LinkButton1_Click" runat="server"> </asp:LinkButton> </div> </ItemTemplate><Header Text="View"></Header> </ig:TemplateDataField> </Columns> <EditorProviders> <ig:DropDownProvider ID="UOM_DropDownProvider"> <EditorControl DropDownContainerMaxHeight="200px" ID="EditorControl" runat="server" EnableDropDownAsChild="False" DropDownContainerWidth="150px"> <Items> <ig:DropDownItem Value="1" Text="Kgs" Key="Kgs"> </ig:DropDownItem> <ig:DropDownItem Value="2" Key="Liters" Text="Lts"> </ig:DropDownItem> </Items> </EditorControl> </ig:DropDownProvider> </EditorProviders> <Behaviors> <ig:EditingCore> <Behaviors> <ig:CellEditing> <ColumnSettings> <ig:EditingColumnSetting ColumnKey="Number" EditorID="UOM_DropDownProvider" /> <ig:EditingColumnSetting ColumnKey="id" ReadOnly="true" /> </ColumnSettings> </ig:CellEditing> </Behaviors> </ig:EditingCore> </Behaviors> </ig:WebDataGrid> <asp:Button ID="Button1" runat="server" Text="Save" /> </ContentTemplate> </asp:UpdatePanel> </form></asp:Content>
C#
sing System;using System.Collections;using System.Collections.Generic;using System.Configuration;using System.IO;using System.Linq;using System.Text;using System.Text.RegularExpressions;using System.Threading;using System.Web.Services;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using CrystalDecisions.CrystalReports.Engine;using CrystalDecisions.Shared;using Infragistics.Web.UI.GridControls;using Ionic.Zip;using System.Data;using System.Reflection;public partial class XXXXX_Purchase_PRDetails : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { WebDataGrid1.DataSource = GetDataSource(); } public DataTable GetDataSource() { System.Data.DataTable table = new DataTable("Table"); // Declare variables for DataColumn and DataRow objects. DataColumn column; DataRow row; // Create new DataColumn, set DataType, // ColumnName and add to DataTable. column = new DataColumn(); column.DataType = System.Type.GetType("System.Int32"); column.ColumnName = "id"; column.ReadOnly = true; // Add the Column to the DataColumnCollection. table.Columns.Add(column); // Create second column. column = new DataColumn(); column.DataType = System.Type.GetType("System.Int32"); column.ColumnName = "Number"; column.AutoIncrement = false; column.Caption = "Number"; column.ReadOnly = false; column.Unique = false; // Add the column to the table. table.Columns.Add(column); // Create third column. column = new DataColumn(); column.DataType = System.Type.GetType("System.DateTime"); column.ColumnName = "Date"; column.AutoIncrement = false; column.Caption = "Date "; column.ReadOnly = false; column.Unique = false; // Add the column to the table. table.Columns.Add(column); // Make the ID column the primary key column. DataColumn[] PrimaryKeyColumns = new DataColumn[1]; PrimaryKeyColumns[0] = table.Columns["id"]; table.PrimaryKey = PrimaryKeyColumns; for (int i = 0; i <= 100; i++) { row = table.NewRow(); row["id"] = i; row["Number"] = i; row["Date"] = DateTime.Now; table.Rows.Add(row); } return table; } protected void LinkButton1_Click(object sender, EventArgs e) { WebDataGrid1.ClearDataSource(); WebDataGrid1.DataSource = GetDataSource(); WebDataGrid1.DataBind(); }}
even this code generate same issue "Multiple controls with the same ID 'it2_0' were found. FindControl requires that controls have unique IDs"
our master page not contain any ig controls.
Hello,
I further modified my sample to better match your scenario. The changes that I made are :
1) MasterPage added
2) Code to rebind the grid is executen on button click
3) The grid and the button are placed inside UpdatePanel control
4) Changed references to use 12.1.20121.1005 version
The sample still works fine and I am not able to reproduce the error. Please have a look and let me know if this sample produce the error. If not you can compare it to your app to help you troubleshoot the issue. Otherwise please modify my sample or send me a working isolated sample reproducing the issue.
Hi Hristo,
finally find out the issue. while including asp:sitemap control the issue is occurring.
<asp:SiteMapPath ID="SiteMap1" ClientIDMode="AutoID" runat="server" PathSeparatorStyle-CssClass="breadcrumbarrow" OnItemCreated="SiteMapPath_ItemCreated" OnItemDataBound="SiteMapPath1_OnItemDataBound" PathSeparator=" " TabIndex="-1"> </asp:SiteMapPath>
can you please suggest any solution for the same.
Please comment the following line in the LinkButton1_Click event and you should avoid this error:
protected void LinkButton1_Click(object sender, EventArgs e) { // WebDataGrid1.ClearDataSource(); WebDataGrid1.DataSource = GetDataSource(); WebDataGrid1.DataBind(); }
i am sorry..... its not a good solution. grid not get updated with the bind list. i think its a bug.
Hi Vishnu,
This is strange - I was able to reproduce the same with 1005, but am not able to reproduce it with any other version, including 12.2.20122.2257.
Anyway, I have opened a new support case for you with id of CAS-156159-W2R8G8, where I have provided you with a link to download version 12.1.20121.2209 according to your request. You can find your active cases under Account - Support Activity in our website. Please install the provided version and let me know if this fixes your issue.
i tried with 2012 vol 2 (Infragistics4.Web.v12.2, Version=12.2.20122.2257) and that's not working. actually i need the 2012 vol 1 but currently its not showing in my subscription.
any way am going to contact with sales team after that i can able to confirm. Do you please specify extract version that's work fine and available to the public?
Thanks and regards
Vishnu Prasad
It seemed I had a typo in the version number, it must be 2247. I tested with it and am not able to reproduce the issue as with 1005. Could you confirm what is exact version that is available for you in Infragistics website so I can also reassure my findings ?
Thanks for the quik replay. i already tried with version 2257. sadly its not fixed in 2257 :(
2260 is not a public build, but 2257 is and it should be available for download for you, after you login to Infragistics website and go to https://es.infragistics.com/my-account/keys-and-downloads
If you are still not able to download it please let me know and I will provide an alternate link for you.