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

TableCell

I create a TableCell by

TableCell cell = new TableCell()

but I could not find how to add a TextBox inside this cell. Any ideas?

Thanks in advance
Serdar KALAYCI
--

Nov 17 '05 #1
4 5384
WebControls.TextBox txt = new WebControls.TextBox();
cell.Controls.Add(txt);

Karl
"Serdar Kalaycý" <se***********@unisec.com.tr> wrote in message
news:ew****************@tk2msftngp13.phx.gbl...
I create a TableCell by

TableCell cell = new TableCell()

but I could not find how to add a TextBox inside this cell. Any ideas?

Thanks in advance
Serdar KALAYCI
--

Nov 17 '05 #2
Got it, here's the code if anyone wonders...

TableCell cell = new TableCell();
TextBox text1 = new TextBox();
cell.Controls.Add (text1);
"Serdar Kalaycý" <se***********@unisec.com.tr> wrote in message
news:ew**************@tk2msftngp13.phx.gbl...
I create a TableCell by

TableCell cell = new TableCell()

but I could not find how to add a TextBox inside this cell. Any ideas?

Thanks in advance
Serdar KALAYCI
--

Nov 17 '05 #3
I have one more question. I added a Button inside a Table at design time by
changing HTML codes, but I can't access it's events or even see it in the
components list on the Properties window.

Serdar KALAYCI
"Karl Seguin" <kseguin##crea.ca> wrote in message
news:uO**************@TK2MSFTNGP11.phx.gbl...
WebControls.TextBox txt = new WebControls.TextBox();
cell.Controls.Add(txt);

Karl
"Serdar Kalaycý" <se***********@unisec.com.tr> wrote in message
news:ew****************@tk2msftngp13.phx.gbl...
I create a TableCell by

TableCell cell = new TableCell()

but I could not find how to add a TextBox inside this cell. Any ideas?

Thanks in advance
Serdar KALAYCI
--


Nov 17 '05 #4
if you are adding an object programatically, like your butotn, you'll also
have to attach the event programatically.

in vb.net, you can use:
addhandler yourButton.click, AddressOf yourFunctionHandler

in c#, you can use:
yourButton.Click += new EventHandler(yourFunctionHandler);
Make sure that your button is created, and you attach your handler on
postback also (ie, don't wrap it in an !page.IsPostback)

Karl

"Serdar Kalaycý" <se***********@unisec.com.tr> wrote in message
news:ul**************@TK2MSFTNGP11.phx.gbl...
I have one more question. I added a Button inside a Table at design time by changing HTML codes, but I can't access it's events or even see it in the
components list on the Properties window.

Serdar KALAYCI
"Karl Seguin" <kseguin##crea.ca> wrote in message
news:uO**************@TK2MSFTNGP11.phx.gbl...
WebControls.TextBox txt = new WebControls.TextBox();
cell.Controls.Add(txt);

Karl
"Serdar Kalaycý" <se***********@unisec.com.tr> wrote in message
news:ew****************@tk2msftngp13.phx.gbl...
I create a TableCell by

TableCell cell = new TableCell()

but I could not find how to add a TextBox inside this cell. Any ideas?

Thanks in advance
Serdar KALAYCI
--



Nov 17 '05 #5

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

Similar topics

0
by: Randy | last post by:
Hello All, Is there any way to make this happen... Say I want to make a table with 3 rows. The first row has two TableCells each with a width of 300. The second row has one TableCell with the...
2
by: George Durzi | last post by:
Consider this pseudo HTML from a web form <asp:Table> <asp:TableRow> <asp:TableCell> <asp:Table> <asp:TableRow> <asp:TableCell></asp:TableCell> <asp:TableCell></asp:TableCell>...
6
by: Mr. x | last post by:
Hello, I have the following aspx code : <form id = "main_form" runat = "server"> <asp:Table dir = "rtl" runat = "server"> <asp:TableRow> <asp:TableCell id =...
3
by: Andre | last post by:
Hi, Did someone know why this code does'nt work (The TableCell Width). The cell don't have 600 and 150 like writed in width="600" and width="150". <asp:datagrid id="DataGrid1" ...
6
by: hb | last post by:
Hi, I have a page bill.aspx and its code-behind bill.aspx.cs. On bill.aspx I have: === Select a month: <asp:dropdownlist runat="server" id="lstDate" autopostback="True" /> <br> <asp:table...
0
by: Diane Yocom | last post by:
I'm very new to ASP.Net and probably jumped in a little over my head, but... I'm trying to create a user control that will control navigation through my site. It's sortof like Amazon.com, where...
2
by: Amelyan | last post by:
If I have spaces in my Text property of Label, and I add it to TableCell, it wraps at spaces. E.g. Label lb = new Label(); lb.Text = "Hello, World!" TableCell cell = new TableCell();...
2
by: somequestion | last post by:
how can i solve this problem i really wanna apply background image into the <asp:TableCell> but it's not allow i think i use asp.net 2.0 give me some help..please
0
by: DanG | last post by:
During grid field validation, I would like to generate a message for the user to tell which column had the error. So I have a control (textbox, dropdownlist, checkbox, etc.), and would like to...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.