Results 1 to 3 of 3

Thread: ItemCommand in Nested Control ?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2004
    Location
    india
    Posts
    95

    ItemCommand in Nested Control ?

    hi,

    in my project ive nested databaound control as
    <asp:repeater...>
    ...
    <asp:datagrid...>
    <itemtemplate>
    <asp:button id="btn"...>
    </itemtemplate>
    </asp:datagrid>
    </asp:repeater>



    if click the button btn it doesnt fires btn_itemcommand.

    how to handle the itemcommand 4 innermost (datagrid) control?

    pls give me idea ?
    v.r.mahedran

  2. #2
    Member
    Join Date
    Oct 2004
    Location
    Hyderabad
    Posts
    32

    Re: ItemCommand in Nested Control ?

    Hi,
    In case of Nested controls you need to make use of the unique client id created during the runtime...I had a similar senario but different controls..may be this is of a bit help for you...

    In my Case i used nested datagrids.. a parent datagrid and a child datagrid.

    i noticed that the controls inside the child datagrid raised the post back but how to catch the events ?? thats where unique client ids came into existence... I created a temporary datagrid and assiged its client id to the the datagrid that raised the event...to get the client id of the child you need to manipulate the ids in the parents' item created event..


    after this the task is simple with programming the temp datagrids' itemcommand ...

    if you need i can send the code for the same...

    regards,
    ssmantha.

  3. #3
    Member
    Join Date
    Oct 2004
    Location
    Hyderabad
    Posts
    32

    Re: ItemCommand in Nested Control ?

    One more important thing I added an item command handler at the parents item created event for the child datatgrids..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width