Geeks With Blogs

News My Blog has been MOVED to
Michael Freidgeim's OLD Blog My Blog has been MOVED to

I am using Metabuilders ExpandingButtons  and started to get “Please check the page configuration“ error. Some investigation showed that my DataGrid control has two IDs, one as expected from ServerID and another with suffix “__Ctl0”.

<table id="dnn_ctr374_ResultsContainer_uscExternalSourceListMarden_grResultItems__ctl0" cellspacing="2" cellpadding="2" border="0" id="dnn_ctr374_ResultsContainer_uscExternalSourceListMarden_grResultItems">

JavaScript from  ExpandingButtons tries to use wrong ID(with suffix “__Ctl0”) and alerts the error.
After a lot of debugging I found that I've used RecursivelyFindControl function based on code from the thread, which navigated through child controls and Debug.Write ClientID . It seems that for internal ChildTable control of DataGrid it creates not null ClientID and on the Render step,both DataGrid.ClientId and  ChildTable.ClientID are generated.
I beleive that it is a bug in  System.Web.UI.WebControls.ChildTable.AddAttributesToRender code.
If both ChildTable.ClientID and parent DataGrid.ClientId are not empty,only ParentID should be rendered.

Posted on Thursday, October 12, 2006 8:55 PM ASP.NET | Back to top

Comments on this post: Side effect of debugging ClientID in DataGrid ChildTable.

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Michael Freidgeim | Powered by: