By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,948 Members | 1,652 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,948 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Nov 19 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
I'm wondering if there is a better group to post this question???

"Skowronek" <xilord at yahoo dot com> wrote in message
news:OI**************@TK2MSFTNGP09.phx.gbl...
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

Nov 19 '05 #2

P: n/a
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.datagridc ontrol
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:ue**************@TK2MSFTNGP15.phx.gbl... I'm wondering if there is a better group to post this question??? "Skowronek" <xilord at yahoo dot com> wrote in message
news:OI**************@TK2MSFTNGP09.phx.gbl...
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


Nov 19 '05 #3

P: n/a
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" <no***********@nowhere.com> wrote in message
news:Oz**************@TK2MSFTNGP11.phx.gbl...
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.datagridc ontrol
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:ue**************@TK2MSFTNGP15.phx.gbl...
I'm wondering if there is a better group to post this question???

"Skowronek" <xilord at yahoo dot com> wrote in message
news:OI**************@TK2MSFTNGP09.phx.gbl...
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



Nov 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.