Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Sep 19, 2006 03:46 PM by Russ Helfand
Sep 19, 2006 01:37 PM|LINK
We have several web parts that use gridview controls. Because the web parts can and do resize frequently, we often need to account for text that is longer than the grid column. We do this by setting the overflow properties to that the text is truncated and
ellipsis(...) are shown instead. I've found through trial and error that that Table-Layout style property of the table needs to be set to "fixed" for this to work properly.
Then on each Row_Created event, I can set the other properties:
e.Row.Cells.Wrap = false;
When I load the CSS adapters, even before I load any theme files, this stops working. I assume some sort of rerendering is going on. How can I fix this? Note that all of our controls are dynamically generated, as we are building server controls.
Sep 19, 2006 03:46 PM|LINK
When using the adapters you have to make these sorts of changes within your style sheets. The adapters assume that you'll have linked (either directly or automatically by using a theme) to a style sheet that sets up CSS rules for the HTML that the adapter
is know to spit out.
In other words, the adapters expect you to have a style sheet like this one,
Look at line 42. There's a rule that styles all the cells in the table's body. It looks like it would be the right place to add things like
However, I've not actually tried this so I'll be interested to hear if it works for you.
It also looks like you'll want to modify a rule for the whole table, like the rule on line 21. To it you might add
Hope this helps. Let me know if you find that all this is smoke&mirrors in which case I'll try to come up with a different strategy for you. :)