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

html table

I have a datagrid with about 15 columns bound at run time. I create an html
table and have this datagrid inside.

<table align=center width="90%">
<tr>
<td>
<asp:datagrid ......
...
</asp:datagrid>
</td>
</tr>
</table>

Somehow the datagrid go beyond the screen width. I have to scroll
horizontally to view the last several columns.
I like to have this table 90% of the screen width (any screen, or solution).
Anyone has ideas how to archive this?
--Thanks
Nov 19 '05 #1
3 1997
JV
what style attrs do you have set on this datagrid?

"CalSun" <ca****@gmail.com> wrote
I have a datagrid with about 15 columns bound at run time. I create an html
table and have this datagrid inside.

<table align=center width="90%">
<tr>
<td>
<asp:datagrid ......
...
</asp:datagrid>
</td>
</tr>
</table>

Somehow the datagrid go beyond the screen width. I have to scroll
horizontally to view the last several columns.
I like to have this table 90% of the screen width (any screen, or
solution). Anyone has ideas how to archive this?
--Thanks

Nov 19 '05 #2
thanks JV for replying. Here is the definition part of the datagrid:

<asp:DataGrid Width="100%" id="grid" runat="server"
AutoGenerateColumns="false" CssClass="Shadow"
BackColor="white" CellPadding="2" CellSpacing="2" GridLines="none"
BorderStyle="solid" BorderColor="black"
BorderWidth="1" OnItemCreated="ItemCreated" OnEditCommand="grid_edit"
OnUpdateCommand="grid_update"
OnDeleteCommand="grid_delete" OnCancelCommand="grid_cancel"
OnItemCommand="grid_DelAdd" font-size="x-small"
font-names="verdana" ShowFooter="True">
<AlternatingItemStyle BackColor="palegoldenrod" />
<ItemStyle BackColor="beige" Font-Size="x-small" />
<HeaderStyle ForeColor="white" BackColor="brown" Font-Bold="true" />
<FooterStyle ForeColor="#330099" BackColor="#FFFFCC"></FooterStyle>
<Columns>
...
</asp:DataGrid>

--Cal

"JV" <jo**********@goisc.com> wrote in message
news:Ob**************@TK2MSFTNGP10.phx.gbl...
what style attrs do you have set on this datagrid?

"CalSun" <ca****@gmail.com> wrote
I have a datagrid with about 15 columns bound at run time. I create an
html table and have this datagrid inside.

<table align=center width="90%">
<tr>
<td>
<asp:datagrid ......
...
</asp:datagrid>
</td>
</tr>
</table>

Somehow the datagrid go beyond the screen width. I have to scroll
horizontally to view the last several columns.
I like to have this table 90% of the screen width (any screen, or
solution). Anyone has ideas how to archive this?
--Thanks


Nov 19 '05 #3
CalSun,

Instead of using the table width 90% and the datagrid width 100% as shown
in your first post, you may want to directly set the width of the DataGrid to
90% as below
<asp:DataGrid Width="90%" align="center" id="grid" runat="server"

Visual Studio may underline the align attribute with red to indicate it is
wrong , but this will be rendered to following HTML

<table align="center" id="grid" style="width:90%;"

If there are lot of table formattings to do , it is a good idea to consider
asp:repeater instead of DataGrid.

"CalSun" wrote:
thanks JV for replying. Here is the definition part of the datagrid:

<asp:DataGrid Width="100%" id="grid" runat="server"
AutoGenerateColumns="false" CssClass="Shadow"
BackColor="white" CellPadding="2" CellSpacing="2" GridLines="none"
BorderStyle="solid" BorderColor="black"
BorderWidth="1" OnItemCreated="ItemCreated" OnEditCommand="grid_edit"
OnUpdateCommand="grid_update"
OnDeleteCommand="grid_delete" OnCancelCommand="grid_cancel"
OnItemCommand="grid_DelAdd" font-size="x-small"
font-names="verdana" ShowFooter="True">
<AlternatingItemStyle BackColor="palegoldenrod" />
<ItemStyle BackColor="beige" Font-Size="x-small" />
<HeaderStyle ForeColor="white" BackColor="brown" Font-Bold="true" />
<FooterStyle ForeColor="#330099" BackColor="#FFFFCC"></FooterStyle>
<Columns>
...
</asp:DataGrid>

--Cal

"JV" <jo**********@goisc.com> wrote in message
news:Ob**************@TK2MSFTNGP10.phx.gbl...
what style attrs do you have set on this datagrid?

"CalSun" <ca****@gmail.com> wrote
I have a datagrid with about 15 columns bound at run time. I create an
html table and have this datagrid inside.

<table align=center width="90%">
<tr>
<td>
<asp:datagrid ......
...
</asp:datagrid>
</td>
</tr>
</table>

Somehow the datagrid go beyond the screen width. I have to scroll
horizontally to view the last several columns.
I like to have this table 90% of the screen width (any screen, or
solution). Anyone has ideas how to archive this?
--Thanks



Nov 19 '05 #4

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

Similar topics

0
by: SteveJ | last post by:
All, Can someone help me solve the next step. First of all let me say I'm new to php. I pieced the following code together from samples I found on the net and a book I bought called PHP...
10
by: john T | last post by:
Is there anyway to vertically center a html table using css in such a way it does not alter the html table. When I tryied it just screws up.
10
by: Peter Kirk | last post by:
Hi there can someone please help me with creating dynamic content in a table? For example, see the below javascript and html - why is a new row not created in the table when I click the button?...
20
by: Guadala Harry | last post by:
In an ASCX, I have a Literal control into which I inject a at runtime. litInjectedContent.Text = dataClass.GetHTMLSnippetFromDB(someID); This works great as long as the contains just...
5
by: Andrew | last post by:
Hi, friends, In ASP, we use obj = CreateObject("com.dll") obj.GetHTMLText(inVal, outHTMLTxt1, outHTMLTxt2) to get different HTML strings based on input values. Then, we insert them into...
1
by: since | last post by:
I figured I would post my solution to the following. Resizable column tables. Search and replace values in a table. (IE only) Scrollable tables. Sortable tables. It is based on a lot...
2
by: lynx129 | last post by:
Hi there , I have php script that works fine under my server but I dont know how to put the html code inside my site. feedback.html <html dir="rtl"> <head> <title> ????? ??? </title>...
7
by: imtmub | last post by:
I have a page, Head tag Contains many Scripts and style sheet for Menu and Page. This code working fine and displaying menus and page as i wanted. Check this page for reference....
2
by: sateeshchandrasanga | last post by:
Hi All, My HTML code is working fine in Firefox.But its not displaying any thing in IE.Can you help me in this problem.And in Google crown its displaying but not properly. ...
10
by: happyse27 | last post by:
Hi All, I got this apache errors(see section A1 and A2 below) when I used a html(see section b below) to activate acctman.pl(see section c below). Section D below is part of the configuration...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.