473,385 Members | 1,798 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.

Fill a cell with a control -- how the heck?

I want to fill a cell in a table with a control. Lets say the control is a
listbox--something that you'd think would easily fill a cell, which would be
a good thing. So I create the table and stick the control inside, setting
its width and height to 100%. When I run the application, the control
appears to be an arbitrary size, each edge a different distance from its
relative edge. So, I go into the properties for the cell and set all margins
and padding to 0 pixels and try again. Same difference. Its enough to make
you say WTMF?! I can't find any info on doing this in google groups or
anywhere else. How can I do this? TIA!
Nov 19 '05 #1
6 1960
It will help if you examine the html output to see how the listbox renders
inside the cell.

Eliyahu

"William Sullivan" <Wi*************@discussions.microsoft.com> wrote in
message news:07**********************************@microsof t.com...
I want to fill a cell in a table with a control. Lets say the control is a listbox--something that you'd think would easily fill a cell, which would be a good thing. So I create the table and stick the control inside, setting
its width and height to 100%. When I run the application, the control
appears to be an arbitrary size, each edge a different distance from its
relative edge. So, I go into the properties for the cell and set all margins and padding to 0 pixels and try again. Same difference. Its enough to make you say WTMF?! I can't find any info on doing this in google groups or
anywhere else. How can I do this? TIA!

Nov 19 '05 #2
OK, basic question first: do you have any CSS setting for your tables / rows
/ cells? Could be that something there may be overriding your .aspx settings
for the TD.
Nov 19 '05 #3
<td id="cellDocuments" style="BORDER-RIGHT: black 1px solid; PADDING-RIGHT:
0px; BORDER-TOP: black 1px solid; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px;
MARGIN: 0px; BORDER-LEFT: black 1px solid; WIDTH: 323px; PADDING-TOP: 0px;
BORDER-BOTTOM: black 1px solid; HEIGHT: 194px" vAlign="top" align="left"
width="323" bgColor="#00ffff" height="194">
<!-- MSCellType="NavBody" -->
<select name="lbDocuments" size="4" id="lbDocuments"
style="height:100%;width:100%;">
</select></td>
The HTML matches what I put in VS, but still the listbox does not fill the
cell. There is a space of about five pixels on the left and bottom, and the
listbox is clipped by the cell on the right. Expanding the window stretches
the cell until the whole listbox is shown, which seems to be a constant width
of something around 300 pixels. "height:100%;width:100%;" does not do what
you would expect it to do.

"Eliyahu Goldin" wrote:
It will help if you examine the html output to see how the listbox renders
inside the cell.

Eliyahu

"William Sullivan" <Wi*************@discussions.microsoft.com> wrote in
message news:07**********************************@microsof t.com...
I want to fill a cell in a table with a control. Lets say the control is

a
listbox--something that you'd think would easily fill a cell, which would

be
a good thing. So I create the table and stick the control inside, setting
its width and height to 100%. When I run the application, the control
appears to be an arbitrary size, each edge a different distance from its
relative edge. So, I go into the properties for the cell and set all

margins
and padding to 0 pixels and try again. Same difference. Its enough to

make
you say WTMF?! I can't find any info on doing this in google groups or
anywhere else. How can I do this? TIA!


Nov 19 '05 #4
Nope, none.

"Tom A via DotNetMonster.com" wrote:
OK, basic question first: do you have any CSS setting for your tables / rows
/ cells? Could be that something there may be overriding your .aspx settings
for the TD.

Nov 19 '05 #5
The html looks ok. I would have another look at all css rules as the other
poster suggested.

Eliyahu

"William Sullivan" <Wi*************@discussions.microsoft.com> wrote in
message news:E3**********************************@microsof t.com...
<td id="cellDocuments" style="BORDER-RIGHT: black 1px solid; PADDING-RIGHT: 0px; BORDER-TOP: black 1px solid; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px;
MARGIN: 0px; BORDER-LEFT: black 1px solid; WIDTH: 323px; PADDING-TOP: 0px;
BORDER-BOTTOM: black 1px solid; HEIGHT: 194px" vAlign="top" align="left"
width="323" bgColor="#00ffff" height="194">
<!-- MSCellType="NavBody" -->
<select name="lbDocuments" size="4" id="lbDocuments"
style="height:100%;width:100%;">
</select></td>
The HTML matches what I put in VS, but still the listbox does not fill the
cell. There is a space of about five pixels on the left and bottom, and the listbox is clipped by the cell on the right. Expanding the window stretches the cell until the whole listbox is shown, which seems to be a constant width of something around 300 pixels. "height:100%;width:100%;" does not do what you would expect it to do.

"Eliyahu Goldin" wrote:
It will help if you examine the html output to see how the listbox renders inside the cell.

Eliyahu

"William Sullivan" <Wi*************@discussions.microsoft.com> wrote in
message news:07**********************************@microsof t.com...
I want to fill a cell in a table with a control. Lets say the control is
a
listbox--something that you'd think would easily fill a cell, which
would be
a good thing. So I create the table and stick the control inside,
setting its width and height to 100%. When I run the application, the control
appears to be an arbitrary size, each edge a different distance from its relative edge. So, I go into the properties for the cell and set all

margins
and padding to 0 pixels and try again. Same difference. Its enough to make
you say WTMF?! I can't find any info on doing this in google groups

or anywhere else. How can I do this? TIA!


Nov 19 '05 #6
Problem is that I'm not using css. Is what I have done already supposed to
work?

"Eliyahu Goldin" wrote:
The html looks ok. I would have another look at all css rules as the other
poster suggested.

Eliyahu

"William Sullivan" <Wi*************@discussions.microsoft.com> wrote in
message news:E3**********************************@microsof t.com...
<td id="cellDocuments" style="BORDER-RIGHT: black 1px solid;

PADDING-RIGHT:
0px; BORDER-TOP: black 1px solid; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px;
MARGIN: 0px; BORDER-LEFT: black 1px solid; WIDTH: 323px; PADDING-TOP: 0px;
BORDER-BOTTOM: black 1px solid; HEIGHT: 194px" vAlign="top" align="left"
width="323" bgColor="#00ffff" height="194">
<!-- MSCellType="NavBody" -->
<select name="lbDocuments" size="4" id="lbDocuments"
style="height:100%;width:100%;">
</select></td>
The HTML matches what I put in VS, but still the listbox does not fill the
cell. There is a space of about five pixels on the left and bottom, and

the
listbox is clipped by the cell on the right. Expanding the window

stretches
the cell until the whole listbox is shown, which seems to be a constant

width
of something around 300 pixels. "height:100%;width:100%;" does not do

what
you would expect it to do.

"Eliyahu Goldin" wrote:
It will help if you examine the html output to see how the listbox renders inside the cell.

Eliyahu

"William Sullivan" <Wi*************@discussions.microsoft.com> wrote in
message news:07**********************************@microsof t.com...
> I want to fill a cell in a table with a control. Lets say the control is a
> listbox--something that you'd think would easily fill a cell, which would be
> a good thing. So I create the table and stick the control inside, setting > its width and height to 100%. When I run the application, the control
> appears to be an arbitrary size, each edge a different distance from its > relative edge. So, I go into the properties for the cell and set all
margins
> and padding to 0 pixels and try again. Same difference. Its enough to make
> you say WTMF?! I can't find any info on doing this in google groups or > anywhere else. How can I do this? TIA!


Nov 19 '05 #7

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

Similar topics

3
by: Thomas Mlynarczyk | last post by:
Hello, How can I make an <a> element (containing text only, styled to be a box with a border) as big as the table cell in which it resides, *without* having specified any width/height (neither...
3
by: David Whitney | last post by:
All: I have a control that renders a table. As the table is rendered, each row in the table is constructed by creating a run-time (dynamic) object that is derived from an HtmlTableRow. The row...
3
by: Tim::.. | last post by:
Hi, I keep getting the following error in my code: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: index I presume it is because...
0
by: Peppie | last post by:
Hi, I have dropdown control on my form and after the onchange event I reload a datagrid and fill a textbox embedded in a cell with the text from the invisible next column. Unfortunately the text...
4
by: yma | last post by:
Hi, I tried to display a column in MS Access 2000 nwind.mdb. But I got "It is already opened exclusively by another user, or you need permission to view its data." It caused by...
30
by: Raymond Hettinger | last post by:
Proposal -------- I am gathering data to evaluate a request for an alternate version of itertools.izip() with a None fill-in feature like that for the built-in map() function: >>> map(None,...
3
by: gh | last post by:
I have a HTML Table with 1 row and 1 column. I have a control I want to add to the cell at runtime based on a condition. I can get the control added by creating a row and cell and using the code...
1
by: Hutch | last post by:
So using VBA i have the following code. Sub F1102C() ActiveCell.FormulaR1C1 = "F1102C-5-1" Range("A2").Select ActiveCell.FormulaR1C1 = "A1-2NH-7" Range("B2").Select ...
1
by: DaveyP | last post by:
I have a user control (called data_dictionary) which I need to add into the header text of a datagrid. I'm doing this by adding the control in the RowCreated event as follows: dds_descriptions...
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
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...
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
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.