Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 17th, 2004, 10:31 AM
Registered User
 
Join Date: Jul 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to tinlong Send a message via MSN to tinlong
Default Help: problem extending DataGrid

Hi All, I have some problem when trying to extend my own class from DataGrid. I want to add some more buttons (e.g. an "Add Item" LinkButton, an ImageButton to toggle PageSize, and so on). I have no problem writing a composite server control; however when I try to extend DataGrid, the new child controls are not actually added onto the DataGrid.

Suppose using INamingContainer, when I specify a child control's ID (let's say "AddLink", and add it into the control tree using Controls.Add(childControl), the child control's UniqueID will become sth like "UserControl1.DataGrid1.AddLink", which shows the hierarchy. However, when I try to extend the DataGrid, even with INamingContainer, the child control's ID won't have the UniqueID showing the hierarchy; it stays the same as the ID, no DataGrid's own UniqueID embedded. As a result, I cannnot postback data by using UniqueID.

Anybody knows why this happens? Thanks a lot!

 
Old December 5th, 2005, 11:48 PM
Registered User
 
Join Date: Dec 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, sorry for bringing up an old topic. But I got exactly the same problem. Can anybody help to explain what else needed to be done to add a child control to a datagrid?






Similar Threads
Thread Thread Starter Forum Replies Last Post
Extending the CMS retroviz BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 April 23rd, 2008 07:00 AM
extending xslt RoeZ XSLT 3 February 28th, 2008 05:52 PM
Extending the Replace Function designdawg Access 9 February 19th, 2008 12:39 PM
Extending DataGridItem Phrozen ASP.NET 2.0 Professional 0 March 11th, 2007 09:17 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.