Problem with getting onclick event from nested datagrid

Discussion in 'ASP .Net' started by Vili, Apr 2, 2006.

  1. Vili

    Vili Guest

    Hi all

    I have a datagrid with nested datagrid. How do I get event from dgNested
    button?

    I used example from
    http://www.dotnet247.com/247reference/a.aspx?u=http://www.standardio.org/article.aspx?id=155

    <asp:datagrid id="dgMaster" runat="server" AutoGenerateColumns="False">
    <columns>
    ....
    <asp:datagrid id="dgNested" runat="server"
    AutoGenerateColumns="False" OnItemDataBound="itemEvent"
    OnItemCommand="itemCommandEvent" EnableViewState="False">
    <columns>
    ....
    <asp:templateColumn><FooterTemplate><Asp:Button text="update"
    Runat="Server" ID="updateAll"
    CommandName="ud"</asp:button></asp:FooterTemplate></asp:templateColumn>
    </columns>
    ....
    </asp:datagrid>
    ....
    </asp:datagrid>

    Codebehind:

    Public Sub itemEvent(byVal Source As Object, ByVal e as DataGridItemEvent)

    'This works

    End Sub

    Public Sub itemCommandEvent(byVal Source As Object, ByVal e as
    DataGridCommandEvent)

    'This does not work

    End Sub
     
    Vili, Apr 2, 2006
    #1
    1. Advertising

  2. Vili

    Guest

    hey guys

    has any one found solution this problem
    let me know plzzz i am kind stuck on the same problem.

    thanks




    Vili wrote:
    > Hi all
    >
    > I have a datagrid with nested datagrid. How do I get event from dgNested
    > button?
    >
    > I used example from
    > http://www.dotnet247.com/247reference/a.aspx?u=http://www.standardio.org/article.aspx?id=155
    >
    > <asp:datagrid id="dgMaster" runat="server" AutoGenerateColumns="False">
    > <columns>
    > ...
    > <asp:datagrid id="dgNested" runat="server"
    > AutoGenerateColumns="False" OnItemDataBound="itemEvent"
    > OnItemCommand="itemCommandEvent" EnableViewState="False">
    > <columns>
    > ...
    > <asp:templateColumn><FooterTemplate><Asp:Button text="update"
    > Runat="Server" ID="updateAll"
    > CommandName="ud"</asp:button></asp:FooterTemplate></asp:templateColumn>
    > </columns>
    > ...
    > </asp:datagrid>
    > ...
    > </asp:datagrid>
    >
    > Codebehind:
    >
    > Public Sub itemEvent(byVal Source As Object, ByVal e as DataGridItemEvent)
    >
    > 'This works
    >
    > End Sub
    >
    > Public Sub itemCommandEvent(byVal Source As Object, ByVal e as
    > DataGridCommandEvent)
    >
    > 'This does not work
    >
    > End Sub
     
    , Apr 17, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mick
    Replies:
    0
    Views:
    409
  2. JerryG
    Replies:
    0
    Views:
    445
    JerryG
    Dec 20, 2005
  3. Andreas Klemt
    Replies:
    0
    Views:
    334
    Andreas Klemt
    Oct 8, 2003
  4. bob
    Replies:
    3
    Views:
    237
  5. André Hänsel

    Onclick event in nested list

    André Hänsel, Jun 4, 2009, in forum: Javascript
    Replies:
    30
    Views:
    450
    Thomas 'PointedEars' Lahn
    Jun 9, 2009
Loading...

Share This Page