473,385 Members | 1,742 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Composite controls in a DataGrid

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.

Thanks
Phil
Nov 17 '05 #1
0 1594

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: sleigh | last post by:
Hello, I'm building a web application that will build a dynamic form based upon questions in a database. This form will have several different sections that consist of a panel containing one to...
10
by: dx | last post by:
I have the Microsoft Press: Developing Microsoft ASP.NET Server Controls and Components book. It's starting to shine some light on control development but there is something about composite...
2
by: Harry | last post by:
Hello, I have a composite WebControl that I'm dynamically instantiating at runtime using Reflection. When I create a new instance of my control I immediately iterate through it's child control...
1
by: Philip Townsend | last post by:
I have built a composite control containing a calendar, two dropdownlists, and a button. Currently I have only the index of each control as a means of formatting. What is the best way of formatting...
1
by: eric dugal | last post by:
Hi!! I just want to create a composite control derived from a datagrid and a one or more button on top of the grid in a table. I already tried to put my button on the createchildrenControls...
5
by: Alex Nitulescu | last post by:
Hi. Because I'm a beginner in creating controls, I spent more than two *&^#$ hours to create this "login" as a custom control and to make it work properly: ...
4
by: Mark Olbert | last post by:
This involves a family of related, databound ASPNET2 composite controls. I've managed to arrange things so that the composite controls restore themselves from ViewState on postback after they're...
0
by: gaurav | last post by:
hi I have created one composite control in which i am using one datagrid and other controls . In this datagrid i am rendering one check box column which fire CheckedChanged event I have created...
6
by: shapper | last post by:
Hello, I am working in a class library with various custom controls. In which cases should a control inherit Control, WebControl and CompositeControl classes? And when should a custom...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.