CodeVerge.Net Beta


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



Zone: > Asp.Net Forum > asp.net_ajax.asp.net_ajax_ui Tags:
Item Type: Date Entered: 1/7/2008 2:34:58 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
9.00
XPoints: N/A Replies: 2 Views: 2748 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages |< << Go >> >|
"photonicman" <
NewsGroup User
How Can i add a Gridview Inside An Accordion Control?11/19/2006 12:58:45 AM

1

 hi everyone,

How Can i add a Gridview Inside An Accordion Control?

My Gridview includes Template Fields and so it's quiete hard to do it by code.

so I want each row in the gridview to be a Pane less or more

 i'll be thankful if you help me

Eric

"faraujo" <>
NewsGroup User
Re: How Can i add a Gridview Inside An Accordion Control?11/22/2006 5:05:43 AM

0

Try  this. 

<atlasToolkit:AccordionPane ID="AccordionPane1" runat="server" >

<Header><a href="" onclick="return false;" class="accordionLink">Servicios</a></Header>

<Content>

<asp:GridView ID="gServicio" runat="server" CellPadding="4" Font-Names="Tahoma" Font-Size="Small" PageIndex="0" DataKeyNames="Clave" AllowPaging="True" Width="700"

OnRowEditing="EditaServicio"

OnRowCancelingEdit="CancelaServicio"

OnRowUpdating="ValidaServicio"

OnRowUpdated="GrabaServicio"

OnRowDeleted="EliminaServicio"

AutoGenerateColumns="False" BackColor="White" BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" OnPageIndexChanging="gServicio_PageIndexChanging" >

<FooterStyle BackColor="#99CCCC" ForeColor="#003399" />

<RowStyle BackColor="White" ForeColor="#003399" />

<SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />

<PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />

<HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />

 

<Columns>

<asp:TemplateField >

<ItemTemplate>

<asp:Button ID="btnEdit" CommandName="Edit" Text="Editar" Font-Size="8pt" Width="50px" Runat="Server"/>

</ItemTemplate>

<EditItemTemplate>

<asp:Button ID="btnUp" CommandName="Update" Text="Actualizar" Font-Size="8pt" Width="50px" Runat="Server"/>

<asp:Button ID="btnCan" CommandName="Cancel" Text="Deshacer" Font-Size="8pt" Width="50px" Runat="Server"/>

</EditItemTemplate>

<ItemStyle VerticalAlign="Top" />

</asp:TemplateField>

<asp:TemplateField >

<ItemTemplate>

<asp:Button ID="btnDel" CommandName="Delete" Text="Eliminar" Font-Size="8pt" Width="50px" Runat="Server"/>

</ItemTemplate>

<ItemStyle VerticalAlign="Top" />

</asp:TemplateField>

 

<asp:BoundField DataField="Clave" HeaderText="Clave" ReadOnly="True" SortExpression="Clave" />

<asp:BoundField DataField="Descripcion" HeaderText="Descripcion" ReadOnly="True" SortExpression="Descripcion" />

<asp:BoundField DataField="ServicioExterno" HeaderText="Servicio Externo" SortExpression="ServicioExterno" />

 

</Columns>

</asp:GridView>

<asp:Label ID="lblDisplayingServicio" runat="server" Text="Label" Width="400px" Font-Bold="True" Font-Names="Tahoma" Font-Size="Small" ForeColor="Black"></asp:Label>

</Content>

</atlasToolkit:AccordionPane>
"photonicman" <
NewsGroup User
Re: How Can i add a Gridview Inside An Accordion Control?11/22/2006 1:20:38 PM

2

Yes that will work , but since i want not known numbers of Panes and each pane has a gridview as a content so i made up this:

DataTable DT = Class1.Generate_datatable("*", "....", "...", "....");

 

for (int i = 0; i < DT.Rows.Count; i++)

{

GridView GV = GetEmailsTable(1);

DataTable DT1 = Class1.Generate_datatable("...", "....", ".........=" + int.Parse(DT.Rows[i][0].ToString()) + "", ".....");

GV.DataSource = DT1;

GV.DataBind();

GV.HeaderRow.Visible =

false;

GV.BorderWidth = 0;

GV.Width = 500;

 

AccordionPane Pane = new AccordionPane();

GV.BackColor =

Color.White;

Pane.HeaderContainer.Controls.Add(

new LiteralControl(DT.Rows[i]["...."].ToString()));

Pane.ContentContainer.Controls.Add(GV);

MyAccordion.Panes.Add(Pane);

}

protected GridView GetEmailsTable(int ID)

{

GridView GV = new GridView();

......

return GV;

}

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



Free Download:






   
  Privacy | Contact Us
All Times Are GMT