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

datagrid size issue - any ideas ?

Hi there

I have a datagrid in my application that can vary in width dramtically, this
is due to the number of visible columns which is controlled programatically
and can vary from day to day.

For ease of use, there is an id (basically a name) column in position 1 of
the datagrid, I would like to know if I can add another column, with the same
value, to the end position if the datagrid is wider than the screen. I can of
course take a guess and say, if x number of columns are visible then add the
mirrored column on the end, but would like to be a little more scientific
about it if I can.

Any ideas would be much appreciated.

Thanks, Stuart
Nov 19 '05 #1
2 876
The question is whether or not this is a requirement or a "nice to have"
feature, as you can spend a lot of time to really do it right.

Questions to answer:

1. How wide is each column as shown on screen (varchar can be thin or wide
in your dataset)?
2. What is the user's resolution set to?
3. Does user have large fonts or other assessibility turned on?

This is what I can think of off hand.

The point: You are either going to have to wing it or figure out exactly.

NOTE: For #1, you may have to completely walk the data to determine the
longest (with varchars). For #2, you are best to use JavaScript and send back
to the server (combination client and server script). I am not certain of how
to best determine assessibility features, so you may forget this.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
"Stuart" wrote:
Hi there

I have a datagrid in my application that can vary in width dramtically, this
is due to the number of visible columns which is controlled programatically
and can vary from day to day.

For ease of use, there is an id (basically a name) column in position 1 of
the datagrid, I would like to know if I can add another column, with the same
value, to the end position if the datagrid is wider than the screen. I can of
course take a guess and say, if x number of columns are visible then add the
mirrored column on the end, but would like to be a little more scientific
about it if I can.

Any ideas would be much appreciated.

Thanks, Stuart

Nov 19 '05 #2
Thanks very much - under these circumstances.... "nice to have" - I think
I'll wing it !

"Cowboy (Gregory A. Beamer) - MVP" wrote:
The question is whether or not this is a requirement or a "nice to have"
feature, as you can spend a lot of time to really do it right.

Questions to answer:

1. How wide is each column as shown on screen (varchar can be thin or wide
in your dataset)?
2. What is the user's resolution set to?
3. Does user have large fonts or other assessibility turned on?

This is what I can think of off hand.

The point: You are either going to have to wing it or figure out exactly.

NOTE: For #1, you may have to completely walk the data to determine the
longest (with varchars). For #2, you are best to use JavaScript and send back
to the server (combination client and server script). I am not certain of how
to best determine assessibility features, so you may forget this.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
"Stuart" wrote:
Hi there

I have a datagrid in my application that can vary in width dramtically, this
is due to the number of visible columns which is controlled programatically
and can vary from day to day.

For ease of use, there is an id (basically a name) column in position 1 of
the datagrid, I would like to know if I can add another column, with the same
value, to the end position if the datagrid is wider than the screen. I can of
course take a guess and say, if x number of columns are visible then add the
mirrored column on the end, but would like to be a little more scientific
about it if I can.

Any ideas would be much appreciated.

Thanks, Stuart

Nov 19 '05 #3

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

Similar topics

5
by: Dave | last post by:
I tried posting this in the WinForm forum and got no hits so I am trying it here. After inserting a new data row to a DataTable that is bound to a datagrid, I am unable to change data in a row...
3
by: PeterZ | last post by:
G'day, After doing much searching and pinching bits of ideas from here there and everywhere I came up with a fairly 'clean' solution of including a comboBox into a dataGrid column. You can...
3
by: | last post by:
Hi, I have come across a situation which appears to be a BUG with the DataGrid control (asp:datagrid) Following the application of a fliter on a PostBack, it seems the total number of items...
5
by: John M | last post by:
Hello, In Visual Studio .NET 2003, How can I change the columns' width (at design or runtime) of datagrid ? Thanks :)
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: Flack | last post by:
Hey guys, I have a DataGrid and DataTable field in my class : private ImageDataGrid dataGrid1; //ImageDataGrid extends dataGrid and just overides OnMouseDown private DataTable dt = new...
5
by: rn5a | last post by:
In my application, I want to populate all the directories & files existing in a directory on the server in a DataGrid. To ensure that all the directories get listed first followed by all the files,...
0
by: cms3023 | last post by:
I have a DataGrid which displays data with the aid of a procedure. I have tested the procedure inside the database and it is working fine. The table inside the database has data that matches with...
5
by: Me LK | last post by:
I need to add a line to choose a size into a dropdown . Since I have the dropdown nested inside a datagrid this is not working.When a page displays there are several rows of dropdowns but only the...
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: 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...
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.