change Width Gridview While containing 100 words;
change Width Gridview While containing 100 words;
gridInbox.Rows[i].Cells[4].Wrap = false;
gridInb开发者_如何学运维ox.Rows[i].Cells[4].Width = 10;
does not work;
Can you add more details as to exactly what you are doing and what the desired outcome is?
Assuming you are trying to make the cells not get any bigger regardless of the amount of text? If so you can enforce a style of the produced tables by setting the css:
gridviewStyle
{
table-layout:fixed;
}
gridviewColumnStyle
{
text-overflow:ellipsis;
overflow:hidden;
white-space:nowrap;
width: 10;
}
Set your GridView
and the columns you want to enforce to use the above css.
精彩评论