473,888 Members | 1,434 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1986
It will help if you examine the html output to see how the listbox renders
inside the cell.

Eliyahu

"William Sullivan" <Wi************ *@discussions.m icrosoft.com> wrote in
message news:07******** *************** ***********@mic rosoft.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="cellDocumen ts" 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="#00fff f" height="194">
<!-- MSCellType="Nav Body" -->
<select name="lbDocumen ts" size="4" id="lbDocuments "
style="height:1 00%;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%;wi dth: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.m icrosoft.com> wrote in
message news:07******** *************** ***********@mic rosoft.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.c om" 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.m icrosoft.com> wrote in
message news:E3******** *************** ***********@mic rosoft.com...
<td id="cellDocumen ts" 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="#00fff f" height="194">
<!-- MSCellType="Nav Body" -->
<select name="lbDocumen ts" size="4" id="lbDocuments "
style="height:1 00%;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%;wi dth: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.m icrosoft.com> wrote in
message news:07******** *************** ***********@mic rosoft.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.m icrosoft.com> wrote in
message news:E3******** *************** ***********@mic rosoft.com...
<td id="cellDocumen ts" 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="#00fff f" height="194">
<!-- MSCellType="Nav Body" -->
<select name="lbDocumen ts" size="4" id="lbDocuments "
style="height:1 00%;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%;wi dth: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.m icrosoft.com> wrote in
message news:07******** *************** ***********@mic rosoft.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
10898
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 fixed nor percentage) for this table cell? Sizing the element to 100% width and height does not work, as the parent element's width and height are not specified. And yet, in this case at least, the width and height of the table cell are very...
3
3046
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 has three HtmlTableCell objects, and each cell contains a single control added to the HtmlTableCell's Controls collection. The basic table renders correctly, but the controls within the HtmlTableCell objects do not; the cells are just empty. (Just...
3
2355
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 I have the wrong control number but am not 100% sure! How do I work this out? Thanks
0
1171
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 will not fill on postback. The data is present in the column next to the template column but the textbox will not be filled by the code beneath. I cast the embedded control to a textbox and I am able to change all other properties but the text....
4
2504
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 OleDbDataAdapter1.Fill(DataSet11, "employees") in page_load sub. Then I tried to use my local sql server 2000. SqlDataAdapter1.fill() caused an unhandled system error. Could you show me how to fixed them?
30
3333
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, 'abc', '12345') # demonstrate map's None fill-in feature The motivation is to provide a means for looping over all data elements
3
5350
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 below: cell.Controls.Add(aCtl); row.Cells.Add(cell); tblDisplay.Rows.Add(row); Is there a way to add the control to the row and cell already setup in the table? When I try, tblDisplay.Controls.Add(aCtl), I get the
1
1638
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 ActiveCell.FormulaR1C1 = "A1-C2" Range("C2").Select ActiveCell.FormulaR1C1 = "5-1"
1
1769
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 is an arraylist of strings. data_dictionary is the user control Sub gvw_data_RowCreated(ByVal sender As Object, ByVal e As GridViewRowEventArgs)
0
9961
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9800
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10886
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10439
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9597
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7148
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4642
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4245
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3252
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.