473,406 Members | 2,220 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,406 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 2000
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.