Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to get data from parent datagrid item from child datagrid dataitem

Reply
Thread Tools

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

 
 
Skowronek
Guest
Posts: n/a
 
      08-31-2005
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


 
Reply With Quote
 
 
 
 
Skowronek
Guest
Posts: n/a
 
      09-01-2005
I'm wondering if there is a better group to post this question???

"Skowronek" <xilord at yahoo dot com> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      09-01-2005
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:(E-Mail Removed)...
> I'm wondering if there is a better group to post this question???


> "Skowronek" <xilord at yahoo dot com> wrote in message
> news:(E-Mail Removed)...
>> 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
>>

>
>



 
Reply With Quote
 
Skowronek
Guest
Posts: n/a
 
      09-16-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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:(E-Mail Removed)...
>> I'm wondering if there is a better group to post this question???

>
>> "Skowronek" <xilord at yahoo dot com> wrote in message
>> news:(E-Mail Removed)...
>>> 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
>>>

>>
>>

>
>



 
Reply With Quote
 
ProgTalk ProgTalk is offline
Junior Member
Join Date: Dec 2007
Posts: 28
 
      12-04-2007
Try this approach: http://www.progtalk.com/ViewArticle.aspx?ArticleID=1
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
If a class Child inherits from Parent, how to implementChild.some_method if Parent.some_method() returns Parent instance ? metal Python 8 10-30-2009 10:31 AM
Availability of e.Item.DataItem in DataGrid? Dave ASP .Net 0 02-11-2009 05:22 PM
e.Item.DataItem in a ItemDataBound event (DataGrid) MattB ASP .Net 4 09-25-2006 01:48 AM
Unable to get DataItem for Repeater item in RepeaterItem.PreRender. Peter Rilling ASP .Net 1 05-19-2005 12:15 AM
Pass from parent to child, then update parent with child value... Noel Dolan Javascript 0 07-18-2004 05:52 PM



Advertisments