Windows Develop Bookmark and Share   
 index > Windows Forms General > Again Winform Datagrid: Individual row height and Vertical Scrollbar
 

Again Winform Datagrid: Individual row height and Vertical Scrollbar

Hi,
We are using Windows.Forms.DataGrid control in our application.
Let me explain what i have done so far so it will easy to understand the problem:
We have used DataGridIconColumnStyle for one icon column and second is DataGridTextBoxColumn for some other purpose
In second column i am showing Comboboxes when user clicks on it directly.
Now when user clicks on first column's icon, we are showing a big panel in second column in the same row where we had Combobox previously.
On click on first column's icon image, big panel with some info shows in second column's place. And at that time we are changing row height and it changes the row height for that perticular row.
Up to this, it works fine.
Now when second column shows panel in one cell with height changed, a vertical scroll bar appears.
But when i click on scrollbar to scroll downside, it scrolls whole first column which has double height than total height of all other rows with default height.
So problem is:
1. When i scroll down, it is not scrolling as per total height but it scrolls up the whole first row in one stroke wich has very big height.
2. When it scrolls up the first row with big height value, it is not scrolling up whole panel that i have put in the second column. It scrolls up by just default row size.

So, what i want to do is:
1. Smooth scrolling of the vertical scroll bar
2. And with scrolling of datagrid rows, the panel should scroll also.

Before you write any comment, please have a look at the following lines,
1. I have searched all the relavant messages in the public Microsoft newsgroups but could not find the solution.
2. In most of the posts they have individual row height change problem which we have done, so we have a problem of scrolling after changed height.
3. I have also searched many forums online and using google also. But i could not find any solution so please do not point me out that look at similar posts that has been posted previously.

I hope, i will get reasonable answer from you all experts as well as MSFT engineers.
I hope to see some good pointers, idea, or trick to solve my problems.
You are most welcome for further clarification if you feel so.

Thanks in Advance.

Regards,
Mahesh Devjibhai Dhola

Indian Ocean  Saturday, May 14, 2005 4:07 PM
The DataGrid and DataGridView do not support smooth vertical scrolling or what I would call pixel based scrolling. What this means is that the vertical scrolling is only supported on a per row basis, so if you have a row that is sized in height larger than the grid can show you won't be able to scroll to the bottom part of the row. The DataGrid and DataGridView controls are not built to enable customizing of this area either, so I don't know of any way you can get this to work.

thanks,
-mark
Program Manager
Microsoft
This post is provided "as-is"
Mark Rideout  Monday, May 16, 2005 7:23 PM
The DataGrid and DataGridView do not support smooth vertical scrolling or what I would call pixel based scrolling. What this means is that the vertical scrolling is only supported on a per row basis, so if you have a row that is sized in height larger than the grid can show you won't be able to scroll to the bottom part of the row. The DataGrid and DataGridView controls are not built to enable customizing of this area either, so I don't know of any way you can get this to work.

thanks,
-mark
Program Manager
Microsoft
This post is provided "as-is"
Mark Rideout  Monday, May 16, 2005 7:23 PM
Add testarea control and than fill that textareacontrol with the data in that cell. also set scroll bar to that textarea so that the textareacontrol scroll smoothly.
RajinderKularia  Tuesday, June 09, 2009 10:57 AM

You can use google to search for other answers

Custom Search

More Threads

• User Resize of TableLayoutPanel
• role-based authorization
• VS2003, How do you turn on XP Theme at design time?
• Wallpaper ?
• Web Browser control - local file URI ?
• Slow Display of labels.
• Winform cold startup time in .Net 2
• Releasing Memory disposing of controls
• Combo Box - Please help
• Title bar and Scroll bar