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

datagird width = 100%

i've added a data grid to an aspx form, & i've noticed that the width of the
grid is fixed.
I want to be able to set the width to fit the entire width of the browser.

Such as done in classic HTML with the table width = 100%

Can this be achieved for a data grid? if so how?
Nov 19 '05 #1
2 1159
A technique I often use is to put a HTML table with on row and cell on the
form, position it where you want, and assign a width of 100%. Then you put
the grid inside that table. Then you set the width of the datagrid to 100%.
It will take up the entire width of the page.

hope this helps,
John

"Logan" wrote:
i've added a data grid to an aspx form, & i've noticed that the width of the
grid is fixed.
I want to be able to set the width to fit the entire width of the browser.

Such as done in classic HTML with the table width = 100%

Can this be achieved for a data grid? if so how?

Nov 19 '05 #2
Or you can put <TABLE width='100%'> tag in the datagrid HeaderTemplate, and
</TABLE> in the datagrid FooterTemplate.
Then you can put <TR> and <TD>s in ItemTemplate.

Hope it helps, Neven
"John Sivilla" <Jo*********@discussions.microsoft.com> wrote in message
news:FA**********************************@microsof t.com...
A technique I often use is to put a HTML table with on row and cell on the
form, position it where you want, and assign a width of 100%. Then you put
the grid inside that table. Then you set the width of the datagrid to 100%. It will take up the entire width of the page.

hope this helps,
John

"Logan" wrote:
i've added a data grid to an aspx form, & i've noticed that the width of the grid is fixed.
I want to be able to set the width to fit the entire width of the browser.
Such as done in classic HTML with the table width = 100%

Can this be achieved for a data grid? if so how?

Nov 19 '05 #3

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

Similar topics

2
by: Alex Shi | last post by:
In php, is there a way obtain the width of a charactor of a certain font? Alex -- ================================================== Cell Phone Batteries at 30-50%+ off retail prices!...
7
by: Graham J | last post by:
Apologies for the partial post that mysteriously escaped as I was composing. I shall try again. For many years I have been happily and successfully coding tables such that the WIDTH specified...
0
by: timon | last post by:
I have create a Datagird in the window form. How can I set the column name in the datagird?
3
by: alex | last post by:
Hi, can anyone point me to a link whith a sample on how to auto fit the datagrid? i need to 1: each row should occupy as much space as needed, the last row should fill the remaining space (or...
50
by: Shadow Lynx | last post by:
Consider this simple HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 STRICT//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head>...
6
by: Hacking Bear | last post by:
Hi, I still don't quite fully understand how to handle mixing border/margin pixel width with percentage width. In the example below, I want to place side-by-side two DIV boxes inside a box....
3
by: McKirahan | last post by:
I have a Web page that uses some JavaScript and CSS. I have specified a three column table with a fixed-width left and right side; the center colum expands to fill the page. Within this...
11
by: yawnmoth | last post by:
How do you get both of these div's to have a 100% width? (1): <div style="float: left; background: black; color: white">Hello, world! </div> <div style="clear: both; background: blue; color:...
1
by: psion | last post by:
Hi, We have a gridview on a webpage, which we would like to be 100% of the table cell in which it is placed. When we specify the width to be 100%, this has no effect, but only if we specify a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
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,...
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...

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.