How to get data from parent datagrid item from child datagrid dataitem

Discussion in 'ASP .Net' started by Skowronek, Aug 31, 2005.

  1. Skowronek

    Skowronek Guest

    What is the best method to obtain a data value from a parent datagriditem
    from a child datagrid - datagrid footer item command event handler?

    Here is the layout of my asp.net controls

    <datagrid1>
    <datagriditem1>
    <datagrid2>
    <datagridfooter>
    <listbox><commandbutton>
    </datagridfooter>
    </datagrid2>
    </datagriditem1>
    <datagrid1>

    So, the listbox has the child data value ID and the commanditem calls the
    insert command. I need to be able to get the parentID from the datagriditem1
    in order to associate the child ID with the parentID. I've looked at event
    bubbling, but that requires a custom control. How else can I pull the
    parentID out of the datagriditem1.

    Please email xilord at yahoo dot com if you have a splendid solution.
    TIA
    Skowronek, Aug 31, 2005
    #1
    1. Advertising

  2. Skowronek

    Skowronek Guest

    I'm wondering if there is a better group to post this question???

    "Skowronek" <xilord at yahoo dot com> wrote in message
    news:...
    > What is the best method to obtain a data value from a parent datagriditem
    > from a child datagrid - datagrid footer item command event handler?
    >
    > Here is the layout of my asp.net controls
    >
    > <datagrid1>
    > <datagriditem1>
    > <datagrid2>
    > <datagridfooter>
    > <listbox><commandbutton>
    > </datagridfooter>
    > </datagrid2>
    > </datagriditem1>
    > <datagrid1>
    >
    > So, the listbox has the child data value ID and the commanditem calls the
    > insert command. I need to be able to get the parentID from the
    > datagriditem1 in order to associate the child ID with the parentID. I've
    > looked at event bubbling, but that requires a custom control. How else can
    > I pull the parentID out of the datagriditem1.
    >
    > Please email xilord at yahoo dot com if you have a splendid solution.
    > TIA
    >
    Skowronek, Sep 1, 2005
    #2
    1. Advertising

  3. re:
    > I'm wondering if there is a better group to post this question?


    Although there's good datagrid experts here,
    maybe posting your question for the datagrid control at :
    microsoft.public.dotnet.framework.aspnet.datagridcontrol
    would get you more help.

    I haven't checked whether your answer is in Scott Mitchell's
    marathonic ( 18 parts, so far ) Datagrid Control articles :
    http://aspnet.4guysfromrolla.com/articles/040502-1.aspx
    but you should probably read and bookmark that, too.




    Juan T. Llibre
    ASP.NET MVP
    ASP.NET FAQ : http://asp.net.do/faq/
    ===========================

    "Skowronek" <xilord at yahoo dot com> wrote in message
    news:...
    > I'm wondering if there is a better group to post this question???


    > "Skowronek" <xilord at yahoo dot com> wrote in message
    > news:...
    >> What is the best method to obtain a data value from a parent datagriditem from a child
    >> datagrid - datagrid footer item command event handler?
    >>
    >> Here is the layout of my asp.net controls
    >>
    >> <datagrid1>
    >> <datagriditem1>
    >> <datagrid2>
    >> <datagridfooter>
    >> <listbox><commandbutton>
    >> </datagridfooter>
    >> </datagrid2>
    >> </datagriditem1>
    >> <datagrid1>
    >>
    >> So, the listbox has the child data value ID and the commanditem calls the insert
    >> command. I need to be able to get the parentID from the datagriditem1 in order to
    >> associate the child ID with the parentID. I've looked at event bubbling, but that
    >> requires a custom control. How else can I pull the parentID out of the datagriditem1.
    >>
    >> Please email xilord at yahoo dot com if you have a splendid solution.
    >> TIA
    >>

    >
    >
    Juan T. Llibre, Sep 1, 2005
    #3
  4. Skowronek

    Skowronek Guest

    I ended up just setting a string value ondatabind for each parent item. This
    appeared to work well.

    Thanks for the reply.

    "Juan T. Llibre" <> wrote in message
    news:...
    > re:
    >> I'm wondering if there is a better group to post this question?

    >
    > Although there's good datagrid experts here,
    > maybe posting your question for the datagrid control at :
    > microsoft.public.dotnet.framework.aspnet.datagridcontrol
    > would get you more help.
    >
    > I haven't checked whether your answer is in Scott Mitchell's
    > marathonic ( 18 parts, so far ) Datagrid Control articles :
    > http://aspnet.4guysfromrolla.com/articles/040502-1.aspx
    > but you should probably read and bookmark that, too.
    >
    >
    >
    >
    > Juan T. Llibre
    > ASP.NET MVP
    > ASP.NET FAQ : http://asp.net.do/faq/
    > ===========================
    >
    > "Skowronek" <xilord at yahoo dot com> wrote in message
    > news:...
    >> I'm wondering if there is a better group to post this question???

    >
    >> "Skowronek" <xilord at yahoo dot com> wrote in message
    >> news:...
    >>> What is the best method to obtain a data value from a parent
    >>> datagriditem from a child datagrid - datagrid footer item command event
    >>> handler?
    >>>
    >>> Here is the layout of my asp.net controls
    >>>
    >>> <datagrid1>
    >>> <datagriditem1>
    >>> <datagrid2>
    >>> <datagridfooter>
    >>> <listbox><commandbutton>
    >>> </datagridfooter>
    >>> </datagrid2>
    >>> </datagriditem1>
    >>> <datagrid1>
    >>>
    >>> So, the listbox has the child data value ID and the commanditem calls
    >>> the insert command. I need to be able to get the parentID from the
    >>> datagriditem1 in order to associate the child ID with the parentID. I've
    >>> looked at event bubbling, but that requires a custom control. How else
    >>> can I pull the parentID out of the datagriditem1.
    >>>
    >>> Please email xilord at yahoo dot com if you have a splendid solution.
    >>> TIA
    >>>

    >>
    >>

    >
    >
    Skowronek, Sep 16, 2005
    #4
  5. Skowronek

    ProgTalk

    Joined:
    Dec 4, 2007
    Messages:
    16
    ProgTalk, Dec 4, 2007
    #5
    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. MattB
    Replies:
    4
    Views:
    21,222
  2. Peter Rilling
    Replies:
    1
    Views:
    1,005
    =?Utf-8?B?RWx0b24gVw==?=
    May 19, 2005
  3. Dave
    Replies:
    0
    Views:
    440
  4. Noel Dolan
    Replies:
    0
    Views:
    217
    Noel Dolan
    Jul 18, 2004
  5. Bitswapper
    Replies:
    5
    Views:
    119
    Prasad, Ramit
    Aug 27, 2013
Loading...

Share This Page