Welcome Guest Search | Active Topics | Sign In | Register

Grid - itemheight flexible size for large text? Options
tb
Posted: Tuesday, April 15, 2008 3:32:26 PM
Rank: Newbie
Groups: Member

Joined: 3/13/2008
Posts: 6
Is there a way to make the itemheight of a grid to be flexible to the data displayed? I am displaying knowledgebase topics and answers and the answers can be many paragraphs long. Or is there a way to put a scrollbar on the cells of a specific column? What control do you use to display the results in a search on the forums? I notice they are flexible to the content.
eo_support
Posted: Tuesday, April 15, 2008 3:43:54 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
Hi,

Unfortunately you can not. Our Grid is a fix item height Grid and that's what enables it to be scrolled smoothly. On the contrary, standard ASP.NET Grid/GridView can have variable height because they do not care about scrolling.

You can put a scroll bar on pretty much anything by setting an HTML element's overflow property. For example:

Code: HTML/ASPX
<div style="width:100px;height:20px;overflow-Y:auto">
some long long long content
</div>


So you can do the same with our Grid by setting the cell text as some HTML similar to those shown above, instead of plain text. This can be easily done by setting the columns' DataFormat property to something like:

<div style="height:20px;overflow-Y:auto">{0}</div>

Where {0} will be replaced with the actual data.

Our forum is standard TABLE rendered through Repeater.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.