By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,105 Members | 1,090 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,105 IT Pros & Developers. It's quick & easy.

Composite controls in a DataGrid

P: n/a
I'm having dreadful trouble putting a simple composite control into the
DataGrid cell, so I'm hoping someone might have stumbled across this problem
before and have some advice.

My composite control is a date picker which contains a couple of basic text,
drop down and image button controls. My control follows the composite design
guidelines carefully and behaves perfectly when used on a web page. It uses
ViewState and gets events from is child controls without problems.

When my composite control is added to the Controls collection in a DataGrid
cell it all goes wonky.

When called by the DataGrid OnItemDataBound I create the control with the
same ID each time and add it to the Controls in a cell. The control appears
correctly, but the following goes wrong:

* The ViewState keeps coming back null.
* The control events don't fire the first time, but do on the second and
following clicks.

I've been stuck on this problem for several hours and I'm getting quite
frustrated. Any advice or suggestions would be most welcome.

Nov 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.