Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > GridView in a GridView

Reply
Thread Tools

GridView in a GridView

 
 
Carlos Albert
Guest
Posts: n/a
 
      12-05-2005
Hello everybody

I'm working (or trying to, at least) with a gridview within another
gridview, and the 'child' gridview is related with the 'parent' from a
field.

With a simple gridview I used to work all by codebehind (mostly because I
get the XML from some librarys), using gridview.databind, but now I don't
know how to populate the second gridview and relate the fields...

Anyone could give me a hint?

Tnx!


 
Reply With Quote
 
 
 
 
agapeton@gmail.com
Guest
Posts: n/a
 
      12-06-2005
This shouldn't really be a problem using the new data source controls.

Otherwise, you will probably haveto play with the FindControl("Id")
guy. Your code will probably look like

((GridView)gvParent.Controls[0].Controls[n].Controls[1].Controls[1].FindControl("gvChild")).DataSource...

Thank goodness for the new controls...

 
Reply With Quote
 
 
 
 
Carlos Albert
Guest
Posts: n/a
 
      12-06-2005
Works great with the solution that Nalaka gave, thanks!

<> escribió en el mensaje
news: oups.com...
> This shouldn't really be a problem using the new data source controls.
>
> Otherwise, you will probably haveto play with the FindControl("Id")
> guy. Your code will probably look like
>
>

((GridView)gvParent.Controls[0].Controls[n].Controls[1].Controls[1].FindCont
rol("gvChild")).DataSource...
>
> Thank goodness for the new controls...
>



 
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
GridView Hierarchical View - Gridview in Gridview =?Utf-8?B?bWdvbnphbGVzMw==?= ASP .Net 1 05-09-2006 06:48 PM
Gridview 2 Gridview =?Utf-8?B?SmVzc2UgSm9obnNvbg==?= ASP .Net 2 02-13-2006 06:47 AM
Gridview inside Gridview little problems... Carlos Albert ASP .Net 1 12-06-2005 05:31 PM
GridView in a GridView Nalaka ASP .Net 6 12-05-2005 05:48 PM
Gridview with combobox whose data is dependent on field in gridview wallermj@hotmail.com ASP .Net 3 11-21-2005 05:34 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57