Click here to Skip to main content
15,884,237 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I will show the data that i have in a grid view each and every line of the data is of same size but while showing the size varies is there any option available to make each and every row of the grid view make the same

Here is my sample grid view

http://i.imgur.com/dAAVa.png[^]
Posted
Comments
Sandeep Mewara 23-Apr-11 9:33am    
Not clear on the issue.

Well, the easiest solution is to restrict the number of characters that are going to be displayed on each columns. So If the value that is going to be displayed greater that the fixed size say 50, then add additional control dynamically or make visible if exist and once you do that will show the whole content as tooltip in this control.

Look the link below
http://i.imgur.com/zXaAj.png[^]

Note: The more shows the whole content of the column value.
 
Share this answer
 
v2
Am I looking at the same picture?

That looks to me as if each and every row is the same size. Just to be sure, I pasted it into Paint Shop Pro, and checked: every row is the exact same height and width.

Does one of us need our eyes testing, or am I missing something?
 
Share this answer
 
Comments
Sandeep Mewara 23-Apr-11 9:33am    
Does one of us need our eyes testing, or am I missing something?
Do tell me what was it... as it looks like, I too am sailing in same boat you are! :)
demouser743 24-Apr-11 23:13pm    
Hi actually in winforms when we are using datagrdiview if we use proportional font the text in the datagridview will be of visible with out varying like that for gridview is there any font like that
Do you mean gridview text needs be to justified? If yes, try to use following CSS for gridview column:
.JustifyStyle{
    text-align: justify
}
 
Share this answer
 
v2

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