Again Winform Datagrid: Individual row height and Vertical Scrollbar

  • Thread starter Mahesh Devjibhai Dhola [MVP]
  • Start date
M

Mahesh Devjibhai Dhola [MVP]

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 private and public
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
 
J

Jeffrey Tan[MSFT]

Hi Mahesh,

Thanks for your post!!

For this issue, I think your scenario is a little complex, and there are
still some point not very clear to me:
Based on my understanding, you have 2 columns, the first is
DataGridIconColumnStyle, which display a column of icon, and the second
column, which display combobox at edit mode, and display a big panel with
information when user clicked the first DataGridIconColumnStyle in the same
row.
1. Can you show us some detailed information of how you implement your
second column? Especially how you displayed the big panel with the user
clicked the first column?
2. How do you change the row height in your code?
3. How the "vertical scroll bar" appears? Does it belong to the DataGrid
control, or certain child control in your column?

Currently, because your issue is specific to your project, and it is hard
for us to reproduce it on my side. I suggest you provide a simple sample
project for this issue to help us reproduce it. Once we can reproduce out
this issue, we can understand this problem better, and help you much
better. Thanks for your understanding.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top