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

cell.VerticalAlign

Hi there,

I was trying to define the VerticalAlign property of a cell
(programatically) but it doesn't work.
This is the code that seemed logical:

TableCell cell = new TableCell();
cell.VerticalAlign = "Top";

It doesn't work! How can I do it?

Now that I'm here, is it possible to create programatically the equivalent
to the HTML lists (<UL> tags) like it is possible to create a table a row or
a cell (shown above)?

Thank you!
dio
Nov 18 '05 #1
3 1649
try this:
cell.VerticalAlign = VerticalAlign.Top;

Hrvoje
"Dionísio Monteiro" <di*@sensoria.pt> wrote in message
news:On**************@TK2MSFTNGP10.phx.gbl...
Hi there,

I was trying to define the VerticalAlign property of a cell
(programatically) but it doesn't work.
This is the code that seemed logical:

TableCell cell = new TableCell();
cell.VerticalAlign = "Top";

It doesn't work! How can I do it?

Now that I'm here, is it possible to create programatically the equivalent
to the HTML lists (<UL> tags) like it is possible to create a table a row or a cell (shown above)?

Thank you!
dio

Nov 18 '05 #2
Try either
a) using the full namespace for "top" or
b) use the .Attributes["valign"] = "top";
--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Dionísio Monteiro" <di*@sensoria.pt> wrote in message
news:On**************@TK2MSFTNGP10.phx.gbl...
Hi there,

I was trying to define the VerticalAlign property of a cell
(programatically) but it doesn't work.
This is the code that seemed logical:

TableCell cell = new TableCell();
cell.VerticalAlign = "Top";

It doesn't work! How can I do it?

Now that I'm here, is it possible to create programatically the equivalent
to the HTML lists (<UL> tags) like it is possible to create a table a row or a cell (shown above)?

Thank you!
dio

Nov 18 '05 #3
dio,
Always check the .Net sdk help files as it often saves endless
hair-pulling. The VerticalAlign attribute does not take a string. It takes a
VerticalAlgin enumerated value. To set it to top, just set it to
VerticalAlign.Top. If you were using an HTML control like HtmlTableCell this
would be different and setting the vertical alignment to "Top" would be
correct because those properties accept a string.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"Dionísio Monteiro" <di*@sensoria.pt> wrote in message
news:On**************@TK2MSFTNGP10.phx.gbl...
Hi there,

I was trying to define the VerticalAlign property of a cell
(programatically) but it doesn't work.
This is the code that seemed logical:

TableCell cell = new TableCell();
cell.VerticalAlign = "Top";

It doesn't work! How can I do it?

Now that I'm here, is it possible to create programatically the equivalent
to the HTML lists (<UL> tags) like it is possible to create a table a row or a cell (shown above)?

Thank you!
dio

Nov 18 '05 #4

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

Similar topics

1
by: James | last post by:
wxpython 2.5.3 hi, anyone know how to make a multiline cell editor for wxgrid? thank you :) best regards, James
2
by: Rich Morey | last post by:
Hello, I am working on something that only needs to work in IE, and I've got this code: var aRows=oTable.rows; var oCell1_1=aRows(0).insertCell(); oCell1_1.innerHTML= 'new cell' Which...
7
by: Andrew Poulos | last post by:
I'm using the following code to create a small table with one column and two rows. An image goes into the first cell. //create table var t = document.createElement("TABLE"); t.style.position =...
2
by: dschectman | last post by:
I have an application that uses javascript to dynamically create tables. var selectedGridTab = document.getElementById(myTableName); .... var row = selectedGridTab.insertRow(rowid);...
4
by: Sam Evans | last post by:
All: I've looked all over (and probably not in the right places) to try and find some example code, or documentation on how I can modify the text in a cell of a datagrid. I've found...
2
by: Alfonso Morra | last post by:
Hi, I have the following code as part of a class: class Cell { public: Cell( int ) ; Cell( const Cell& ) ; Cell& operator= Cell( const Cell& ) ; // <- compiler croaks here virtual ~Cell()...
6
by: tshad | last post by:
If you have nothing in a cell, the cell doesn't have the inset appearance that all the other cells do. Normally, you could just put a "&ndsp;" in the cell if the it is blank. But how do you do...
2
by: Iain | last post by:
Hi All Using Delphi 2006 developer - C# Project I have the following 2 event handlers for the datagrid - see botton of page Both events will fire off correctly but i have a problem collecting...
6
TMS
by: TMS | last post by:
This spreadsheet is almost done, but there is some functionality that is driving me nuts. For instance: a cell, for instance 'a0' is to have 'a0' as a string, but if something is entered like...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.