HI every body, I have a probleme when refreshing a webdataGrid , this Grid is in a User Control , i can acces to this Grid and to its Methode refresh () but the probleme when i make two Refresh i got this error an error (not catched in block try catch)
Control grille = ((WebTab)this.Parent.Parent.FindControl("WebTab1")).Tabs[1].FindControl("gridControlDocuments");
((Label)grille.FindControl("lblAddedItemsIDs")).Text += ItemOfFile.ID + "#";
((gridControl)grille).Refresh();
}
and this is the error when i added a second document , i dont have any 'it2_0' id in my controls. thanks
Multiple controls with the same ID 'it2_0' were found. FindControl requires that controls have unique IDs.
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.Web.HttpException: Multiple controls with the same ID 'it2_0' were found. FindControl requires that controls have unique IDs.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): Multiple controls with the same ID 'it2_0' were found. FindControl requires that controls have unique IDs.]
System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +11054874
System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +255
System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +269
System.Web.UI.Page.RegisterRequiresClearChildControlState(Control control) +434
System.Web.UI.WebControls.SiteMapPath.CreateChildControls() +49
System.Web.UI.Control.EnsureChildControls() +146
System.Web.UI.Control.PreRenderRecursiveInternal() +61
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3394
bouhmid
Member
8 Points
9 Posts
Error Multiple IDs when Refreshed WebGrid
Feb 17, 2012 02:28 PM|LINK
HI every body, I have a probleme when refreshing a webdataGrid , this Grid is in a User Control , i can acces to this Grid and to its Methode refresh () but the probleme when i make two Refresh i got this error an error (not catched in block try catch)![]()
this is code to call refresh from userControl :
{Control grille = ((WebTab)this.Parent.Parent.FindControl("WebTab1")).Tabs[1].FindControl("gridControlDocuments"); ((Label)grille.FindControl("lblAddedItemsIDs")).Text += ItemOfFile.ID + "#"; ((gridControl)grille).Refresh();and this is the error when i added a second document , i dont have any 'it2_0' id in my controls. thanks
Multiple controls with the same ID 'it2_0' were found. FindControl requires that controls have unique IDs.
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.Web.HttpException: Multiple controls with the same ID 'it2_0' were found. FindControl requires that controls have unique IDs.
Source Error:
Stack Trace:
hikoo_m
Member
568 Points
113 Posts
Re: Error Multiple IDs when Refreshed WebGrid
Feb 20, 2012 10:11 AM|LINK
Hi,
I'm not familiar with webdatagrid,
but I would suggest you make sure if some controls are added to page during postbacks to refresh()