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

S

Skowronek

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
 
J

Juan T. Llibre

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/
===========================
 
S

Skowronek

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

Thanks for the reply.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top