Click here to Skip to main content
15,913,927 members
Please Sign up or sign in to vote.
2.50/5 (4 votes)
I am so tired. I just want to rope my 16 comboboxes to my 16 datagridview columns when its scrolled left changes boxes location.

I only need that every boxes be on head of grid columns. I tried lots of things TableLayoutPanel, popups. I will try again to explain it because my English sucks.

Example: combobox name is comboboxBuyerName and dgv column name is cBuyerName which is last column in grid and doesn't fit on form so there is a scroll bar on grid. when user scrolls it comboboxBuyerName shows automaticly.

Please help me. I need this boxes for filter bindingsource. I use C# 3.5 WinForms.
Posted
Updated 29-Nov-10 22:53pm
v2
Comments
johannesnestler 30-Nov-10 5:36am    
1: Break you problem down to easy steps.
2: Explain this steps to yourself and to us.
3: Descripe whats your specific problem.
4: Show what you have tried.
5: -> Get help :)
Toli Cuturicu 30-Nov-10 6:18am    
Can you ask someone who knows better English to help you with the question?
Can you post a small screenshot? If you can't post it here, may I suggest imageshack?
lester555 30-Nov-10 7:31am    
On English: hello i have six per of datagirdeviews column. I'd like to put on a combbox on yeach of them. Datagrind in not in format, so each for load means pop up oof scroll bar. I'd like to do that after moving a scroll bar, i had a chanse to view all the vomb boxes that are invisible. It means that every comb box is fixed of it's own gread collum

1 solution

I suggest this simple solution
1. Increase the width of Datagridview so that all columns are visible. It'll be much wider than your form, but just drag it left and keep increasing the width.
2. Move your datagridview inside a panel. Keep the width of the panel to the size you wish to view
3. Set the 'AutoScroll' property of the panel to 'True'
& that's it. A scroll bar should appear.

Just lower the grid a little inside the panel to make room for your combos & place the combos above columns. The user scrolls the contents of the panel, which moves the grid & other contents together

Worked?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900