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

Resizing a DataGrid to a DIV

I am using a DIV to simulate a scrolling DataGrid, however when I try to get
the width (Div1.Styles.Items("Width")) I get nothing.

Now I realise at the point the code is run, the DIV is not even in existence
other than just a variable name, but is there a way to get the width so I
can size the DG to just inside the horizontal boundary of the DIV?
Nov 17 '05 #1
3 1015
Assuming you're creating the Div, you should know what size you made it. Or
am I missing something here?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.

"Wayne J" <no**@anyisp.com> wrote in message
news:ux*************@TK2MSFTNGP09.phx.gbl...
I am using a DIV to simulate a scrolling DataGrid, however when I try to get the width (Div1.Styles.Items("Width")) I get nothing.

Now I realise at the point the code is run, the DIV is not even in existence other than just a variable name, but is there a way to get the width so I
can size the DG to just inside the horizontal boundary of the DIV?

Nov 17 '05 #2
Wayne,

This should really be done on the client side. It can be trivial or rather
tricky depending on which browsers you need to support, so which one(s)...?

Nicole

"Wayne J" <no**@anyisp.com> wrote in message
news:ux*************@TK2MSFTNGP09.phx.gbl...
I am using a DIV to simulate a scrolling DataGrid, however when I try to get the width (Div1.Styles.Items("Width")) I get nothing.

Now I realise at the point the code is run, the DIV is not even in existence other than just a variable name, but is there a way to get the width so I
can size the DG to just inside the horizontal boundary of the DIV?


Nov 17 '05 #3
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:OU**************@tk2msftngp13.phx.gbl...
Assuming you're creating the Div, you should know what size you made it. Or am I missing something here?


The DIV is set to a width of 100%, mainly because we will not have any way
of knowing whether the viewer's browser will be set at 800x600 or higher.

I can force the assumption that the browser will be set to a min of 800x600
and leave it at that, as this seems to be the most common course of action.
Nov 17 '05 #4

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

Similar topics

3
by: bismarkjoe | last post by:
Hello, I am trying to set the widths on the columns of a DataGrid component, and I'm not sure if I'm doing it correctly. My code is below: //load some inital data table = db.GetDataTable(...
0
by: Paul | last post by:
Hi I have a datagrid with two different hyperlink columns. The columns open up a new window as the target is set to _blank for both. The windows are different sizes (one large, one small) and I...
4
by: skOOb33 | last post by:
I successfully autosized the columns and rows on my Datagrid, and am now facing another issue. Having the sorting ability by clicking the column headers is key, but when I do that, it resizes all...
2
by: Nina | last post by:
Hi there, I've tried everything that I know to prevent usre resizing datagrid columns, but nothing works. Following are the code that I used. Please tell me what's wrong with them. Thank you....
0
by: sherifffruitfly | last post by:
I've tried googling, but couldn't find anything. Basically, I want to see the cell's data more-exposed and less-exposed *while* I'm resizing the column. Is this even possible? Would I have to...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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...
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...

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.