473,749 Members | 2,597 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

sizeable grid

I was wondering if anyone knows how to get a datagrid to size as the browser
is resized such that the datagrid's borders would appear anchored to the
browser edges. The datagrid should have a white-space border around it and
scrollbars should automatically appear on the datagrid should the contents
of the grid spill outside of the viewable area.

I have gotten this to work for the IE browser by placing a DIV tag around
the datatable (shown below). And to maintain a margin of white space around
each edge of the grid as the browser is resized, I placed the DIV section
inside of a table, with rows and columns that maintain the white-space
margin around the grid, and whose center cell is set to a height and width
of 100%.

a snippet...

<TD align="right" width="100%" height="100%">

<DIV style="OVERFLOW : auto; WIDTH: 100%; HEIGHT: 100%">

{Datatable}

</DIV>

</TD>

....but this code does not work in a Mozilla/Firefox browser. Instead, the
datagrid extends well beyond the browser's right and bottom edges, causing
unwanted browser scrollbars to appear.

I know there must be a way around this, perhaps by using style sheets. But
I'm not sure what next steps to take.
Nov 19 '05 #1
6 1728
Jesse,

Set the grids contents to allow wrapping and then set the grid's width to a
percentage.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Jesse Aufiero" <ja******@moabo il.com> wrote in message
news:ef******** ******@tk2msftn gp13.phx.gbl...
I was wondering if anyone knows how to get a datagrid to size as the
browser is resized such that the datagrid's borders would appear anchored
to the browser edges. The datagrid should have a white-space border around
it and scrollbars should automatically appear on the datagrid should the
contents of the grid spill outside of the viewable area.

I have gotten this to work for the IE browser by placing a DIV tag around
the datatable (shown below). And to maintain a margin of white space
around each edge of the grid as the browser is resized, I placed the DIV
section inside of a table, with rows and columns that maintain the
white-space margin around the grid, and whose center cell is set to a
height and width of 100%.

a snippet...

<TD align="right" width="100%" height="100%">

<DIV style="OVERFLOW : auto; WIDTH: 100%; HEIGHT: 100%">

{Datatable}

</DIV>

</TD>

...but this code does not work in a Mozilla/Firefox browser. Instead, the
datagrid extends well beyond the browser's right and bottom edges, causing
unwanted browser scrollbars to appear.

I know there must be a way around this, perhaps by using style sheets.
But I'm not sure what next steps to take.

Nov 19 '05 #2
Unfortunately one of my requirements, for reasons of legibility, is to leave
the grids contents unwrapped. Hence the need for scrollbars when the
contents of the grid inevitably extend beyond the viewable area.
"S. Justin Gengo" <justin@[no_spam_please]aboutfortunate. com> wrote in
message news:%2******** *******@TK2MSFT NGP10.phx.gbl.. .
Jesse,

Set the grids contents to allow wrapping and then set the grid's width to
a percentage.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Jesse Aufiero" <ja******@moabo il.com> wrote in message
news:ef******** ******@tk2msftn gp13.phx.gbl...
I was wondering if anyone knows how to get a datagrid to size as the
browser is resized such that the datagrid's borders would appear anchored
to the browser edges. The datagrid should have a white-space border
around it and scrollbars should automatically appear on the datagrid
should the contents of the grid spill outside of the viewable area.

I have gotten this to work for the IE browser by placing a DIV tag around
the datatable (shown below). And to maintain a margin of white space
around each edge of the grid as the browser is resized, I placed the DIV
section inside of a table, with rows and columns that maintain the
white-space margin around the grid, and whose center cell is set to a
height and width of 100%.

a snippet...

<TD align="right" width="100%" height="100%">

<DIV style="OVERFLOW : auto; WIDTH: 100%; HEIGHT: 100%">

{Datatable}

</DIV>

</TD>

...but this code does not work in a Mozilla/Firefox browser. Instead,
the datagrid extends well beyond the browser's right and bottom edges,
causing unwanted browser scrollbars to appear.

I know there must be a way around this, perhaps by using style sheets.
But I'm not sure what next steps to take.


Nov 19 '05 #3
this is a bug in IE, might be fixed in the next release.

while the browser tries to make the body width equal the frame width, it
makes no attempt on the height. thus on the <div style="height=1 00%;">, it
is setting the div's height to the parents height. in this case the parent
is the body, whose height is auto (size of content), this make the div's
height auto also, so no scrollbars are needed. you to need to set the height
of the div parents, so that it can calc a size smaller than the frame.

add this line:

<style type="text/css">html, body{height:100 %}</style>
-- bruce (sqlwork.com)

"Jesse Aufiero" <ja******@moabo il.com> wrote in message
news:ef******** ******@tk2msftn gp13.phx.gbl...
I was wondering if anyone knows how to get a datagrid to size as the
browser is resized such that the datagrid's borders would appear anchored
to the browser edges. The datagrid should have a white-space border around
it and scrollbars should automatically appear on the datagrid should the
contents of the grid spill outside of the viewable area.

I have gotten this to work for the IE browser by placing a DIV tag around
the datatable (shown below). And to maintain a margin of white space
around each edge of the grid as the browser is resized, I placed the DIV
section inside of a table, with rows and columns that maintain the
white-space margin around the grid, and whose center cell is set to a
height and width of 100%.

a snippet...

<TD align="right" width="100%" height="100%">

<DIV style="OVERFLOW : auto; WIDTH: 100%; HEIGHT: 100%">

{Datatable}

</DIV>

</TD>

...but this code does not work in a Mozilla/Firefox browser. Instead, the
datagrid extends well beyond the browser's right and bottom edges, causing
unwanted browser scrollbars to appear.

I know there must be a way around this, perhaps by using style sheets.
But I'm not sure what next steps to take.

Nov 19 '05 #4
IE renders it fine... it's Mozilla/Firefox that I'm having trouble with.
"Bruce Barker" <br************ ******@safeco.c om> wrote in message
news:OK******** *****@tk2msftng p13.phx.gbl...
this is a bug in IE, might be fixed in the next release.

while the browser tries to make the body width equal the frame width, it
makes no attempt on the height. thus on the <div style="height=1 00%;">, it
is setting the div's height to the parents height. in this case the parent
is the body, whose height is auto (size of content), this make the div's
height auto also, so no scrollbars are needed. you to need to set the
height of the div parents, so that it can calc a size smaller than the
frame.

add this line:

<style type="text/css">html, body{height:100 %}</style>
-- bruce (sqlwork.com)

"Jesse Aufiero" <ja******@moabo il.com> wrote in message
news:ef******** ******@tk2msftn gp13.phx.gbl...
I was wondering if anyone knows how to get a datagrid to size as the
browser is resized such that the datagrid's borders would appear anchored
to the browser edges. The datagrid should have a white-space border
around it and scrollbars should automatically appear on the datagrid
should the contents of the grid spill outside of the viewable area.

I have gotten this to work for the IE browser by placing a DIV tag around
the datatable (shown below). And to maintain a margin of white space
around each edge of the grid as the browser is resized, I placed the DIV
section inside of a table, with rows and columns that maintain the
white-space margin around the grid, and whose center cell is set to a
height and width of 100%.

a snippet...

<TD align="right" width="100%" height="100%">

<DIV style="OVERFLOW : auto; WIDTH: 100%; HEIGHT: 100%">

{Datatable}

</DIV>

</TD>

...but this code does not work in a Mozilla/Firefox browser. Instead,
the datagrid extends well beyond the browser's right and bottom edges,
causing unwanted browser scrollbars to appear.

I know there must be a way around this, perhaps by using style sheets.
But I'm not sure what next steps to take.


Nov 19 '05 #5
You might want to take a look at this free article
"Rendering to Firefox from ASP.NET" :
http://asptoday.com/Content.aspx?id=2339

Also, make sre your web.config has the updated Mozilla/Firefox entries :
http://slingfive.com/pages/code/browserCaps/

the actual text which needs to be included in web.config is at :
http://slingfive.com/pages/code/brow...aps_spaces.txt

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
=============== =============== ========
"Jesse Aufiero" <ja******@moabo il.com> wrote in message
news:eA******** *****@TK2MSFTNG P12.phx.gbl...
IE renders it fine... it's Mozilla/Firefox that I'm having trouble with.
"Bruce Barker" <br************ ******@safeco.c om> wrote in message
news:OK******** *****@tk2msftng p13.phx.gbl...
this is a bug in IE, might be fixed in the next release.

while the browser tries to make the body width equal the frame width, it makes no
attempt on the height. thus on the <div style="height=1 00%;">, it is setting the div's
height to the parents height. in this case the parent is the body, whose height is auto
(size of content), this make the div's height auto also, so no scrollbars are needed.
you to need to set the height of the div parents, so that it can calc a size smaller
than the frame.

add this line:

<style type="text/css">html, body{height:100 %}</style>
-- bruce (sqlwork.com)

"Jesse Aufiero" <ja******@moabo il.com> wrote in message
news:ef******** ******@tk2msftn gp13.phx.gbl...
I was wondering if anyone knows how to get a datagrid to size as the browser is resized
such that the datagrid's borders would appear anchored to the browser edges. The
datagrid should have a white-space border around it and scrollbars should automatically
appear on the datagrid should the contents of the grid spill outside of the viewable
area.

I have gotten this to work for the IE browser by placing a DIV tag around the
datatable (shown below). And to maintain a margin of white space around each edge of
the grid as the browser is resized, I placed the DIV section inside of a table, with
rows and columns that maintain the white-space margin around the grid, and whose
center cell is set to a height and width of 100%.

a snippet...

<TD align="right" width="100%" height="100%">

<DIV style="OVERFLOW : auto; WIDTH: 100%; HEIGHT: 100%">

{Datatable}

</DIV>

</TD>

...but this code does not work in a Mozilla/Firefox browser. Instead, the datagrid
extends well beyond the browser's right and bottom edges, causing unwanted browser
scrollbars to appear.

I know there must be a way around this, perhaps by using style sheets. But I'm not
sure what next steps to take.



Nov 19 '05 #6
Thanks for the comprehensive answer. Had I asked you a few days ago I could
have saved myself hours of google searches. But actually, I have already
seen all three of these pages and, after applying what I learned from them,
I'm still having issues. I'm not quite sure what to do next here. But
thank you for the info.

Probably what I need is someone who has gone through this exact problem
before, but finding that person will be hard.
"Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:uB******** ******@TK2MSFTN GP09.phx.gbl...
You might want to take a look at this free article
"Rendering to Firefox from ASP.NET" :
http://asptoday.com/Content.aspx?id=2339

Also, make sre your web.config has the updated Mozilla/Firefox entries :
http://slingfive.com/pages/code/browserCaps/

the actual text which needs to be included in web.config is at :
http://slingfive.com/pages/code/brow...aps_spaces.txt

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
=============== =============== ========
"Jesse Aufiero" <ja******@moabo il.com> wrote in message
news:eA******** *****@TK2MSFTNG P12.phx.gbl...
IE renders it fine... it's Mozilla/Firefox that I'm having trouble with.


"Bruce Barker" <br************ ******@safeco.c om> wrote in message
news:OK******** *****@tk2msftng p13.phx.gbl...
this is a bug in IE, might be fixed in the next release.

while the browser tries to make the body width equal the frame width, it
makes no attempt on the height. thus on the <div style="height=1 00%;">,
it is setting the div's height to the parents height. in this case the
parent is the body, whose height is auto (size of content), this make
the div's height auto also, so no scrollbars are needed. you to need to
set the height of the div parents, so that it can calc a size smaller
than the frame.

add this line:

<style type="text/css">html, body{height:100 %}</style>
-- bruce (sqlwork.com)

"Jesse Aufiero" <ja******@moabo il.com> wrote in message
news:ef******** ******@tk2msftn gp13.phx.gbl...
I was wondering if anyone knows how to get a datagrid to size as the
browser is resized such that the datagrid's borders would appear
anchored to the browser edges. The datagrid should have a white-space
border around it and scrollbars should automatically appear on the
datagrid should the contents of the grid spill outside of the viewable
area.

I have gotten this to work for the IE browser by placing a DIV tag
around the datatable (shown below). And to maintain a margin of white
space around each edge of the grid as the browser is resized, I placed
the DIV section inside of a table, with rows and columns that maintain
the white-space margin around the grid, and whose center cell is set to
a height and width of 100%.

a snippet...

<TD align="right" width="100%" height="100%">

<DIV style="OVERFLOW : auto; WIDTH: 100%; HEIGHT: 100%">

{Datatable}

</DIV>

</TD>

...but this code does not work in a Mozilla/Firefox browser. Instead,
the datagrid extends well beyond the browser's right and bottom edges,
causing unwanted browser scrollbars to appear.

I know there must be a way around this, perhaps by using style sheets.
But I'm not sure what next steps to take.



Nov 19 '05 #7

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

Similar topics

1
4615
by: Piet | last post by:
Hello, I have written a small program which dynamically displays data from a data structure in a wx.grid. The grid reacts as expected when the data structure is enlarged: a new row is added and filled with data. When data is removed, the data is deleted as expected, but instead of being removed, a row is being added to the grid. Can anyone explain why? Here is sample code to illustrate what I mean. Thanks in advance Piet import wx
1
1137
by: Art | last post by:
Hi, Is there some property (that I can't find) that will allow me to put a DataGrid in my form so that the user can size it -- you know, drag the corner or side? Thanks for any hints, advice or reference. Art
2
1514
by: Jason | last post by:
Does anyone know if you can create a panel or a table that a user can "resize" within the browser window just as they would a window? Thanks!
117
18556
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of elements in the HTML to get everything just right. When you consider the class attribute on the DIV elements, there's not much size savings anymore for using DIV. There are other disadvantages to not using TABLE/TR/TD, such as the lack of ability...
3
7633
by: kaczmar2 | last post by:
Hey there, I have a large image in a browser window, and I would like a way to overlay grid lines on top of the image, so a user can show the grid or hide the grid lines. The grid would cover 100% of the image, and all I would need is a set of horizontal and vertical lines over the image to create a grid overlay. Two requirements would be to:
0
2254
by: BH | last post by:
Hi, I am trying to build my own IHM with two treeCtrl and 1 grid, based on the wx.aui demos. My problem is with the Grid. It dosen't have scrollbars. I tried many methods (fit) but it always fail. Can somebody point me where is the mistake ? Thx
6
7997
by: Romulo NF | last post by:
Greetings again to everyone, Im back to show this grid componenet i´ve developed. With this grid you can show the data like a normal table, remove the rows that you need, add rows, import data, call determined functions, and edit the data already present What will you need to use the grid? A table with standard markup and an ID to call the script that will turn the table into a grid Parameters: tabelaID => id of the table that will...
5
9973
by: gaya3 | last post by:
Hi, can anyone find error in the following example <%@ include file="JspBean.jsp" %> <%@ page import="java.util.*"%> <html> <head> <%
1
1698
by: Francesco Bochicchio | last post by:
Il Mon, 18 Aug 2008 12:15:10 +0100, dudeja.rajat ha scritto: Uhm, I don't think you should use the grid manager to obtain a window like that. The grid manager is for equally distributing widgets both horizontally and vertically. And I'm not sure that you can realize that window look with Tkinter. You could get close by horizontally packing each widget row in a frame and then vertically packing the frames in the window. But the look...
0
8997
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8833
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
9389
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
9335
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,...
0
6079
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4881
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3320
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
2794
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2218
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.