473,394 Members | 1,717 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,394 software developers and data experts.

ITemplate viewstate

Hello,
I am trying to create textbox control dynamically into a datagrid.
I do not know the number of columns until run time so I thought I could use
template columns dynamically and add them into the datagrid.
This works fine, but on post back all the data in the datagrid disappears.
Any idea why? I have the bad feeling that the view state has something to
do with it.
I do have viewstate enabled.
Note: I am implementing the Itemplate interface and I have Implemented the
InstantiateIn mehod.
Thanks!

Nov 22 '05 #1
0 1038

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

Similar topics

0
by: cosine... zero | last post by:
Hi! I've got a databound templated control that I want the itemplate class itself to be postback aware to process form data. But calling Page.RegisterRequiresPostBack( instantiatedtemplate )...
1
by: Amine | last post by:
Hello, I am trying to create textbox control dynamically into a datagrid. I do not know the number of columns until run time so I thought I could use template columns dynamically and add them into...
0
by: Steve Richter | last post by:
trying to understand how to support templates in server controls ... a few quick questions on the following snippet of code pulled from a server control class: ITemplate _headingStyle; ...
0
by: vicgroups | last post by:
Hello, I am adding columns to the datagrid programmatically. And I have created a countries drop down list in an ascx file. I have added the countries drop down list to the datagrid column as...
0
by: LaptopHeaven | last post by:
I am having some trouble. How would one load a custom UserControl fro within a class which impements the ITemplate interface. Currently I have the following: public class...
5
by: Ben Schumacher | last post by:
Ok smart guys and gals ... I have a GridView control with a dynamically created checkbox column. The checkbox is created using ITemplate interface. In my class that implements the ITemplate...
0
by: imranabdulaziz | last post by:
Hi all, I am using asp.net2.0 and C# VS2005. I am creating asp.net web server control templates Dynamically . My requirement is such that sp return very no of field( 4 or 5 or 6 …). Now I am...
0
by: John | last post by:
I'm dynamically creating all the Columns in a GridView at run time and binding it to a DataTable. I have to build it at runtime (using an ITemplate subclass) because the number of columns is based...
1
by: wojski696969 | last post by:
Hi, i've made my own Custom Server Control, wich inherits from WebControl class. Inside of my control I've create three ITemplate properties wich should be used as containers for Head, Content and...
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: 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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.