473,769 Members | 6,799 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2027
JV
what style attrs do you have set on this datagrid?

"CalSun" <ca****@gmail.c om> 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"
AutoGenerateCol umns="false" CssClass="Shado w"
BackColor="whit e" CellPadding="2" CellSpacing="2" GridLines="none "
BorderStyle="so lid" BorderColor="bl ack"
BorderWidth="1" OnItemCreated=" ItemCreated" OnEditCommand=" grid_edit"
OnUpdateCommand ="grid_updat e"
OnDeleteCommand ="grid_delet e" OnCancelCommand ="grid_cance l"
OnItemCommand=" grid_DelAdd" font-size="x-small"
font-names="verdana" ShowFooter="Tru e">
<AlternatingIte mStyle BackColor="pale goldenrod" />
<ItemStyle BackColor="beig e" Font-Size="x-small" />
<HeaderStyle ForeColor="whit e" BackColor="brow n" Font-Bold="true" />
<FooterStyle ForeColor="#330 099" BackColor="#FFF FCC"></FooterStyle>
<Columns>
...
</asp:DataGrid>

--Cal

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

"CalSun" <ca****@gmail.c om> 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"
AutoGenerateCol umns="false" CssClass="Shado w"
BackColor="whit e" CellPadding="2" CellSpacing="2" GridLines="none "
BorderStyle="so lid" BorderColor="bl ack"
BorderWidth="1" OnItemCreated=" ItemCreated" OnEditCommand=" grid_edit"
OnUpdateCommand ="grid_updat e"
OnDeleteCommand ="grid_delet e" OnCancelCommand ="grid_cance l"
OnItemCommand=" grid_DelAdd" font-size="x-small"
font-names="verdana" ShowFooter="Tru e">
<AlternatingIte mStyle BackColor="pale goldenrod" />
<ItemStyle BackColor="beig e" Font-Size="x-small" />
<HeaderStyle ForeColor="whit e" BackColor="brow n" Font-Bold="true" />
<FooterStyle ForeColor="#330 099" BackColor="#FFF FCC"></FooterStyle>
<Columns>
...
</asp:DataGrid>

--Cal

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

"CalSun" <ca****@gmail.c om> 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
2233
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 Cookbook. So please forgive me if this isn't the best approach - I'm open to suggestions I finally got my code to work that logs into another site and pulls the orderstatus page to my server.
10
26875
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
2295
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? (I am using Internet Explorer 6). <html> <head> <title>TEST</title> <script language="javascript">
20
5650
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 client-side HTML, CSS, etc. What I want to do is somehow insert a *server control* into the , then set the server control's properties at runtime.
5
4081
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 proper location of HTML something like the following: <table>
1
16974
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 examples I found on the web. Works in IE and mozilla. http://www.imaputz.com/cssStuff/bigFourVersion.html
2
2149
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> </head> <body>
7
3615
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. http://www.marco.com.cn/web-content/marco_re10.html -------------------------------------------------------------- <head> <!-- InstanceBeginEditable name="doctitle" --> <title>Marco</title> <!-- InstanceEndEditable -->
2
3059
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. contactus.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>
10
6976
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 of section c. Not sure where went wrong as the web page displayed internal server error. Also, what is the error 543? and error 2114. Where to find the list of errors in websites as it is not the standard apache error. I could not find...
0
9424
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,...
0
10223
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10051
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10000
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,...
1
7413
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3968
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
3571
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
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.