Click here to Skip to main content
15,886,019 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
A form has a gridview on it .

A second gridview is put on the first which is not visible, which will be made visible for results from a query,however I am not able to get the second gridview to sit perfectly on the first gridview at design time.


When I paste the second gridview the first gridview moves down.

Pls assist

Thanks
Posted
Updated 15-Jun-14 18:56pm
v3
Comments
Debabrata_Das 16-Jun-14 0:48am    
Hello friend, can you please update your question with the aspx changes?
lukeer 16-Jun-14 4:34am    
Forget Design Time. Put the grid there, handle exact positions in code. That way, you can do it exactly to the pixel.

1 solution

When I paste the second gridview the first gridview moves down.

This can happens if you had some docking logic, please check Dock property of both grids.
If it's doesn't matter for you how it's looks in design time, you can place control at any form part, and even made it invisible by default. Then before form show, for example at load form event, just copy location and width, even parent (in case it's some child panel control) and any other properties from first to second grid and set first grid visible false and second true, or just bring to front second grid if it's visible. Actually as lukeer wrote.
 
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