473,398 Members | 2,404 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,398 software developers and data experts.

Resize whole datagrid, not only columns!

I need to know how i can resize datagrid on a page when user will
resize web browser window or maximize this window. Resizeing normal DIV
is simple - expression but i dont know how to resize more complicated
control like datagrid.

Aug 23 '06 #1
4 4179
The datagrid, from a browser's standpoint is just an html TABLE
you can always just set its width to be some persentage (e.g. 100%) and let
the browser take care of it, or you can set its height and height style
attributes via javascript

"ta*****@tlen.pl" wrote:
I need to know how i can resize datagrid on a page when user will
resize web browser window or maximize this window. Resizeing normal DIV
is simple - expression but i dont know how to resize more complicated
control like datagrid.

Aug 23 '06 #2

David Jessee napisal(a):
The datagrid, from a browser's standpoint is just an html TABLE
you can always just set its width to be some persentage (e.g. 100%) and let
the browser take care of it, or you can set its height and height style
attributes via javascript
I made grid layout panel width
expression(parseInt(body.clientWidth)*0.98)
and a datagrid width i set up for 98%. Both controls start in same
place but their width are not same! ... they end in diffrent places :(
When i set up datagrid width for 100% datagrid width isnt a whole web
browser width, its still even shorter than panel. What i do wrong ??

Aug 24 '06 #3
When you say 100% the browser interprets that as being 100% (or 98%) of the
container that holds the object (what the datagrid is inside of).

Are you using absolute positioning?

"ta*****@tlen.pl" wrote:
>
David Jessee napisal(a):
The datagrid, from a browser's standpoint is just an html TABLE
you can always just set its width to be some persentage (e.g. 100%) and let
the browser take care of it, or you can set its height and height style
attributes via javascript

I made grid layout panel width
expression(parseInt(body.clientWidth)*0.98)
and a datagrid width i set up for 98%. Both controls start in same
place but their width are not same! ... they end in diffrent places :(
When i set up datagrid width for 100% datagrid width isnt a whole web
browser width, its still even shorter than panel. What i do wrong ??

Aug 24 '06 #4
Just re-read your post....if you can, stay away from the Grid Layout
(absolute positioning). It creates all sorts of problems like this.

"ta*****@tlen.pl" wrote:
>
David Jessee napisal(a):
The datagrid, from a browser's standpoint is just an html TABLE
you can always just set its width to be some persentage (e.g. 100%) and let
the browser take care of it, or you can set its height and height style
attributes via javascript

I made grid layout panel width
expression(parseInt(body.clientWidth)*0.98)
and a datagrid width i set up for 98%. Both controls start in same
place but their width are not same! ... they end in diffrent places :(
When i set up datagrid width for 100% datagrid width isnt a whole web
browser width, its still even shorter than panel. What i do wrong ??

Aug 24 '06 #5

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

Similar topics

1
by: Tom Rahav | last post by:
Hi! My question is if it's possible to adjust DataGrid control's columns' width by code (runtime). I have a DataGrid control that displays table from dataset that contains two fields. The first...
0
by: Stuart Ferguson | last post by:
I am currently writing a windows application which uses DataGrid components to display some data. I am wanting to allow the user to resize the columns to display data that is longer than the...
3
by: VB Programmer | last post by:
I cannot get my first 2 columns to adhear to my width settings. Any ideas? The datagrid is defined as: <asp:DataGrid id="dgLog" runat="server" Width="990px" Height="96px"...
2
by: Yama | last post by:
Hi, How can I make it resizable? For example: <pre> <!-- datagrid Header --> <table class="TableHeader" id="tblHeader" border="1" runat="server">
2
by: DraguVaso | last post by:
Hi, I have to DataGrid's on a form, one on the top of my form, the other at the bottom, but they though each other somewhere in the middle. What I want now is that, when I resize the form, they...
1
by: garyusenet | last post by:
I'm following a sql/vb tutorial which contains the following code which is meant to resize the datagrid view so that the columns take the correct width for the content within them. It doesn't...
4
by: Tamichan | last post by:
If anyone can point me in the right direction it would be most appreciated. I find that if I change the page size, either maximize or restore down, my web app freezes. I've put breakpoints in...
0
by: Dragon | last post by:
Hi, I am creating a simple web application that displays records from an Access table. I am using DataGrid to display the records. I have been able to resize column size to match with what I...
4
by: vbDavidC | last post by:
I have an unbound grid that is on my form (not created programmatically). I stretched the size to what I think is wide enough to accomodate the 6 columns I will be creating. I plan on making the...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
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.