Saturday, March 31, 2012
TableAdapter
I have three tables; in fact they are two that I will present in a later step. What I want is to use the table adapter but I am getting a problem.
Tables:
1) Movie
MovieID,MovieTitle,MovieGenre,MovieTrailer,MoviePoster,...
2) Cast
CastID,CastName,CastBIO,CastDOB,CastPicture,...
3) CastMovie
MovieID,CastID
The problem is that I want to use a formview by using the table adapter; this table adapter should retrieve the movie information from the movie table and retrieve the cast name from the cast table, so that we can have the movie with the entire cast name within it.
How to do that with the available tables, by the way I am using the objectDataSource?
if anyone have another tools that we can use to insert, delete and edit other than the formview just provide me with it
RegardsYou could use SQL JOINs, probably CROSS JOIN (http://www.java2s.com/Code/SQL/Join/CROSSJOINinMySQL.htm).
thanx for your fast reply, but i already made a cross table by joining the cast and movie; the table which is called castmovie. however this table will not work.
All I can think of, in that case you would need a column common to both Tables, and related to each other. But wait, somebody could prove me wrong!
SELECT M.MovieID, M.MovieTitle, M.MovieGenre, M.MovieTrailer, M.MoviePoster, C.CastID, C.CastName, C.CastBio, C.CastDOB, C.CastPicture FROM Movie M LEFT JOIN CastMovie CM ON CM.MovieID = M.MovieID LEFT JOIN Cast C ON C.CastID = CM.CastID
Or something similar. It will get you multiple rows per movie though.
thank you alot
Wouldn't that require you to have CastMovie table in your database?? you said that you will remove it later. :confused:
i want to be able to enter more than one cast per movie as well as i want to be able to delete the movie info without the cast info, thats why i think its required to have a third table (many to many relatiobship).
regards,
TableAdapter: How do I create one which inserts values from a form into two tables?
to provide information regarding themselves and also the booking
detail. I want to send the data into two tables. One, the personalinfo
table and another bookinginfo. The bookinginfo, also has a column for
personalID which links it to the personalInfo table. How can I do this
with eiter an ASP button control use a table adapter to do it.
Sorry if this sounds trivial but I am really new to ASP and SQL.
RegardsYou'd need to simply write the data out to the table. Have a look at the
connection objects in .NET there is actually a lot of code that already does
what you want posted all over the web.
Regards,
Alvin Bruney
---
Shameless author plug
Excel Services for .NET is coming...
OWC Black book on Amazon and
www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley
"Fendi Baba" <effendi@.epitome.com.sg> wrote in message
news:1171175411.943113.134530@.h3g2000cwc.googlegroups.com...
>I am creating a simple booking system. The system requires the users
> to provide information regarding themselves and also the booking
> detail. I want to send the data into two tables. One, the personalinfo
> table and another bookinginfo. The bookinginfo, also has a column for
> personalID which links it to the personalInfo table. How can I do this
> with eiter an ASP button control use a table adapter to do it.
> Sorry if this sounds trivial but I am really new to ASP and SQL.
> Regards
>
TableAdapter: How do I create one which inserts values from a form into two tables?
to provide information regarding themselves and also the booking
detail. I want to send the data into two tables. One, the personalinfo
table and another bookinginfo. The bookinginfo, also has a column for
personalID which links it to the personalInfo table. How can I do this
with eiter an ASP button control use a table adapter to do it.
Sorry if this sounds trivial but I am really new to ASP and SQL.
RegardsYou'd need to simply write the data out to the table. Have a look at the
connection objects in .NET there is actually a lot of code that already does
what you want posted all over the web.
--
Regards,
Alvin Bruney
----------------
Shameless author plug
Excel Services for .NET is coming...
OWC Black book on Amazon and
www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley
"Fendi Baba" <effendi@.epitome.com.sgwrote in message
news:1171175411.943113.134530@.h3g2000cwc.googlegro ups.com...
Quote:
Originally Posted by
>I am creating a simple booking system. The system requires the users
to provide information regarding themselves and also the booking
detail. I want to send the data into two tables. One, the personalinfo
table and another bookinginfo. The bookinginfo, also has a column for
personalID which links it to the personalInfo table. How can I do this
with eiter an ASP button control use a table adapter to do it.
>
Sorry if this sounds trivial but I am really new to ASP and SQL.
>
Regards
>
Wednesday, March 28, 2012
TableAdapters Created in Dataset (XSD) Issues
I've been trying to work with the XSDs and ran into a few road blocks.
1. Stored procedures that uses temp tables, i.e. #TempTable. The
wizard complains that #TempTable is an invalid object. What gives?
2. How do you programatically change the connection string at runtime
when using these TableAdapters via databinding in the IDE GUI?
Thanks,
Nick HustakNick,
Is the stored procedure creating the temp table itself, as opposed to
using a temp table that is created on the same connection by another
procedure?
Also, the connection string handling within 2005 for datasets (XSD) is
pretty weak in my opinion. If you're using the dataset within your
application, then it can use the application or web config file to
store the string. But if you're using a common dataset in a class
library then it uses the connection string from the sql server you have
registered in your IDE and stores it *programmatically* within the
settings designer code. It's because it is a class library and so will
use the configuration from the parent application.
The only way that I know of to override this is to change the
InitConnection method within the dataset designer code to use the
application config connection string from the parent application. This
works, but the obvious problem is that if you then need to change
anything with the adapter from the designer, it will overwrite this
code.
So I guess what you (and I) have to do is wait until right before the
application is to be deployed, and change the InitConnection methods to
use the configuration file settings. This, in my opinion, is not an
acceptable solution, but I'm not sure how else they could implement the
functionality.
Thanks,
Gary
On 27 Jun 2006 06:42:41 -0700, "Gary" <ggalehouse@.neo.rr.com> wrote:
>Nick,
>Is the stored procedure creating the temp table itself, as opposed to
>using a temp table that is created on the same connection by another
>procedure?
>Also, the connection string handling within 2005 for datasets (XSD) is
>pretty weak in my opinion. If you're using the dataset within your
>application, then it can use the application or web config file to
>store the string. But if you're using a common dataset in a class
>library then it uses the connection string from the sql server you have
>registered in your IDE and stores it *programmatically* within the
>settings designer code. It's because it is a class library and so will
>use the configuration from the parent application.
>The only way that I know of to override this is to change the
>InitConnection method within the dataset designer code to use the
>application config connection string from the parent application. This
>works, but the obvious problem is that if you then need to change
>anything with the adapter from the designer, it will overwrite this
>code.
>So I guess what you (and I) have to do is wait until right before the
>application is to be deployed, and change the InitConnection methods to
>use the configuration file settings. This, in my opinion, is not an
>acceptable solution, but I'm not sure how else they could implement the
>functionality.
>Thanks,
>Gary
Gary,
First, thanks for a well 'typed (spoken)' reply. My stored procs use
temp tables for intermediate calcs and things ala CREATE TABLE
#Temp...
I've since seen from another thread that MS KNOWS about this and did
nothing about it. It would appear you can still use the proc in a
dataset, but forget getting a schema in the IDE GUI - it won't read
it. Kind of silly IMHO.
And unfortunately you have confirmed my fear - they let this out the
door without serious consideration for how it works. Why in the world
they would not provide an easy way to override the connection strings
to datasets is beyond me. Wow they dropped the ball on the designer
- I'm a bit suprised seeing as they grabbed Anders from Delphi, which
has excellent designer support for databases work.
Oh well - thanks for the detailed explanation. I really am not happy
with having to remember to swap around the init string in the web
config. I toyed around with trying to manipulate it on the fly, but
it would seem it's completely locked out from programmatic
modification. That would have solved a lot of these issues.
I wonder if DLINQ is going to have the same silly issues. So
close..but these are damn near brick walls. I have zero urge to hand
code all my table objects - such a waste of time.
Thanks again,
Nick
TableAdapters Created in Dataset (XSD) Issues
I've been trying to work with the XSDs and ran into a few road blocks.
1. Stored procedures that uses temp tables, i.e. #TempTable. The
wizard complains that #TempTable is an invalid object. What gives?
2. How do you programatically change the connection string at runtime
when using these TableAdapters via databinding in the IDE GUI?
Thanks,
Nick HustakNick,
Is the stored procedure creating the temp table itself, as opposed to
using a temp table that is created on the same connection by another
procedure?
Also, the connection string handling within 2005 for datasets (XSD) is
pretty weak in my opinion. If you're using the dataset within your
application, then it can use the application or web config file to
store the string. But if you're using a common dataset in a class
library then it uses the connection string from the sql server you have
registered in your IDE and stores it *programmatically* within the
settings designer code. It's because it is a class library and so will
use the configuration from the parent application.
The only way that I know of to override this is to change the
InitConnection method within the dataset designer code to use the
application config connection string from the parent application. This
works, but the obvious problem is that if you then need to change
anything with the adapter from the designer, it will overwrite this
code.
So I guess what you (and I) have to do is wait until right before the
application is to be deployed, and change the InitConnection methods to
use the configuration file settings. This, in my opinion, is not an
acceptable solution, but I'm not sure how else they could implement the
functionality.
Thanks,
Gary
On 27 Jun 2006 06:42:41 -0700, "Gary" <ggalehouse@.neo.rr.com> wrote:
>Nick,
>Is the stored procedure creating the temp table itself, as opposed to
>using a temp table that is created on the same connection by another
>procedure?
>Also, the connection string handling within 2005 for datasets (XSD) is
>pretty weak in my opinion. If you're using the dataset within your
>application, then it can use the application or web config file to
>store the string. But if you're using a common dataset in a class
>library then it uses the connection string from the sql server you have
>registered in your IDE and stores it *programmatically* within the
>settings designer code. It's because it is a class library and so will
>use the configuration from the parent application.
>The only way that I know of to override this is to change the
>InitConnection method within the dataset designer code to use the
>application config connection string from the parent application. This
>works, but the obvious problem is that if you then need to change
>anything with the adapter from the designer, it will overwrite this
>code.
>So I guess what you (and I) have to do is wait until right before the
>application is to be deployed, and change the InitConnection methods to
>use the configuration file settings. This, in my opinion, is not an
>acceptable solution, but I'm not sure how else they could implement the
>functionality.
>Thanks,
>Gary
Gary,
First, thanks for a well 'typed (spoken)' reply. My stored procs use
temp tables for intermediate calcs and things ala CREATE TABLE
#Temp...
I've since seen from another thread that MS KNOWS about this and did
nothing about it. It would appear you can still use the proc in a
dataset, but forget getting a schema in the IDE GUI - it won't read
it. Kind of silly IMHO.
And unfortunately you have confirmed my fear - they let this out the
door without serious consideration for how it works. Why in the world
they would not provide an easy way to override the connection strings
to datasets is beyond me. Wow they dropped the ball on the designer
- I'm a bit suprised seeing as they grabbed Anders from Delphi, which
has excellent designer support for databases work.
Oh well - thanks for the detailed explanation. I really am not happy
with having to remember to swap around the init string in the web
config. I toyed around with trying to manipulate it on the fly, but
it would seem it's completely locked out from programmatic
modification. That would have solved a lot of these issues.
I wonder if DLINQ is going to have the same silly issues. So
close..but these are damn near brick walls. I have zero urge to hand
code all my table objects - such a waste of time.
Thanks again,
Nick
TableAdapters using values
I have created a data access layer, have a datset with several tables. In VB I would like to access a the value of a particular cell, put that value into a variable. I am unsure how to do this. So far I have,
1Imports DataSet1TableAdapters2~~~~~~34Dim testID = Request("tid")56Dim levelAs Integer = 07Dim testsTableAdapterAs New TestsTableAdapter89level = testsTableAdapter.GetTestsByTestID(testID).Rows(0).Table.Columns(1)10 I know that this is incorrect, however I wish to get the value held in row 1 column 2. Any help would be much appreciated.
Hi,
Based on my understanding, you want to get the value held in particular cell by DataAdapter. If I have misunderstood you, please feel free to tell me, thanks.
Dim constrAs String =""'your connection stringDim connectionAs SqlConnection =New SqlConnection(constr)Dim sqlselAs String ="select * from test"Dim sdaAs SqlDataAdapter =New SqlDataAdapter(sqlsel, connection)Dim dsAs DataSet =New DataSet() sda.Fill(ds,"table")Dim levelAs Integer = ds.Tables("table").Rows(1)(2) Hope this can help you.
Try this
SqlConnection conn= new SqlConnection("YOUR CONNECTION STRING")
sql = "select * from TableName"
SqlDataAdapter ad = new SqlDataAdapter(sql, conn)
DataSet DS = new DataSet()
ad.Fill(DS,"TableName") // OR ad.Fill(DS.Tables(0))
Dim lvl As Integer
lvl = (int) DS.Table(0).Rows(1)
thanks for replying.
I was hoping to do it without setting a connection string or inputting SQL into the code. I want the dataset in my DAL to take care of this. Is there any way for the tableadapter to populate a new dataSet?
Please refer to this thread below
http://forums.asp.net/p/1187777/2031770.aspx#2031770
This might give you an idea
tables
I have created a fully functioning website but there is one problem - it comtains 2 tables on the default page which have a gap!
I have entered padding="opx" border="0px" and it hasn't worked??
there is no <br /> between the tables or a nbsp;
help?!!
rach
Can you provide a link to your website?
Try put
cellspacing="0"cellpadding="0"border="0" into you two tables
For CSS, set the padding to 0 and the MARGIN to 0.
it's ok I have done it now! it was really basic! d'oh
Rach
Tables
I'm hasving trouble with tables in Visual Web Developer Express.
I've set cellspacing and cellpadding to zero, but there's spaces around
objects in my table.
Any idea what's going wrong?Hi
Check whether you have assigned some width for every table cell (<td>),
which is giving you this experience. Try to set the width as zero and see how
it appears.
Prem
Newbie here.
Quote:
Originally Posted by
>
I'm hasving trouble with tables in Visual Web Developer Express.
>
I've set cellspacing and cellpadding to zero, but there's spaces around
objects in my table.
>
Any idea what's going wrong?
Where do you see those spaces? In the designer or in the resulting
webpage in the browser?
The designer might show spaces (and borders) to make the layout clear.
If in the browser, check the resulting html code ("view source") to see
if you can find a reason for those spaces there.
Hans Kesting
tables ;-(
I am trying to stop some behavior going on with a table. I have been
using Visual Studio C# 2005.
Basically, the table has certain column widths to start out with. When
data is added to it (and the size of the column is too small), the data
(in this case text) in the column wraps ;-/
How can I keep the data from wrapping? What would be nice is if no
wrapping to place at all and to just be able to adjust the size of
columns manually. You know - where you place the cursor on the boundary
of the column, the cursor changes and then you can lengthen or shorten
the width of the column in order to see more (or less) data.
So, in a nutshell, I would like for the column widths (as well as the
table length and width) to remain the same size as did from the start.
Adjustment of column widths would take place only when using the mouse
;-)
How can I do this?
TIAIm guessing here, but if you think about what the system would need to do in
order to assess the column width Its unlikely that it is going to do it for
you.
In order to assess the column with of any column, one would have to loop
through each cell and get the context, font and size and then measure this
graphically; For each iteration, one would need to adjust the column width
for each lager than previous cell until the end were reached.
If there is no automatic way of doing this then you would have to do this
manually with code.
Other comments ?
Mr N.
"milkyway" <d0mufasa@.hotmail.com> wrote in message
news:1127803098.346775.281760@.z14g2000cwz.googlegr oups.com...
> Hello,
> I am trying to stop some behavior going on with a table. I have been
> using Visual Studio C# 2005.
> Basically, the table has certain column widths to start out with. When
> data is added to it (and the size of the column is too small), the data
> (in this case text) in the column wraps ;-/
> How can I keep the data from wrapping? What would be nice is if no
> wrapping to place at all and to just be able to adjust the size of
> columns manually. You know - where you place the cursor on the boundary
> of the column, the cursor changes and then you can lengthen or shorten
> the width of the column in order to see more (or less) data.
> So, in a nutshell, I would like for the column widths (as well as the
> table length and width) to remain the same size as did from the start.
> Adjustment of column widths would take place only when using the mouse
> ;-)
> How can I do this?
> TIA
Try style rule table-layout:fixed;
Eliyahu
"milkyway" <d0mufasa@.hotmail.com> wrote in message
news:1127803098.346775.281760@.z14g2000cwz.googlegr oups.com...
> Hello,
> I am trying to stop some behavior going on with a table. I have been
> using Visual Studio C# 2005.
> Basically, the table has certain column widths to start out with. When
> data is added to it (and the size of the column is too small), the data
> (in this case text) in the column wraps ;-/
> How can I keep the data from wrapping? What would be nice is if no
> wrapping to place at all and to just be able to adjust the size of
> columns manually. You know - where you place the cursor on the boundary
> of the column, the cursor changes and then you can lengthen or shorten
> the width of the column in order to see more (or less) data.
> So, in a nutshell, I would like for the column widths (as well as the
> table length and width) to remain the same size as did from the start.
> Adjustment of column widths would take place only when using the mouse
> ;-)
> How can I do this?
> TIA
milkyway wrote:
> Hello,
> I am trying to stop some behavior going on with a table. I have been
> using Visual Studio C# 2005.
> Basically, the table has certain column widths to start out with. When
> data is added to it (and the size of the column is too small), the
> data (in this case text) in the column wraps ;-/
> How can I keep the data from wrapping? What would be nice is if no
> wrapping to place at all and to just be able to adjust the size of
> columns manually. You know - where you place the cursor on the
> boundary of the column, the cursor changes and then you can lengthen
> or shorten the width of the column in order to see more (or less)
> data.
> So, in a nutshell, I would like for the column widths (as well as the
> table length and width) to remain the same size as did from the start.
> Adjustment of column widths would take place only when using the mouse
> ;-)
> How can I do this?
> TIA
Watch out for a too-exact layout, one that is "perfect" on your development machine.
A user might use a different browser, have different installed fonts or uses
by default a font with a different size -> gone is your careful layout!
Hans Kesting
set absolute width and overflow style for each td's content, so it can honor
the width. you would need to write client code to resize the table column
widths (adjust the content widths).
<table border=1>
<tr>
<td nowrap><div style="width:40;overflow:hidden">this fits</div></td>
<td nowrap><div style="width:40;overflow:hidden">this xxxxxxxxxxxxxxxxx
doesn't fit</div></td>
</tr>
</table
-- bruce (sqlwork.com)
"milkyway" <d0mufasa@.hotmail.com> wrote in message
news:1127803098.346775.281760@.z14g2000cwz.googlegr oups.com...
> Hello,
> I am trying to stop some behavior going on with a table. I have been
> using Visual Studio C# 2005.
> Basically, the table has certain column widths to start out with. When
> data is added to it (and the size of the column is too small), the data
> (in this case text) in the column wraps ;-/
> How can I keep the data from wrapping? What would be nice is if no
> wrapping to place at all and to just be able to adjust the size of
> columns manually. You know - where you place the cursor on the boundary
> of the column, the cursor changes and then you can lengthen or shorten
> the width of the column in order to see more (or less) data.
> So, in a nutshell, I would like for the column widths (as well as the
> table length and width) to remain the same size as did from the start.
> Adjustment of column widths would take place only when using the mouse
> ;-)
> How can I do this?
> TIA
Thanks to all for the responses ;-)
Bruce Barker wrote:
> set absolute width and overflow style for each td's content, so it can honor
> the width. you would need to write client code to resize the table column
> widths (adjust the content widths).
How would one approach the writing of clinet code to support the
widths? Is there any sample code available?
> "milkyway" <d0mufasa@.hotmail.com> wrote in message
> news:1127803098.346775.281760@.z14g2000cwz.googlegr oups.com...
> > Hello,
> > I am trying to stop some behavior going on with a table. I have been
> > using Visual Studio C# 2005.
> > Basically, the table has certain column widths to start out with. When
> > data is added to it (and the size of the column is too small), the data
> > (in this case text) in the column wraps ;-/
> > How can I keep the data from wrapping? What would be nice is if no
> > wrapping to place at all and to just be able to adjust the size of
> > columns manually. You know - where you place the cursor on the boundary
> > of the column, the cursor changes and then you can lengthen or shorten
> > the width of the column in order to see more (or less) data.
> > So, in a nutshell, I would like for the column widths (as well as the
> > table length and width) to remain the same size as did from the start.
> > Adjustment of column widths would take place only when using the mouse
> > ;-)
> > How can I do this?
> > TIA
You could easily ammend this code to suit your table control.
http://www.trainingon.net/Articles/TIP0005.htm
HTH
"milkyway" <d0mufasa@.hotmail.com> wrote in message
news:1127968780.006696.275920@.g43g2000cwa.googlegr oups.com...
> Thanks to all for the responses ;-)
> Bruce Barker wrote:
>> set absolute width and overflow style for each td's content, so it can
>> honor
>> the width. you would need to write client code to resize the table column
>> widths (adjust the content widths).
>>
> How would one approach the writing of clinet code to support the
> widths? Is there any sample code available?
>
>> "milkyway" <d0mufasa@.hotmail.com> wrote in message
>> news:1127803098.346775.281760@.z14g2000cwz.googlegr oups.com...
>> > Hello,
>>> > I am trying to stop some behavior going on with a table. I have been
>> > using Visual Studio C# 2005.
>>> > Basically, the table has certain column widths to start out with. When
>> > data is added to it (and the size of the column is too small), the data
>> > (in this case text) in the column wraps ;-/
>>> > How can I keep the data from wrapping? What would be nice is if no
>> > wrapping to place at all and to just be able to adjust the size of
>> > columns manually. You know - where you place the cursor on the boundary
>> > of the column, the cursor changes and then you can lengthen or shorten
>> > the width of the column in order to see more (or less) data.
>>> > So, in a nutshell, I would like for the column widths (as well as the
>> > table length and width) to remain the same size as did from the start.
>> > Adjustment of column widths would take place only when using the mouse
>> > ;-)
>>> > How can I do this?
>>> > TIA
>
Thanks again - will try it out
Thanks again - will try it out
Put <nobr>text here</nobr> around your text.
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"Mr Newbie" <here@.now.com> wrote in message
news:e1qRrI0wFHA.664@.tk2msftngp13.phx.gbl...
> Im guessing here, but if you think about what the system would need to do
> in order to assess the column width Its unlikely that it is going to do it
> for you.
> In order to assess the column with of any column, one would have to loop
> through each cell and get the context, font and size and then measure this
> graphically; For each iteration, one would need to adjust the column width
> for each lager than previous cell until the end were reached.
> If there is no automatic way of doing this then you would have to do this
> manually with code.
> Other comments ?
> Mr N.
>
> "milkyway" <d0mufasa@.hotmail.com> wrote in message
> news:1127803098.346775.281760@.z14g2000cwz.googlegr oups.com...
>> Hello,
>>
>> I am trying to stop some behavior going on with a table. I have been
>> using Visual Studio C# 2005.
>>
>> Basically, the table has certain column widths to start out with. When
>> data is added to it (and the size of the column is too small), the data
>> (in this case text) in the column wraps ;-/
>>
>> How can I keep the data from wrapping? What would be nice is if no
>> wrapping to place at all and to just be able to adjust the size of
>> columns manually. You know - where you place the cursor on the boundary
>> of the column, the cursor changes and then you can lengthen or shorten
>> the width of the column in order to see more (or less) data.
>>
>> So, in a nutshell, I would like for the column widths (as well as the
>> table length and width) to remain the same size as did from the start.
>> Adjustment of column widths would take place only when using the mouse
>> ;-)
>>
>> How can I do this?
>>
>> TIA
>>
tables & rows & columns
3 columns. The 3rd column spans the 6 rows and contains a grid. If the
data in the grid has more than 6 rows of data, the other rows spread out
vertically, as if there is extra space in there. I don't want that to
happen, I want the 6 rows to be together as if there is no space between
then. I have tried using height, valign, using a set height and using a
percentage height and it doesn't work. How can I make the 6 rows on the
left align all the way to the top?
<table borderColor=red cellSpacing=0 cellPadding=0 width="100%" border=1
runat="server" ID="Table1">
<tr vAlign=top colspan=4><td> </td></tr>
<tr vAlign=top>
<td valign=top style="HEIGHT: 15px" align=left width=100>Col 1</td>
<td vAlign=top height=5>Col 2</td>
<td align=right rowspan=6>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col
3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col
3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br></td>
<td align=left rowspan=6>Col 4</td></tr>
<tr valign=top height=1>
<td valign=top>col 1</td>
<td valign=top>col 2</td>
</tr>
<tr valign=top height=1>
<td valign=top>col 1</td>
<td valign=top>col 2</td>
</tr>
<tr valign=top height=1>
<td valign=top>col 1</td>
<td valign=top>col 2</td>
</tr>
<tr valign=top height=1>
<td valign=top>col 1</td>
<td valign=top>col 2</td>
</tr>
<tr valign=top>
<td valign=top>col 1</td>
<td valign=top>col 2</td>
</tr>
</table>Maybe I didn't really get your question, but I do not see a grid in the
3rd column.
But did you try to put another table into one cell? That often works.
Remy Blaettler
www.collaboral.com
tables & rows & columns
3 columns. The 3rd column spans the 6 rows and contains a grid. If the
data in the grid has more than 6 rows of data, the other rows spread out
vertically, as if there is extra space in there. I don't want that to
happen, I want the 6 rows to be together as if there is no space between
then. I have tried using height, valign, using a set height and using a
percentage height and it doesn't work. How can I make the 6 rows on the
left align all the way to the top?
<table borderColor=red cellSpacing=0 cellPadding=0 width="100%" border=1
runat="server" ID="Table1">
<tr vAlign=top colspan=4><td> </td></tr
<tr vAlign=top>
<td valign=top style="HEIGHT: 15px" align=left width=100>Col 1</td>
<td vAlign=top height=5>Col 2</td>
<td align=right rowspan=6>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col
3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col
3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br></td>
<td align=left rowspan=6>Col 4</td></tr>
<tr valign=top height=1>
<td valign=top>col 1</td>
<td valign=top>col 2</td>
</tr>
<tr valign=top height=1>
<td valign=top>col 1</td>
<td valign=top>col 2</td>
</tr>
<tr valign=top height=1>
<td valign=top>col 1</td>
<td valign=top>col 2</td>
</tr>
<tr valign=top height=1>
<td valign=top>col 1</td>
<td valign=top>col 2</td>
</tr>
<tr valign=top>
<td valign=top>col 1</td>
<td valign=top>col 2</td>
</tr
</tableMaybe I didn't really get your question, but I do not see a grid in the
3rd column.
But did you try to put another table into one cell? That often works.
Remy Blaettler
www.collaboral.com
Tables and column sizes
matter what is in the other tables?
I've tried setting the width in px, in percentages, and nothing seems to
work; for example, the columns that are colored #cccccc I want to stay the
size of the menu control, which doesn't change.
However, if the column to the right of it, with the ucGeneral and ucDetails
controls, has nothing in it, or something very small, the #cccccc column
spreads out and I don't want it to do that. What's the secret.
<table runat=server bgcolor=white border=0 bordercolor=black height="100%"
width="100%" cellspacing=0 cellpadding=0 ID="Table1">
<tr height="10%" width="100%">
<td colspan=5><uc1:ucHeader id=UcHeader1
runat="server"></uc1:ucHeader></td>
</tr>
<tr valign=top>
<td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
<td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"><uc1:ucMenu
id=UcMenu1 runat="server"></uc1:ucMenu></td>
<td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
<td bgcolor="white" rowspan=3> </td>
</tr>
<tr valign=top width="100%"><td valign=top><uc1:ucGeneral id=UcGeneral1
runat="server"></uc1:ucPointOfDiversionGeneral></td></tr>
<tr valign=top height="100%" width="100%"><td valign=top><uc1:ucDetails
id=UcDetails1 runat="server"></uc1:ucDetails></td>
</tr>
</table>
Thanks.In the column you want to be fixed, add the "nowrap" option in the TD tag.
For the column to the right, set it's width to 100%.
You could also try putting the contents of the fixed cell in a table of it's
own with a fixed size and aligned either center, left, or right. If the
right
column changes, it won't change how the nested table looks to the user.
2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.mastervb.net/home/ng/for...st10017013.aspx
http://www.eggheadcafe.com/articles...e_generator.asp
"Iams" <Iams@.hotmail> wrote in message
news:%23iY$CvuEFHA.2180@.TK2MSFTNGP12.phx.gbl...
> What do I have to do to get a column in a table to stay the same size no
> matter what is in the other tables?
> I've tried setting the width in px, in percentages, and nothing seems to
> work; for example, the columns that are colored #cccccc I want to stay the
> size of the menu control, which doesn't change.
> However, if the column to the right of it, with the ucGeneral and
> ucDetails
> controls, has nothing in it, or something very small, the #cccccc column
> spreads out and I don't want it to do that. What's the secret.
> <table runat=server bgcolor=white border=0 bordercolor=black height="100%"
> width="100%" cellspacing=0 cellpadding=0 ID="Table1">
> <tr height="10%" width="100%">
> <td colspan=5><uc1:ucHeader id=UcHeader1
> runat="server"></uc1:ucHeader></td>
> </tr>
> <tr valign=top>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"><uc1:ucMenu
> id=UcMenu1 runat="server"></uc1:ucMenu></td>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
> <td bgcolor="white" rowspan=3> </td>
> </tr>
> <tr valign=top width="100%"><td valign=top><uc1:ucGeneral id=UcGeneral1
> runat="server"></uc1:ucPointOfDiversionGeneral></td></tr>
> <tr valign=top height="100%" width="100%"><td valign=top><uc1:ucDetails
> id=UcDetails1 runat="server"></uc1:ucDetails></td>
> </tr>
> </table>
>
> Thanks.
>
For the table set css rule table_layout:fixed; then specify the width for
the columns in the first row.
Eliyahu
"Iams" <Iams@.hotmail> wrote in message
news:%23iY$CvuEFHA.2180@.TK2MSFTNGP12.phx.gbl...
> What do I have to do to get a column in a table to stay the same size no
> matter what is in the other tables?
> I've tried setting the width in px, in percentages, and nothing seems to
> work; for example, the columns that are colored #cccccc I want to stay the
> size of the menu control, which doesn't change.
> However, if the column to the right of it, with the ucGeneral and
ucDetails
> controls, has nothing in it, or something very small, the #cccccc column
> spreads out and I don't want it to do that. What's the secret.
> <table runat=server bgcolor=white border=0 bordercolor=black height="100%"
> width="100%" cellspacing=0 cellpadding=0 ID="Table1">
> <tr height="10%" width="100%">
> <td colspan=5><uc1:ucHeader id=UcHeader1
> runat="server"></uc1:ucHeader></td>
> </tr>
> <tr valign=top>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"><uc1:ucMenu
> id=UcMenu1 runat="server"></uc1:ucMenu></td>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
> <td bgcolor="white" rowspan=3> </td>
> </tr>
> <tr valign=top width="100%"><td valign=top><uc1:ucGeneral id=UcGeneral1
> runat="server"></uc1:ucPointOfDiversionGeneral></td></tr>
> <tr valign=top height="100%" width="100%"><td valign=top><uc1:ucDetails
> id=UcDetails1 runat="server"></uc1:ucDetails></td>
> </tr>
> </table>
>
> Thanks.
>
Great ideas! Thanks so much!
"Robbe Morris [C# MVP]" <info@.turnkeytools.com> wrote in message
news:%23x78IcwEFHA.1924@.TK2MSFTNGP14.phx.gbl...
> In the column you want to be fixed, add the "nowrap" option in the TD tag.
> For the column to the right, set it's width to 100%.
> You could also try putting the contents of the fixed cell in a table of
it's
> own with a fixed size and aligned either center, left, or right. If the
> right
> column changes, it won't change how the nested table looks to the user.
> --
> 2005 Microsoft MVP C#
> Robbe Morris
> http://www.robbemorris.com
> http://www.mastervb.net/home/ng/for...st10017013.aspx
> http://www.eggheadcafe.com/articles...e_generator.asp
>
> "Iams" <Iams@.hotmail> wrote in message
> news:%23iY$CvuEFHA.2180@.TK2MSFTNGP12.phx.gbl...
the
height="100%"
id=UcGeneral1
valign=top><uc1:ucDetails
>
Tables and column sizes
matter what is in the other tables?
I've tried setting the width in px, in percentages, and nothing seems to
work; for example, the columns that are colored #cccccc I want to stay the
size of the menu control, which doesn't change.
However, if the column to the right of it, with the ucGeneral and ucDetails
controls, has nothing in it, or something very small, the #cccccc column
spreads out and I don't want it to do that. What's the secret.
<table runat=server bgcolor=white border=0 bordercolor=black height="100%"
width="100%" cellspacing=0 cellpadding=0 ID="Table1">
<tr height="10%" width="100%">
<td colspan=5><uc1:ucHeader id=UcHeader1
runat="server"></uc1:ucHeader></td>
</tr>
<tr valign=top>
<td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
<td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"><uc1:ucMenu
id=UcMenu1 runat="server"></uc1:ucMenu></td>
<td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
<td bgcolor="white" rowspan=3> </td>
</tr>
<tr valign=top width="100%"><td valign=top><uc1:ucGeneral id=UcGeneral1
runat="server"></uc1:ucPointOfDiversionGeneral></td></tr>
<tr valign=top height="100%" width="100%"><td valign=top><uc1:ucDetails
id=UcDetails1 runat="server"></uc1:ucDetails></td>
</tr>
</table
Thanks.In the column you want to be fixed, add the "nowrap" option in the TD tag.
For the column to the right, set it's width to 100%.
You could also try putting the contents of the fixed cell in a table of it's
own with a fixed size and aligned either center, left, or right. If the
right
column changes, it won't change how the nested table looks to the user.
--
2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.mastervb.net/home/ng/for...st10017013.aspx
http://www.eggheadcafe.com/articles...e_generator.asp
"Iams" <Iams@.hotmail> wrote in message
news:%23iY$CvuEFHA.2180@.TK2MSFTNGP12.phx.gbl...
> What do I have to do to get a column in a table to stay the same size no
> matter what is in the other tables?
> I've tried setting the width in px, in percentages, and nothing seems to
> work; for example, the columns that are colored #cccccc I want to stay the
> size of the menu control, which doesn't change.
> However, if the column to the right of it, with the ucGeneral and
> ucDetails
> controls, has nothing in it, or something very small, the #cccccc column
> spreads out and I don't want it to do that. What's the secret.
> <table runat=server bgcolor=white border=0 bordercolor=black height="100%"
> width="100%" cellspacing=0 cellpadding=0 ID="Table1">
> <tr height="10%" width="100%">
> <td colspan=5><uc1:ucHeader id=UcHeader1
> runat="server"></uc1:ucHeader></td>
> </tr>
> <tr valign=top>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"><uc1:ucMenu
> id=UcMenu1 runat="server"></uc1:ucMenu></td>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
> <td bgcolor="white" rowspan=3> </td>
> </tr>
> <tr valign=top width="100%"><td valign=top><uc1:ucGeneral id=UcGeneral1
> runat="server"></uc1:ucPointOfDiversionGeneral></td></tr>
> <tr valign=top height="100%" width="100%"><td valign=top><uc1:ucDetails
> id=UcDetails1 runat="server"></uc1:ucDetails></td>
> </tr>
> </table>
>
> Thanks.
In the column you want to be fixed, add the "nowrap" option in the TD tag.
For the column to the right, set it's width to 100%.
You could also try putting the contents of the fixed cell in a table of it's
own with a fixed size and aligned either center, left, or right. If the
right
column changes, it won't change how the nested table looks to the user.
--
2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.mastervb.net/home/ng/for...st10017013.aspx
http://www.eggheadcafe.com/articles...e_generator.asp
"Iams" <Iams@.hotmail> wrote in message
news:%23iY$CvuEFHA.2180@.TK2MSFTNGP12.phx.gbl...
> What do I have to do to get a column in a table to stay the same size no
> matter what is in the other tables?
> I've tried setting the width in px, in percentages, and nothing seems to
> work; for example, the columns that are colored #cccccc I want to stay the
> size of the menu control, which doesn't change.
> However, if the column to the right of it, with the ucGeneral and
> ucDetails
> controls, has nothing in it, or something very small, the #cccccc column
> spreads out and I don't want it to do that. What's the secret.
> <table runat=server bgcolor=white border=0 bordercolor=black height="100%"
> width="100%" cellspacing=0 cellpadding=0 ID="Table1">
> <tr height="10%" width="100%">
> <td colspan=5><uc1:ucHeader id=UcHeader1
> runat="server"></uc1:ucHeader></td>
> </tr>
> <tr valign=top>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"><uc1:ucMenu
> id=UcMenu1 runat="server"></uc1:ucMenu></td>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
> <td bgcolor="white" rowspan=3> </td>
> </tr>
> <tr valign=top width="100%"><td valign=top><uc1:ucGeneral id=UcGeneral1
> runat="server"></uc1:ucPointOfDiversionGeneral></td></tr>
> <tr valign=top height="100%" width="100%"><td valign=top><uc1:ucDetails
> id=UcDetails1 runat="server"></uc1:ucDetails></td>
> </tr>
> </table>
>
> Thanks.
For the table set css rule table_layout:fixed; then specify the width for
the columns in the first row.
Eliyahu
"Iams" <Iams@.hotmail> wrote in message
news:%23iY$CvuEFHA.2180@.TK2MSFTNGP12.phx.gbl...
> What do I have to do to get a column in a table to stay the same size no
> matter what is in the other tables?
> I've tried setting the width in px, in percentages, and nothing seems to
> work; for example, the columns that are colored #cccccc I want to stay the
> size of the menu control, which doesn't change.
> However, if the column to the right of it, with the ucGeneral and
ucDetails
> controls, has nothing in it, or something very small, the #cccccc column
> spreads out and I don't want it to do that. What's the secret.
> <table runat=server bgcolor=white border=0 bordercolor=black height="100%"
> width="100%" cellspacing=0 cellpadding=0 ID="Table1">
> <tr height="10%" width="100%">
> <td colspan=5><uc1:ucHeader id=UcHeader1
> runat="server"></uc1:ucHeader></td>
> </tr>
> <tr valign=top>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"><uc1:ucMenu
> id=UcMenu1 runat="server"></uc1:ucMenu></td>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
> <td bgcolor="white" rowspan=3> </td>
> </tr>
> <tr valign=top width="100%"><td valign=top><uc1:ucGeneral id=UcGeneral1
> runat="server"></uc1:ucPointOfDiversionGeneral></td></tr>
> <tr valign=top height="100%" width="100%"><td valign=top><uc1:ucDetails
> id=UcDetails1 runat="server"></uc1:ucDetails></td>
> </tr>
> </table>
>
> Thanks.
For the table set css rule table_layout:fixed; then specify the width for
the columns in the first row.
Eliyahu
"Iams" <Iams@.hotmail> wrote in message
news:%23iY$CvuEFHA.2180@.TK2MSFTNGP12.phx.gbl...
> What do I have to do to get a column in a table to stay the same size no
> matter what is in the other tables?
> I've tried setting the width in px, in percentages, and nothing seems to
> work; for example, the columns that are colored #cccccc I want to stay the
> size of the menu control, which doesn't change.
> However, if the column to the right of it, with the ucGeneral and
ucDetails
> controls, has nothing in it, or something very small, the #cccccc column
> spreads out and I don't want it to do that. What's the secret.
> <table runat=server bgcolor=white border=0 bordercolor=black height="100%"
> width="100%" cellspacing=0 cellpadding=0 ID="Table1">
> <tr height="10%" width="100%">
> <td colspan=5><uc1:ucHeader id=UcHeader1
> runat="server"></uc1:ucHeader></td>
> </tr>
> <tr valign=top>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"><uc1:ucMenu
> id=UcMenu1 runat="server"></uc1:ucMenu></td>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
> <td bgcolor="white" rowspan=3> </td>
> </tr>
> <tr valign=top width="100%"><td valign=top><uc1:ucGeneral id=UcGeneral1
> runat="server"></uc1:ucPointOfDiversionGeneral></td></tr>
> <tr valign=top height="100%" width="100%"><td valign=top><uc1:ucDetails
> id=UcDetails1 runat="server"></uc1:ucDetails></td>
> </tr>
> </table>
>
> Thanks.
Great ideas! Thanks so much!
"Robbe Morris [C# MVP]" <info@.turnkeytools.com> wrote in message
news:%23x78IcwEFHA.1924@.TK2MSFTNGP14.phx.gbl...
> In the column you want to be fixed, add the "nowrap" option in the TD tag.
> For the column to the right, set it's width to 100%.
> You could also try putting the contents of the fixed cell in a table of
it's
> own with a fixed size and aligned either center, left, or right. If the
> right
> column changes, it won't change how the nested table looks to the user.
> --
> 2005 Microsoft MVP C#
> Robbe Morris
> http://www.robbemorris.com
> http://www.mastervb.net/home/ng/for...st10017013.aspx
> http://www.eggheadcafe.com/articles...e_generator.asp
>
> "Iams" <Iams@.hotmail> wrote in message
> news:%23iY$CvuEFHA.2180@.TK2MSFTNGP12.phx.gbl...
> > What do I have to do to get a column in a table to stay the same size no
> > matter what is in the other tables?
> > I've tried setting the width in px, in percentages, and nothing seems to
> > work; for example, the columns that are colored #cccccc I want to stay
the
> > size of the menu control, which doesn't change.
> > However, if the column to the right of it, with the ucGeneral and
> > ucDetails
> > controls, has nothing in it, or something very small, the #cccccc column
> > spreads out and I don't want it to do that. What's the secret.
> > <table runat=server bgcolor=white border=0 bordercolor=black
height="100%"
> > width="100%" cellspacing=0 cellpadding=0 ID="Table1">
> > <tr height="10%" width="100%">
> > <td colspan=5><uc1:ucHeader id=UcHeader1
> > runat="server"></uc1:ucHeader></td>
> > </tr>
> > <tr valign=top>
> > <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
> > <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"><uc1:ucMenu
> > id=UcMenu1 runat="server"></uc1:ucMenu></td>
> > <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
> > <td bgcolor="white" rowspan=3> </td>
> > </tr>
> > <tr valign=top width="100%"><td valign=top><uc1:ucGeneral
id=UcGeneral1
> > runat="server"></uc1:ucPointOfDiversionGeneral></td></tr>
> > <tr valign=top height="100%" width="100%"><td
valign=top><uc1:ucDetails
> > id=UcDetails1 runat="server"></uc1:ucDetails></td>
> > </tr>
> > </table>
> > Thanks.
tables ;-(
I am trying to stop some behavior going on with a table. I have been
using Visual Studio C# 2005.
Basically, the table has certain column widths to start out with. When
data is added to it (and the size of the column is too small), the data
(in this case text) in the column wraps ;-/
How can I keep the data from wrapping? What would be nice is if no
wrapping to place at all and to just be able to adjust the size of
columns manually. You know - where you place the cursor on the boundary
of the column, the cursor changes and then you can lengthen or shorten
the width of the column in order to see more (or less) data.
So, in a nutshell, I would like for the column widths (as well as the
table length and width) to remain the same size as did from the start.
Adjustment of column widths would take place only when using the mouse
;-)
How can I do this?
TIAIm guessing here, but if you think about what the system would need to do in
order to assess the column width Its unlikely that it is going to do it for
you.
In order to assess the column with of any column, one would have to loop
through each cell and get the context, font and size and then measure this
graphically; For each iteration, one would need to adjust the column width
for each lager than previous cell until the end were reached.
If there is no automatic way of doing this then you would have to do this
manually with code.
Other comments ?
Mr N.
"milkyway" <d0mufasa@.hotmail.com> wrote in message
news:1127803098.346775.281760@.z14g2000cwz.googlegroups.com...
> Hello,
> I am trying to stop some behavior going on with a table. I have been
> using Visual Studio C# 2005.
> Basically, the table has certain column widths to start out with. When
> data is added to it (and the size of the column is too small), the data
> (in this case text) in the column wraps ;-/
> How can I keep the data from wrapping? What would be nice is if no
> wrapping to place at all and to just be able to adjust the size of
> columns manually. You know - where you place the cursor on the boundary
> of the column, the cursor changes and then you can lengthen or shorten
> the width of the column in order to see more (or less) data.
> So, in a nutshell, I would like for the column widths (as well as the
> table length and width) to remain the same size as did from the start.
> Adjustment of column widths would take place only when using the mouse
> ;-)
> How can I do this?
> TIA
>
Try style rule table-layout:fixed;
Eliyahu
"milkyway" <d0mufasa@.hotmail.com> wrote in message
news:1127803098.346775.281760@.z14g2000cwz.googlegroups.com...
> Hello,
> I am trying to stop some behavior going on with a table. I have been
> using Visual Studio C# 2005.
> Basically, the table has certain column widths to start out with. When
> data is added to it (and the size of the column is too small), the data
> (in this case text) in the column wraps ;-/
> How can I keep the data from wrapping? What would be nice is if no
> wrapping to place at all and to just be able to adjust the size of
> columns manually. You know - where you place the cursor on the boundary
> of the column, the cursor changes and then you can lengthen or shorten
> the width of the column in order to see more (or less) data.
> So, in a nutshell, I would like for the column widths (as well as the
> table length and width) to remain the same size as did from the start.
> Adjustment of column widths would take place only when using the mouse
> ;-)
> How can I do this?
> TIA
>
milkyway wrote:
> Hello,
> I am trying to stop some behavior going on with a table. I have been
> using Visual Studio C# 2005.
> Basically, the table has certain column widths to start out with. When
> data is added to it (and the size of the column is too small), the
> data (in this case text) in the column wraps ;-/
> How can I keep the data from wrapping? What would be nice is if no
> wrapping to place at all and to just be able to adjust the size of
> columns manually. You know - where you place the cursor on the
> boundary of the column, the cursor changes and then you can lengthen
> or shorten the width of the column in order to see more (or less)
> data.
> So, in a nutshell, I would like for the column widths (as well as the
> table length and width) to remain the same size as did from the start.
> Adjustment of column widths would take place only when using the mouse
> ;-)
> How can I do this?
> TIA
Watch out for a too-exact layout, one that is "perfect" on your development
machine.
A user might use a different browser, have different installed fonts or uses
by default a font with a different size -> gone is your careful layout!
Hans Kesting
set absolute width and overflow style for each td's content, so it can honor
the width. you would need to write client code to resize the table column
widths (adjust the content widths).
<table border=1>
<tr>
<td nowrap><div style="width:40;overflow:hidden">this fits</div></td>
<td nowrap><div style="width:40;overflow:hidden">this xxxxxxxxxxxxxxxxx
doesn't fit</div></td>
</tr>
</table>
-- bruce (sqlwork.com)
"milkyway" <d0mufasa@.hotmail.com> wrote in message
news:1127803098.346775.281760@.z14g2000cwz.googlegroups.com...
> Hello,
> I am trying to stop some behavior going on with a table. I have been
> using Visual Studio C# 2005.
> Basically, the table has certain column widths to start out with. When
> data is added to it (and the size of the column is too small), the data
> (in this case text) in the column wraps ;-/
> How can I keep the data from wrapping? What would be nice is if no
> wrapping to place at all and to just be able to adjust the size of
> columns manually. You know - where you place the cursor on the boundary
> of the column, the cursor changes and then you can lengthen or shorten
> the width of the column in order to see more (or less) data.
> So, in a nutshell, I would like for the column widths (as well as the
> table length and width) to remain the same size as did from the start.
> Adjustment of column widths would take place only when using the mouse
> ;-)
> How can I do this?
> TIA
>
Thanks to all for the responses ;-)
Bruce Barker wrote:
> set absolute width and overflow style for each td's content, so it can hon
or
> the width. you would need to write client code to resize the table column
> widths (adjust the content widths).
>
How would one approach the writing of clinet code to support the
widths? Is there any sample code available?
> "milkyway" <d0mufasa@.hotmail.com> wrote in message
> news:1127803098.346775.281760@.z14g2000cwz.googlegroups.com...
You could easily ammend this code to suit your table control.
http://www.trainingon.net/Articles/TIP0005.htm
HTH
"milkyway" <d0mufasa@.hotmail.com> wrote in message
news:1127968780.006696.275920@.g43g2000cwa.googlegroups.com...
> Thanks to all for the responses ;-)
> Bruce Barker wrote:
> How would one approach the writing of clinet code to support the
> widths? Is there any sample code available?
>
>
Thanks again - will try it out
Thanks again - will try it out
Put <nobr>text here</nobr> around your text.
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
"Mr Newbie" <here@.now.com> wrote in message
news:e1qRrI0wFHA.664@.tk2msftngp13.phx.gbl...
> Im guessing here, but if you think about what the system would need to do
> in order to assess the column width Its unlikely that it is going to do it
> for you.
> In order to assess the column with of any column, one would have to loop
> through each cell and get the context, font and size and then measure this
> graphically; For each iteration, one would need to adjust the column width
> for each lager than previous cell until the end were reached.
> If there is no automatic way of doing this then you would have to do this
> manually with code.
> Other comments ?
> Mr N.
>
> "milkyway" <d0mufasa@.hotmail.com> wrote in message
> news:1127803098.346775.281760@.z14g2000cwz.googlegroups.com...
>
Tables and Design
I am using a table in grid layout and position my controls where I want them. Does anyone know why when I view it in a browser my controls are not positioned like the way I have them in design view. Some images are overlapping other images.
post your html table code here.tables and data
where to start
using asp.net and codebehind - cant seem to find any examples anywhere!Luna,
Check out: www.datagridgirl.com
She's placed many samples on her site.
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer
Free code library at:
www.aboutfortunate.com
"Out of chaos comes order."
Nietzche
"luna" <luna@.themoon.com> wrote in message
news:7hqYb.542$AQ4.336311@.newsfep2-win.server.ntli.net...
> trying to populate a table with data from a mssql database, not quite sure
> where to start
> using asp.net and codebehind - cant seem to find any examples anywhere!
Your post went unanswered. Have you resolved this issue?
--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"luna" <luna@.themoon.com> wrote in message
news:7hqYb.542$AQ4.336311@.newsfep2-win.server.ntli.net...
> trying to populate a table with data from a mssql database, not quite sure
> where to start
> using asp.net and codebehind - cant seem to find any examples anywhere!
Tables and CSS
Not sure if this is the right forum for this, but here goes:
I'm using VS.NET 2003 to create a Web app and have defined a table as
follows:
<table border=3 bordercolordark="#006699" bordercolorlight="lightgrey"
width="100%">
As I'm going to be reusing this style all over the app, I'm trying to
replace it with a style, as follows:
<table class=tblBorder>
and in my stylesheet I have the following definition:
.tblBorder
{
border-style: outset;
border-bottom-color: "#006699";
border-right-color: "#006699";
border-left-color: "lightgrey";
border-top-color: "lightgrey";
border-width: 3;
}
But it doesn't look right. I'm obviously missing something...
Any assistance gratefully received.
Mark RaeHi Mark,
You aren't missing anything. The bordercolorlight and bordercolordark are
rendered differently than CSS styles are so things may not look the same
when applied differently. Also, border in the <table> tag is expressed
differently than border-width is in CSS (border-width in CSS can take
different measurement units including pt, px, em, etc). You will have to toy
around with your CSS settings to get them closer to what the browser
actually renders if those values were supplied in the tag.
HTH
Kyril Magnos
Question of the day:
What is Mono?
A) Disease where the lymph nodes become swollen.
B) A single sound
C) A synonym for one
D) A port of .NET meant to royally irritate MSFT
E) All of the above.
"Mark Rae" <mark@.mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:%23JEFeE3aEHA.3512@.TK2MSFTNGP12.phx.gbl...
| Hi,
|
| Not sure if this is the right forum for this, but here goes:
|
| I'm using VS.NET 2003 to create a Web app and have defined a table as
| follows:
|
| <table border=3 bordercolordark="#006699" bordercolorlight="lightgrey"
| width="100%">
|
| As I'm going to be reusing this style all over the app, I'm trying to
| replace it with a style, as follows:
|
| <table class=tblBorder>
|
| and in my stylesheet I have the following definition:
|
| .tblBorder
| {
| border-style: outset;
| border-bottom-color: "#006699";
| border-right-color: "#006699";
| border-left-color: "lightgrey";
| border-top-color: "lightgrey";
| border-width: 3;
| }
|
| But it doesn't look right. I'm obviously missing something...
|
| Any assistance gratefully received.
|
| Mark Rae
|
|
"Kyril Magnos" <kyril.magnos@.yahoo.com> wrote in message
news:eHTGrL3aEHA.4048@.TK2MSFTNGP10.phx.gbl...
> Hi Mark,
> You aren't missing anything. The bordercolorlight and bordercolordark are
> rendered differently than CSS styles are so things may not look the same
> when applied differently. Also, border in the <table> tag is expressed
> differently than border-width is in CSS (border-width in CSS can take
> different measurement units including pt, px, em, etc). You will have to
toy
> around with your CSS settings to get them closer to what the browser
> actually renders if those values were supplied in the tag.
OK - thanks for the reply.
Check out
http://www.somacon.com/color/html_c...rder_styles.php
Alphonse Giambrone
Email: a-giam at customdatasolutions dot us
"Mark Rae" <mark@.mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:%23JEFeE3aEHA.3512@.TK2MSFTNGP12.phx.gbl...
> Hi,
> Not sure if this is the right forum for this, but here goes:
> I'm using VS.NET 2003 to create a Web app and have defined a table as
> follows:
> <table border=3 bordercolordark="#006699" bordercolorlight="lightgrey"
> width="100%">
> As I'm going to be reusing this style all over the app, I'm trying to
> replace it with a style, as follows:
> <table class=tblBorder>
> and in my stylesheet I have the following definition:
> .tblBorder
> {
> border-style: outset;
> border-bottom-color: "#006699";
> border-right-color: "#006699";
> border-left-color: "lightgrey";
> border-top-color: "lightgrey";
> border-width: 3;
> }
> But it doesn't look right. I'm obviously missing something...
> Any assistance gratefully received.
> Mark Rae
>
"Alphonse Giambrone" <NOSPAMa-giam@.example.invalid> wrote in message
news:emevqZ4aEHA.2056@.TK2MSFTNGP12.phx.gbl...
> Check out
> http://www.somacon.com/color/html_c...rder_styles.php
A useful link - thanks very much.
Tables and CSS
Not sure if this is the right forum for this, but here goes:
I'm using VS.NET 2003 to create a Web app and have defined a table as
follows:
<table border=3 bordercolordark="#006699" bordercolorlight="lightgrey"
width="100%"
As I'm going to be reusing this style all over the app, I'm trying to
replace it with a style, as follows:
<table class=tblBorder
and in my stylesheet I have the following definition:
..tblBorder
{
border-style: outset;
border-bottom-color: "#006699";
border-right-color: "#006699";
border-left-color: "lightgrey";
border-top-color: "lightgrey";
border-width: 3;
}
But it doesn't look right. I'm obviously missing something...
Any assistance gratefully received.
Mark RaeHi Mark,
You aren't missing anything. The bordercolorlight and bordercolordark are
rendered differently than CSS styles are so things may not look the same
when applied differently. Also, border in the <table> tag is expressed
differently than border-width is in CSS (border-width in CSS can take
different measurement units including pt, px, em, etc). You will have to toy
around with your CSS settings to get them closer to what the browser
actually renders if those values were supplied in the tag.
--
HTH
Kyril Magnos
Question of the day:
What is Mono?
A) Disease where the lymph nodes become swollen.
B) A single sound
C) A synonym for one
D) A port of .NET meant to royally irritate MSFT
E) All of the above.
"Mark Rae" <mark@.mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:%23JEFeE3aEHA.3512@.TK2MSFTNGP12.phx.gbl...
| Hi,
|
| Not sure if this is the right forum for this, but here goes:
|
| I'm using VS.NET 2003 to create a Web app and have defined a table as
| follows:
|
| <table border=3 bordercolordark="#006699" bordercolorlight="lightgrey"
| width="100%">
|
| As I'm going to be reusing this style all over the app, I'm trying to
| replace it with a style, as follows:
|
| <table class=tblBorder>
|
| and in my stylesheet I have the following definition:
|
| .tblBorder
| {
| border-style: outset;
| border-bottom-color: "#006699";
| border-right-color: "#006699";
| border-left-color: "lightgrey";
| border-top-color: "lightgrey";
| border-width: 3;
| }
|
| But it doesn't look right. I'm obviously missing something...
|
| Any assistance gratefully received.
|
| Mark Rae
|
|
"Kyril Magnos" <kyril.magnos@.yahoo.com> wrote in message
news:eHTGrL3aEHA.4048@.TK2MSFTNGP10.phx.gbl...
> Hi Mark,
> You aren't missing anything. The bordercolorlight and bordercolordark are
> rendered differently than CSS styles are so things may not look the same
> when applied differently. Also, border in the <table> tag is expressed
> differently than border-width is in CSS (border-width in CSS can take
> different measurement units including pt, px, em, etc). You will have to
toy
> around with your CSS settings to get them closer to what the browser
> actually renders if those values were supplied in the tag.
OK - thanks for the reply.
Check out
http://www.somacon.com/color/html_c...rder_styles.php
--
Alphonse Giambrone
Email: a-giam at customdatasolutions dot us
"Mark Rae" <mark@.mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:%23JEFeE3aEHA.3512@.TK2MSFTNGP12.phx.gbl...
> Hi,
> Not sure if this is the right forum for this, but here goes:
> I'm using VS.NET 2003 to create a Web app and have defined a table as
> follows:
> <table border=3 bordercolordark="#006699" bordercolorlight="lightgrey"
> width="100%">
> As I'm going to be reusing this style all over the app, I'm trying to
> replace it with a style, as follows:
> <table class=tblBorder>
> and in my stylesheet I have the following definition:
> .tblBorder
> {
> border-style: outset;
> border-bottom-color: "#006699";
> border-right-color: "#006699";
> border-left-color: "lightgrey";
> border-top-color: "lightgrey";
> border-width: 3;
> }
> But it doesn't look right. I'm obviously missing something...
> Any assistance gratefully received.
> Mark Rae
"Alphonse Giambrone" <NOSPAMa-giam@.example.invalid> wrote in message
news:emevqZ4aEHA.2056@.TK2MSFTNGP12.phx.gbl...
> Check out
> http://www.somacon.com/color/html_c...rder_styles.php
A useful link - thanks very much.
Tables automatically resizes
The problem I have is that I create the outer table and set the size
properties to what I want them to be, then, if I put another table
into the first cell, when I resize that nested table, it automatically
resizes the other cells also. If I do the same type of thing in
Dreamweaver, this doesn't happen. Is there a setting of some sort in
..NET that I can turn off to prevent this from happening?
Here is the html code for the table. Sorry about the formatting.
It is the tblMenuBar table, that when I resize it, vertically, resizes
the other cells in the outer table.
<body class="BasePage" bottomMargin="0" leftMargin="0" topMargin="0"
rightMargin="0">
<form id="frmLogin" method="post" runat="server">
<TABLE id="tblBase" height="100%" cellSpacing="0" cols="4"
cellPadding="0" width="1000" border="0">
<TR>
<TD class="MenuBar" width="177" rowSpan="3">
<TABLE id="tblMenuBar" height="100%" cellSpacing="1"
cellPadding="1" width="177" border="1">
<TR>
<TD height="50" width="100%">
<asp:HyperLink id="HyperLink1"
runat="server">HyperLink</asp:HyperLink></TD>
</TR>
</TABLE>
</TD>
<td class="FormSpacer" width="22" bgColor="#ffffff"
rowSpan="3"></td>
<td class="PageHeader" vAlign="top" align="middle" width="601"
style="HEIGHT: 0.64in">
<uc1:pageheader id="PageHeader" runat="server"></uc1:pageheader>
</td>
<td class="FormSpacer" width="200" rowSpan="3"></td>
</TR>
<TR>
<TD class="WorkSpace" vAlign="top">
<div align="center">
<asp:hyperlink id="hplSecureSession" runat="server"
NavigateUrl="https://statslink.streck.com/">Click here for SECURE
INTERNET SESSION</asp:hyperlink>
</div>
<DIV align="center" class="WorkSpace" noWrap>
</DIV>
</TD>
</TR>
<TR>
<td class="PageFooter" height="50">
<uc1:pagefooter id="PageFooter" runat="server"></uc1:pagefooter>
</td>
</TR>
</TABLE>
</form>
</body
Thank you!
KalvinGive tblBase a specific height of 50.
Give tblMenuBar a specific height of 50, as well as the first cell in the
first row of tblMenuBar; give it a height of 50 too.
In fact, for anything that shouldn't be taller than 50 pixels, give anything
involved in it a hard-coded height of 50.
Avoid putting anything taller than 50 pixes in the cells of tblMenuBar.
This may or may not fix your problem, but it's good practice to be very
specific with tables when you need them to behave in a precise manner.
"Kalvin" <ktuel@.streck.com> wrote in message
news:879688dc.0308081113.2fa335b3@.posting.google.c om...
> I am using a nested table to control different elements of my layout.
> The problem I have is that I create the outer table and set the size
> properties to what I want them to be, then, if I put another table
> into the first cell, when I resize that nested table, it automatically
> resizes the other cells also. If I do the same type of thing in
> Dreamweaver, this doesn't happen. Is there a setting of some sort in
> .NET that I can turn off to prevent this from happening?
> Here is the html code for the table. Sorry about the formatting.
> It is the tblMenuBar table, that when I resize it, vertically, resizes
> the other cells in the outer table.
>
> <body class="BasePage" bottomMargin="0" leftMargin="0" topMargin="0"
> rightMargin="0">
> <form id="frmLogin" method="post" runat="server">
> <TABLE id="tblBase" height="100%" cellSpacing="0" cols="4"
> cellPadding="0" width="1000" border="0">
> <TR>
> <TD class="MenuBar" width="177" rowSpan="3">
> <TABLE id="tblMenuBar" height="100%" cellSpacing="1"
> cellPadding="1" width="177" border="1">
> <TR>
> <TD height="50" width="100%">
> <asp:HyperLink id="HyperLink1"
> runat="server">HyperLink</asp:HyperLink></TD>
> </TR>
> </TABLE>
> </TD>
> <td class="FormSpacer" width="22" bgColor="#ffffff"
> rowSpan="3"></td>
> <td class="PageHeader" vAlign="top" align="middle" width="601"
> style="HEIGHT: 0.64in">
> <uc1:pageheader id="PageHeader" runat="server"></uc1:pageheader>
> </td>
> <td class="FormSpacer" width="200" rowSpan="3"></td>
> </TR>
> <TR>
> <TD class="WorkSpace" vAlign="top">
> <div align="center">
> <asp:hyperlink id="hplSecureSession" runat="server"
> NavigateUrl="https://statslink.streck.com/">Click here for SECURE
> INTERNET SESSION</asp:hyperlink>
> </div>
> <DIV align="center" class="WorkSpace" noWrap>
> </DIV>
> </TD>
> </TR>
> <TR>
> <td class="PageFooter" height="50">
> <uc1:pagefooter id="PageFooter" runat="server"></uc1:pagefooter>
> </td>
> </TR>
> </TABLE>
> </form>
> </body>
> Thank you!
> Kalvin
Monday, March 26, 2012
Tables Asp.Net Visible property
im having serious trouble with my tables in asp.net. i inherited a
system that allowed me to set my tables visble property to true and
false. When i try and create a table using html i do not have that
property.
does anyone know of a different way to create a table '
the system i inherited with the visible property in the tables uses
the following in the top part of the code -
system.web.ui.htmlcontrols.htmltable
is this the reason for the extra property '
my tables dont seem to have this in the code.
thanks
CGHy,
put an asp:panel around your table and you can set the visible property.
<asp:panel id="pan" runat="server">
<table>
<tr>
<td></td>
</tr>
</table>
</asp:panel>
Greez
The Filzmeister
Colin Graham schrieb:
> Hi guys,
> im having serious trouble with my tables in asp.net. i inherited a
> system that allowed me to set my tables visble property to true and
> false. When i try and create a table using html i do not have that
> property.
> does anyone know of a different way to create a table '
> the system i inherited with the visible property in the tables uses
> the following in the top part of the code -
> system.web.ui.htmlcontrols.htmltable
> is this the reason for the extra property '
> my tables dont seem to have this in the code.
> thanks
> CG
You can operate with css rules display and visibility.
Eliyahu
"Colin Graham" <csgraham74@.hotmail.com> wrote in message
news:ee261922.0504210322.483c2912@.posting.google.com...
> Hi guys,
> im having serious trouble with my tables in asp.net. i inherited a
> system that allowed me to set my tables visble property to true and
> false. When i try and create a table using html i do not have that
> property.
> does anyone know of a different way to create a table '
> the system i inherited with the visible property in the tables uses
> the following in the top part of the code -
> system.web.ui.htmlcontrols.htmltable
> is this the reason for the extra property '
> my tables dont seem to have this in the code.
> thanks
> CG
Christian Filzwieser wrote:
> Hy,
> put an asp:panel around your table and you can set the visible
property.
> <asp:panel id="pan" runat="server">
> <table>
> <tr>
> <td></td>
> </tr>
> </table>
> </asp:panel>
>
<asp:PlaceHolder> may be a better choice because it doesn't generate
any contents itself.