CodeVerge.Net Beta


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

ASP.NET Web Hosting – 3 Months Free!
Free 3 Months



Zone: > NEWSGROUP > Asp.Net Forum > microsoft_downloads.css_friendly_control_adapters Tags:
Item Type: NewsGroup Date Entered: 8/7/2007 7:35:59 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 28 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
Perthshan
Asp.Net User
CSS Friendly Control Adapters not support dynamically created rows in GridView?8/7/2007 7:35:59 AM

0/0

I have a dynamically created row in GridView control. But it will not appear when I use CSS Friendly Control Adapter. I have to set

adapterenabled=false to make it work. But I will loss all the table style in this way. Any better ideas to solve this problem?

This is the code behind to add a new row.

protected void GridView3_RowDataBound(object sender, GridViewRowEventArgs e)

{

GridViewRow insertedRow = new GridViewRow(GridView3.Rows.Count, GridView3.Rows.Count, DataControlRowType.DataRow, DataControlRowState.Normal);

TableCell cell = new TableCell();

cell.Text = " hello";

cell.ColumnSpan = GridView3.Columns.Count;

insertedRow.Cells.Add(cell);

GridView3.Controls[0].Controls.AddAt(GridView3.Controls[0].Controls.Count - 1, insertedRow);

}

Perthshan
Asp.Net User
Re: CSS Friendly Control Adapters not support dynamically created rows in GridView?8/23/2007 3:42:46 AM

0/0

 I added   ShowFooter="True"  for my gridview and added a blank template for footer

 <asp:GridView ID="GridView3" runat="server"
                        DataKeyNames="photo_ID"
                        DataSourceID="ObjectDataSource3" Style="position: static"
                        CssSelectorClass="PrettyGridView" 
                        ShowFooter="True" OnRowCommand="GridView3_RowCommand"
                         >
                          <Columns>
                        ........

                         ...
                         <asp:TemplateField HeaderText="% Return" >
                             <FooterTemplate>
                               
                             </FooterTemplate>
                         </asp:TemplateField>

                      </Columns>  
                       <FooterStyle CssClass="CELL_footer" />     
                    </asp:GridView>  

 

And in the RowDataBound Event, I can dynamically generate the content of the footer: 

 protected void GridView3_RowDataBound(object sender, GridViewRowEventArgs e)
    {

        if (e.Row.RowType == DataControlRowType.Footer)  //draw table footer
        {
           
            double _total_return = Convert.ToDouble(Total_label.Text);
            String formated_total = string.Format("{0:P2}", _total_return);
           
                e.Row.Cells[7].Text = formated_total ;
           }

 

This method only for add a new row at the bottom of Gridview.

Anthoer trickey method required If you want to add subheaders in the  Gridview with CSS friendly adpater. Basically you need reformat the content of the first Cell text in the row.  But I am not sure it is a good solution.

2 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
CSS Friendly Control Adapters not support dynamically created rows ... CSS Friendly Control Adapters not support dynamically created rows in GridView? Last post 08-22-2007 11:42 PM by Perthshan. 1 replies. Sort Posts: ...
CSS Friendly Control Adapters not support dynamically created rows ... I have a dynamically created row in GridView control. But it will not appear when I use CSS Friendly Control Adapter. I have to set ...
CSS Friendly Control Adapters on Forums - ASP.NET Forums | BoardReader Forum overview for "CSS Friendly Control Adapters" forum on ... For example, I like to create my GridViews so that a Gridview row can be ...
Dr. Dobb's | Using CSSCAT to Build CSS-Friendly Web Apps | August ... Aug 13, 2007 ... The CSS Control Adapter Toolkit (CSSCAT) helps you break free of ... of a grid where the number of rows and columns may vary dynamically. ...
CodeProject: NewRow GridView. Free source code and programming help Oct 24, 2006 ... In any case, I did not need a CSS-friendly GridView, so I disabled the GridView support and this control for my project and it now works has ...
CSS Control Adapter Toolkit Update - ScottGu's Blog When you create a new web site project using the "CSS Friendly Web Site" ... NET GridView Control and ASP.NET CSS Control Adapter GridView Control on the ...
p2p.wrox.com Forums - Customize column in CSS friendly GridView NET 2.0 CSS Friendly Control Adapters"). I'm experimenting with a very simple CSS friendly GridView control. Overall it's going well, ...
Table Class (System.Web.UI.WebControls) How to: Add Rows and Cells Dynamically to a Table Web Server Control, Building ASP . .... There is a workaround provided by CSS Friendly Control Adapters ...
Custom Paging in GridView Control at Me.Thoughts.ToString() Not using CSS Friendly, just copying in the adapters. .... Podcast Mania · Dynamically number rows in a SELECT T-SQL statement (SQL Server 2000) ...
Custom Paging in GridView Control « Me.Thoughts.ToString() Not using CSS Friendly, just copying in the adapters. .... ‘ Get the controls from the gridview for the botton pager row ddl = GridView1.BottomPagerRow. ...




Search This Site:










passing an image memorystream to byte

how to instantiate fields in a method

change the cursor used by the ondrag event.

how much memory does a dataset take up?

where can i find oop concepts in details?

writing reusable code blocks

basics: page class member gets reset to zero

web.config

getting source code back from deployment server

how can i cycle thru a list of images

inheritence issue with code

accessing querystring within c#, within xslt

can someone please help me

store file in sql server 2000

beginning asp.net(beta 2)

how to read and access data from text file

create table dynamically

can the asp.net session cookie name be changed?

downloading files from another website

how to choose the right string encoding scheme with web content?

downloading file from a second website

connecting asp.net to ms sql server

what in the world does this compile-time err msg mean, and how can i show it the door?

include my own object for the page

go to reference or definition between projects

web.config error

css style rules

question about asp vs asp.net

how do i find out which checkboxlist item has been clicked?

dynamically adding a connectionstring in 2.0

  Privacy | Contact Us
All Times Are GMT