Side effect of debugging ClientID in DataGrid ChildTable.

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 @ Thursday, October 12, 2006 8:55 PM

Print

Comments on this entry:

No comments posted yet.

Your comment:



 (will not be displayed)


 
 
 
Please add 5 and 6 and type the answer here:
 

Live Comment Preview:

 
«January»
SunMonTueWedThuFriSat
28293031123
45678910
11121314151617
18192021222324
25262728293031
1234567