Developer forum

Forum » Development » Multiple controls with the same ID 'ctl01' were found

Multiple controls with the same ID 'ctl01' were found

Filipe Sousa
Reply
 Hi,

I'm getting this error when I enable paging in my EditableGrid:

Multiple controls with the same ID 'ctl01' were found. FindControl requires that controls have unique IDs.

Can't figure out what's happening...

Replies

 
Morten Snedker
Reply
 Hi Filipe,

Where exactly are you enabling this paging...which grid, where?  :-)

 

 

Regards

Morten Snedker

 
Filipe Sousa
Reply
 Hi Morten,

this is how I declared my grid:
     <dw:EditableGrid ID="GridDomains" runat="server" AllowSorting="True" AutoGenerateColumns="False"
            DataSourceID="LinqDataSourceDomains" EnableModelValidation="True" DataKeyNames="Id"
            CssClass="dwGrid" GridLines="None" PageSize="15" Width="100%" Visible="true"  
            OnRowDataBound="GridDomains_OnRowDataBound" OnRowUpdating="GridDomains_OnRowUpdating" AllowPaging="false">
It is within a content element and uses a master page. I use it in my module administration page.

When I change AllowPaging to true I get this error:

Multiple controls with the same ID 'ctl01' were found. FindControl requires that controls have unique IDs.

I appreciate any suggestion, thanks,



 
Pavel Volgarev
Reply
This post has been marked as an answer
Hi  Filipe,

Even though the EditableGrid control inherits from the standard GridView control (and therefore is meant to support all its features) it doesn't support some of the GridView's functionality such as paging. You can either implement a pager by yourself or use different control (for example, a GridView).

Here are some links that might be useful for you:

"GridView class (MSDN)":
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.aspx

"CRUD Operation in GridView in ASP.NET (Add/Update/Delete) Programmatically":
http://www.codegain.com/articles/aspnet/gridcontrols/crud-operation-in-gridview-in-asp-net-programmetrically.aspx

"GridView CRUD operations using datasource":
http://bansalvarun.wordpress.com/2010/09/12/gridview-crud-operations-using-datasource/

-- Pavel

Votes for this answer: 0

 

You must be logged in to post in the forum