CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > microsoft_downloads.css_friendly_control_adapters Tags:
Item Type: NewsGroup Date Entered: 9/19/2006 1:37:06 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 1 Views: 95 Favorited: 0 Favorite
2 Items, 1 Pages 1 |< << Go >> >|
toddhd
Asp.Net User
Gridview, the adapters, and overflow options9/19/2006 1:37:06 PM

0

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.

gvLinks.Style["TABLE-LAYOUT"] = "fixed";

Then on each Row_Created event, I can set the other properties:

e.Row.Cells[1].Wrap = false;
e.Row.Cells[1].Style[
"overflow"] = "hidden";
e.Row.Cells[1].Style[
"text-overflow"] = "ellipsis";

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.


-Todd Davis
http://www.SeaburyDesign.com
Russ Helfand
Asp.Net User
Re: Gridview, the adapters, and overflow options9/19/2006 3:46:45 PM

0

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, http://www.asp.net/CSSAdapters/srcviewer.aspx?inspect=%2fCSSAdapters%2fApp_Themes%2fBasic%2fGridViewExample.css&notree=true.

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

wrap: false;
overflow: hidden;
text-overflow: ellipsis;

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

table-layout: fixed;

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. :)


Russ Helfand
Groovybits.com
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
Gridview, the adapters, and overflow options - ASP.NET Forums Gridview, the adapters, and overflow options. Last post 09-19-2006 11:46 AM by Russ Helfand. 1 replies. Sort Posts: ...
CSS Friendly Control Adapters - ASP.NET Forums Gridview, the adapters, and overflow options by toddhd. No Status ... CSS Friendly Control Adapters is not running with Update Panel of... by Sandeepmcm ...
Turning off ASP.NET CSS Friendly Adapters - Stack Overflow A big benefit of the GridView adapter is that it generates THEAD, TBODY, ... Stack Overflow is a collaboratively edited question and answer site for ...
Changing values inside my GridView on load with ASP.NET - Stack ... adapter = new SqlDataAdapter("Select TOP 40 c04_credno, c04_orderno, c04_orddate , ... But i went with another option above. – Etienne Apr 16 at 7:48 ... Stack Overflow is a collaboratively edited question and answer site for programmers ...
Dynamically Templated GridView with Edit, Delete and Insert ... Dynamically Templated GridView with Edit, Delete and Insert Options ...... SqlDataAdapter adapter = new SqlDataAdapter("Select * from " + TableName, Connection); ..... I'm getting Stack Overflow exception while updating records. ...

Setting CSS class for tbody of GridView - ng.asp-net-forum ... ... and tfooter of GridView. but not for tbody. Is it possible to do with CSS adapter or normal way? ... I want GridView to generate the HTML table with those tags. ... I think you can overflow just the tbody for FF. ...
Scrolling in Gridview - ng.asp-net-forum.visual_studio_2005 Scrolling in Gridview, > ROOT > NEWSGROUP > Asp.Net Forum ... css toolkit adapters- apply css style to gridview row in code (c# . ... Apply a css class to the wrapper that sets the overflow to scroll and the TH . ...
Support for EmptyDataTemplate - microsoft_downloads ... Find control in ListView EmptyDataTemplate - Stack Overflow ... css friendly gridview · css adapter for asp menu · menuadapter - menu items not visible if ...
TreeView Adapter Problem for TreeNodeCheckChanged ... how can i modify the html output from the gridview? gridview, the adapters, and overflow options · menu dissapearing in ie 6 ...
Variable width of horizontal top level menu elements ... overflow: hidden; position:absolute; left: 85px; top: 25px; padding: 10px; .... menu adapter with update panel and gridview · static display levels ...






css friendly menu control not working properly in ie6

adapters and clienttarget

.vsi broken?

how to override styles dynamically in treeview control

how to make microsoft filter effect work in mozilla

wizard control, navigation buttons at top and bottom

no results with vb code when using css-adapters

introducing beta 2.0

menuadapter beta 2

in ie6, menu has delayed display during hover over

adapter for single control - radiobutton

checkboxlist and create a new css control adapter

css adapters effecing other controls?

menu outputs span tags even when adapterenabled=false :-( please help!

avoid rendering "hard-coded" menu control css classes

create vertical space in menu control...

css friendly control adapters not support dynamically created rows in gridview?

rendering existing table design as css layout

announcement: beta 3 has been released

menu adapter problem with ie6 when re-sizing window

bug in asp.net 2.0 webcontroladapter

adding controls to existing site

detailsview adapter css to allow multiline name spans

selected | alternate row deon't work: fix

don't see css friendly control adapters templates after vsi install

css help on treeviewadapter <li> elements hover effect

bg images to menu

transparent menu items

detailsview rendered as overlaped name and value

getviewstate__aspnettreeview not defined

   
  Privacy | Contact Us
All Times Are GMT