[CLOSED] Coolite Button inside GridView TemplateField

  1. #1

    [CLOSED] Coolite Button inside GridView TemplateField

    Hi there !

    Is it possible to use Coolite Buttons inside a TemplateField of an asp-GridView ?

    I'm doing somehting like this:

    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
    AllowSorting="True" AutoGenerateColumns="False" BackColor="White" 
    BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
    DataKeyNames="Pais" DataSourceID="SqlDataSource1" GridLines="Vertical">
      <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
      <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
        <Columns>
            <asp:BoundField DataField="Pais" HeaderText="Pais" ReadOnly="True" 
                                  SortExpression="Pais" />
            <asp:BoundField DataField="Descripcion" HeaderText="Descripcion" 
                                  SortExpression="Descripcion" />
            <asp:BoundField DataField="ValidaFase1" HeaderText="ValidaFase1" 
                                  SortExpression="ValidaFase1" />
            <asp:TemplateField>
                <ItemTemplate>
                    <ext:Button ID="Button3" runat="server" onclick="Button3_Click" Text="Button" AutoPostBack="true" />
                </ItemTemplate>
            </asp:TemplateField>
          </Columns>
      <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
      <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
      <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
      <AlternatingRowStyle BackColor="#DCDCDC" />
    </asp:GridView>
    But the server-side code for the click event of the button is never executed
    protected void Button3_Click(object sender, EventArgs e)
    {
    string a = "Hi There";
    }
    Cheers !

    Alfonso Penunuri.
  2. #2

    RE: [CLOSED] Coolite Button inside GridView TemplateField

    Hi*Alfonso,

    This should work, although I can't say I've ever tested that exact scenario. I'll add this to our list and fix before the v0.7 release.*


    Geoffrey McGill
    Founder
  3. #3

    RE: [CLOSED] Coolite Button inside GridView TemplateField

    Hi Geoffrey !

    That sounds great !

    In the meanwhile, I use the PageMethods that came with the Ajax toolkit.

    Thanks a lot !

    Regards.

    Alfonso Penunuri.
  4. #4

    RE: [CLOSED] Coolite Button inside GridView TemplateField

    Hi Alfonso,

    I checked your example and it works fine with latest code (server-side handler for click executed always).

    Please test it again when 0.7 release will be public available.


  5. #5

    RE: [CLOSED] Coolite Button inside GridView TemplateField

    Hi guys !

    Thanks for the update ...

    I really appreciate all your efforts ...

    Best regards !

    Alfonso Penunuri.

Similar Threads

  1. Replies: 8
    Last Post: Sep 28, 2012, 2:42 PM
  2. Replies: 2
    Last Post: Nov 04, 2011, 6:06 PM
  3. [CLOSED] XScript - GridView inside a Panet-Content in a ListView
    By SouthDeveloper in forum 1.x Legacy Premium Help
    Replies: 12
    Last Post: Apr 14, 2011, 9:06 PM
  4. [CLOSED] Button positions in gridview
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 04, 2010, 12:23 PM
  5. Replies: 8
    Last Post: Nov 17, 2009, 10:16 AM

Posting Permissions