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: 8/18/2007 5:21:55 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 2 Views: 793 Favorited: 0 Favorite
3 Items, 1 Pages 1 |< << Go >> >|
mchlSync
Asp.Net User
Setting CSS class for tbody of GridView8/18/2007 5:21:55 AM

0

Hello All,

How to set CSS class to tbody of GridView? When I set the css class in Row-Style property, all rows have been set with this style which is I don't want. I found the way to set CSS class in thead and tfooter of GridView. but not for tbody. Is it possible to do with CSS adapter or normal way?


Thanks in advance. 

 

 


Best Regards,
Michael Sync

The more you share, the more you get..
http://michaelsync.net
raj07
Asp.Net User
Re: Setting CSS class for tbody of GridView8/18/2007 7:07:50 AM

-1

have u tried to give "class" attribute to tbody?

like this:

<tbody class="cssclassname">

 

mchlSync
Asp.Net User
Re: Setting CSS class for tbody of GridView8/18/2007 5:38:25 PM

1

Sorry if I couldn't explain my problem very clearly. Let me try one more time.  

If we wrote the code like that,  

HTML View 

        <asp:GridView ID="GridView1" runat="server" >           
        </asp:GridView>

Code-behinded File 

protected void Page_Load(object sender, EventArgs e)
    {
        List<string> list = new List<string>();
        list.Add("Alien");

        GridView1.DataSource = list;
        GridView1.DataBind();  

    }
    

the HTML tag will be generated as fellows by default ~

 <table cellspacing="0" rules="all" border="1" id="GridView1" style="border-collapse:collapse;">
            <tr>
                <td>Alien</td>
            </tr><tr>             
 </table>

I noticed that there is no thead or tbody or tfoot in the generated HTML table. I want GridView to generate the HTML table with those tags. So, I tried with the follwing code.

        //This replaces <td> with <th> and adds the scope attribute
         grid.UseAccessibleHeader = true;

        //This will add the <thead> and <tbody> elements
        grid.HeaderRow.TableSection = TableRowSection.TableHeader;
        grid.HeaderRow.CssClass = "fixedHeader";
           
        //This adds the <tfoot> element. Remove if you don't have a footer row
        grid.FooterRow.TableSection = TableRowSection.TableFooter;

 then, I can add thead, tbody and tfoot to generated HTML successfully.  It allows me to set the custom CSS class by using HeaderRow.CssClass and FooterRow.CssClass properties. But I found no way to specify the custom CSS class for tbody. So, it would be great if anyone tell me to achieve this goal.

Thanks in advance. 

 


Best Regards,
Michael Sync

The more you share, the more you get..
http://michaelsync.net
3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages Authors: Jacob J. Sanford, Pages: 474, Published: 2007
PROFESSIONAL SHAREPOINT 2007 DESIGN Authors: Jacob J. Sanford, Randy Drisgill, David Drinkwine, Coskun Cavusoglu, Heather Solomon, Pages: 648, Published: -1

Web:
Setting CSS class for tbody of GridView - ASP.NET Forums How to set CSS class to tbody of GridView? When I set the css class in Row-Style property, all rows have been set with this style which is I ...
ASP.NET & CSS: Styling sortable columns in the GridView using CSS ... Now that we have our CSS classes set we can attach some CSS rules that provide some visual ... AspNet-GridView table tbody tr.AspNet-GridView-Alternate td { ...
Matt Berseth: Freezing GridView Column Headers using Only CSS Apply a css class to the wrapper that sets the overflow to scroll and the TH position to relative. ... I set the height of the wrapper in the local style so I can reuse the css class. ... I think you can overflow just the tbody for FF. ...
Make the GridView control accessible When setting the property UseAccessibleHeader = true, it replaces the
elements of .... How to assign CSS class to tbody? If I use RowStyle property, ...
Visual Studio .NET Gridview Header Oct 10, 2008 ... Set the column number that is to be sorted; default to ascending. lvColSort. SortColumn = e. .... CSS class to be applied to the GridView's wrapper div element. ... //Find DOM TBODY element and remove first TR tag from ...

Setting CSS class for tbody of GridView - ng.asp-net-forum ... How to set CSS class to tbody of GridView? When I set the css class in Row-Style property, all rows have been set with this style which is I ...
css toolkit adapters- apply css style to gridview row in code (c# ... AspNet- GridView table ... Setting CSS class for tbody of GridView - ng.asp-net- forum ... css toolkit adapters- apply css style to gridview ...
samples of skin gridview - ng.asp-net-forum.visual_studio_2005 Setting CSS class for tbody of GridView - ng.asp-net-forum ... I want GridView to generate the HTML table with those tags. So, I tried with the follwing ...
Different output of MenuAdapter- and SharePoint:AspMenu-control ... MenuAdapter, setting EnableAdapter in the CSSFriendly:MenuAdapter control has ... But I don't get a different CSS class for my selected page. ... the normal ...






css adapted treeview control displaying all nodes on page load

programmatically populating the treeview

createuserwizard and e-mail validation

css friendly adapters + createuserwizard + custom membership provider = trouble?

aspnet-menu-leaf a:hover problem

staticselectedstyle in menu

how to add a stylesheettheme in a master page

show path back to root node

radiobuttonlist adapter (for yuval)

menu works great in ie7, not in ie6

hover causes list item to expand when not a leaf node

problem with css adapters and iis

menu dissapearing in ie 6

<tr> mouseover in gridview

help cssadapters v2.0 and gridview and panel...

documentation for adding to existing website.

alternate rendering for login control

menu control does not collapse

reagrding using filter in (menuexample.css) css adapter classes for menu control

experimental datalistadapter w/ repeatcolumns fix

skip navigation links and access keys

disable adapters specifically without commenting .browser file

style sheets

several subcategories in a treeview with a depth of 6

onclick not working.

radiobuttonlist and css friendly control adapters newbie

is there a way to identify the command row in the detailsview adapter?

problem with aspnet-menu-selected friendly css menu

web.config - adding css friendly adapters to existing website

onsendingmail

   
  Privacy | Contact Us
All Times Are GMT