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

Smooth scroll of a DataGridView cell with large amount of data

I have an unbound DataGridView control that has some cells that may contain
more multi-line text than can be completely displayed in the available
screen space. When the height of its row to exceeds the DataGridView's
height, it becomes impossible to view the out of sight portion of the row.
Down arrow of the text cursor simply moves the caret down out of sight.
Contrary to expectations, the DataGridView's scroll bar doesn't smoothly
scroll. It just jumps the next row into view and the problematic row is
scrolled out of view.

Is it possible to provide a scroll mechanism that will bring into view those
areas of a cell that are out of view and, if so, how?
--
Richard Lewis Haggard
www.Haggard-And-Associates.com
Mar 21 '07 #1
3 7399
Hello Richard,
>Is it possible to provide a scroll mechanism that will bring into view
those areas of a cell that are out of view and, if so, how?
Are you saying you have rows that are so high that they don't fit the
screen, i.e. they are higher than your complete grid control? Seems like a
really bad UI decision to me, if that's true.

Why don't you use a cell editor instead, which the user can pop up if
she's interested in the whole cell content? That popup window could of
course use scrollbars as needed... Not sure if any of the standard cell
editors would fit the bill. You could either use the ButtonColumn type and
pop up a window on a click on the button, or create your own cell editor
type.
Oliver Sturm
--
http://www.sturmnet.org/blog
Mar 22 '07 #2
Thank you for your insight into my client's feature list. This is not the
design that I favored but you know what they say, the customer is always
right.

What do you mean by 'cell editor'?

--
Richard Lewis Haggard
www.Haggard-And-Associates.com
"Oliver Sturm" <ol****@sturmnet.orgwrote in message
news:xn****************@msnews.microsoft.com...
Hello Richard,
>>Is it possible to provide a scroll mechanism that will bring into view
those areas of a cell that are out of view and, if so, how?

Are you saying you have rows that are so high that they don't fit the
screen, i.e. they are higher than your complete grid control? Seems like a
really bad UI decision to me, if that's true.

Why don't you use a cell editor instead, which the user can pop up if
she's interested in the whole cell content? That popup window could of
course use scrollbars as needed... Not sure if any of the standard cell
editors would fit the bill. You could either use the ButtonColumn type and
pop up a window on a click on the button, or create your own cell editor
type.
Oliver Sturm
--
http://www.sturmnet.org/blog

Mar 23 '07 #3
Hello Richard,
>Thank you for your insight into my client's feature list. This is not the
design that I favored but you know what they say, the customer is always
right.
I've heard people say that, but I don't agree and I've been known to refuse.
>What do you mean by 'cell editor'?
Hm? Well, a cell editor for the DataGridView. It has an extensible
architecture, you know - you've seen the column types and corresponding
cell editors they deliver out of the box: text box, check editor, combo
box, ... you can create your own, rather easily actually.

Try this Google search and follow some of the links - I wanted to post you
some good MSDN links, but MSDN seems to be dead at this precise moment. In
any case I know there are some pretty good introductory articles on their
site.

http://www.google.com/search?num=20&....microsoft.com
Oliver Sturm
--
http://www.sturmnet.org/blog
Mar 23 '07 #4

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

Similar topics

6
by: Satya | last post by:
Hi, I am using a DataGridView to display a large amount of data and so need to use filters for displaying certain data. For this I want to provide a textbox for each column of the DataGridView so...
1
by: Riley | last post by:
Need some help. I am using datagridview in 2005 with C#. I am calling a web service and filling the datagridview with the data returned. This all works fine. Next step is to take a value from one...
3
by: Henry Jones | last post by:
I am using VB.NET VS 2005 and I have a datagridview bound to a table. This table has rate information on bank loans. The fiels are ProductName, MinDeposit, Rate, and PreviousRate On the grid...
7
by: Ryan | last post by:
I have a DataGridView which displays numeric (Int32) data from an underlying database. I want the numbers to be displayed in numeric format "#,###" (with commas). I want to also limit the user so...
5
by: DanThMan | last post by:
The situation: * I have a ButtonColumn in a DataGridView. * When the user preses one of the buttons, a dialog appears. * Based on what the user selects in the dialog, data is entered...
3
by: Richard Lewis Haggard | last post by:
I have a DataGridView which has a cell that is going to contain what might be a large amount of text data. The UI designed has decreed that each row will have a button that toggles the row's...
2
by: Michael Meckelein | last post by:
I get "Value of '3720' is not valid for 'Value'. 'Value' should be between 'minimum' and 'maximum' exception if I remove rows in a dataGridView while scrolling from the top to the end of the grid...
1
by: TG | last post by:
Hi! I have an application in which I have some checkboxes and depending which ones are checked those columns will show in the datagridview from sql server or no. After that I have 2 buttons:...
0
by: priyamtheone | last post by:
I'm trying to make a datagridview column to act like a datetimepicker column (C#.Net 2005). These are the behaviours that the dgv should have: 1) Initially all the cells of the dtp column should be...
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?
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.