Click here to Skip to main content
15,909,939 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
could any one please tell me how to make my grid of same width when there are no records in it........ itried by making footer width but still grid is shrinking when there are no records....alos i tried by making header column width but not working...

i have a grid it should display the headers as it is when no records are there without getting the grid shrinking....currently when my grid has no records the grid is shrinking reducing its width....
Posted
Updated 18-Nov-13 18:11pm
v4

 
Share this answer
 
v2
Comments
spanner21 18-Nov-13 23:50pm    
googled but not found the exact solution.......

sorry to say even in the above link provided i havent got any solution....still facing the samee problem.....

i have a grid it should display the headers as it is when no records are there without getting the grid shrinking....currently when my grid has no records the grid is shrinking....
Tom Marvolo Riddle 19-Nov-13 0:13am    
I updated my answer.Please see it and let me know if it helps
spanner21 19-Nov-13 0:26am    
thanks jas...i will try the first one as second one they are creating a table and adding columns to it statically which means when a new column aded to my grid need to add in that table also....so it will be not be complete fixture...anyway i will try with first solutiona nad will let u know...
spanner21 19-Nov-13 0:31am    
trie the second one also but my grid is still shrinking not as the same size when records are there
Tom Marvolo Riddle 19-Nov-13 0:41am    
as far as i know,the gridview height will change if the records does not equal to gridview page size.But you can fix the width of gridview
put the grid inside a div tag, make the div width as ur custom width and grid width as 100%
 
Share this answer
 
Comments
spanner21 18-Nov-13 23:44pm    
i tried this but its not working....

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