Welcome Guest Search | Active Topics | Sign In | Register

grid: staticcolumn wrap text, resize, select row from code Options
Guest
Posted: Saturday, May 21, 2011 9:50:31 AM
Rank: Guest
Groups: Guest

Joined: 5/27/2007
Posts: -34
Hello,

1. I need the lines of the grid to adjust to the amount of text, just like a normal HTML table. If the text is only one word, I want one line. If the text is long, I want the text to wrap and the grid.ItemHeight to incease automatically.
If I increase the grid.ItemHeight manually, lines with just one word look 'stupid'.

Can this be done? Pobably not, it was asked before and then, ItemHeight is a grid property...

2. What must I do so that the grid resizes if I resize the browser window?
Setting Width to "100%"

<eo:Grid id="grid" runat="server" ... Width="100%" Height="300px" >

works for Width but not for Height.

3. How can I pre-select the first (or any other) line in a grid from code when it has full row select?

Thank you!
eo_support
Posted: Sunday, May 22, 2011 9:03:58 AM
Rank: Administration
Groups: Administration

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

As to your question:

1. No. You can not do that.

2. There is no 100% height on the page level for any Web pages. A browser window is designed to have a fixed width and then grow vertically dynamically based on the contents. So a browser's height is not known before it know its content's height, this means page height depends on content height. When you set content height to be 100%, you are expecting content height to depend on page height. This does not work.

What you can do is to dynamically detect your window height (note window height is not the same as page height) and resize your content based on that window height. Once you know the window height, you can call our Grid's resize method to resize it to the desired size:

http://doc.essentialobjects.com/library/1/jsdoc.public.control.setsize.aspx

3. You would set the Grid's SelectedItemIndex:

http://doc.essentialobjects.com/library/1/eo.web.grid.selecteditemindex.aspx

Hope this helps.

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.