Developers blog, .NET, C#, VB.NET, ATLAS, AJAX, WWF, ORM, LINQ, ARCHITECTURE and more by Frank Kroondijk |
|
ProfileFrank KroondijkSoftware developerSoftware architectBlog profile
Links
Archives
200 feeds |
vrijdag, mei 12, 2006FindControl in PagerTemplate
When upgrading a CMS to multilanguage display, I stumbled upon a strange (bug?) thing. Using FindControl on the grid I wasnt able to find the control I was looking for#$@ My own recursive control search method didnt find it either. Time for a google shot. Here the solution:
instead of: NO: myLabel = (Label)gridAllPages.FindControl("lblPagina"); use: YES: myLabel = (Label)gridAllPages.BottomPagerRow.FindControl("lblPagina"); Another 'feature', you only can retrieve/set a HyperlinkField like this: myField = (HyperLinkField)this.gridAllPages.Columns[3]; just a thing to remember@#! weird! ref http://forums.asp.net/1010797/ShowPost.aspx |