473,387 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Question: Gridview within Gridview issue

This is confusing...

I have a gridview (gv1) with another gridview (gv2) inside of it.

gv1 has a bunch of house listings and within each row is a group of related
house pictures (gv2).

I'm having trouble getting gv2 to show any data.

Here's part of my code...
Protected Sub gv1_RowDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewRowEventArgs) Handles gv1.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim gv As GridView = e.Row.FindControl("gv2")
gv.DataBind()
End If
End Sub

QUESTION 1: Any ideas what I'm doing wrong?

gv2 datasource SELECT statement is defined as "SELECT PicName FROM
ListingPics WHERE (ListingId = @ListingId)"

I would like the @ListingId variable to be filled in BY THE CURRENT ROW in
gv1.

QUESTION 2: How can I do this???

Thanks.
Nov 4 '07 #1
1 1611
On Nov 4, 12:26 pm, "Cirene" <t...@test.comwrote:
This is confusing...

I have a gridview (gv1) with another gridview (gv2) inside of it.

gv1 has a bunch of house listings and within each row is a group of related
house pictures (gv2).

I'm having trouble getting gv2 to show any data.

Here's part of my code...
Protected Sub gv1_RowDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewRowEventArgs) Handles gv1.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim gv As GridView = e.Row.FindControl("gv2")
gv.DataBind()
End If
End Sub

QUESTION 1: Any ideas what I'm doing wrong?

gv2 datasource SELECT statement is defined as "SELECT PicName FROM
ListingPics WHERE (ListingId = @ListingId)"

I would like the @ListingId variable to be filled in BY THE CURRENT ROW in
gv1.

QUESTION 2: How can I do this???

Thanks.
OK, I just did the same thing, that is, to have a gridview row expand
upon a button click in the row.

I followed the example at http://www.webswapp.com/codesamples/...s/default.aspx

with slight modifications. For example, I don't need the details
view, so, I took that part out. It works perfect. Please take a
closer look at that example, and you'll get it.

Nov 4 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Randy Smith | last post by:
Hi ALL, I wonder if anyone has been using n-tier to bind to a GridView control by using the ObjectDataSource. This is our first OOP web application, and we have no tables. Right now we are...
4
by: Jeff | last post by:
Hi, I have a ASP.NET 2.0 Web Application. Many of the pages use the ASP.NET GridView with paging and sorting. One of the columns of this Gridview is a template column (LinkButton). The data being...
5
by: brian | last post by:
I have a gridview that will contain 5000 + rows that is initially loaded into a dataset and bound to a gridview. On the form I have textboxes and dropdown list's I use to let the user fill in and...
13
by: SAL | last post by:
Hello, I'm trying to include a popup in the ItemTemplate of a gridview row. The ItemTemplate for the field contains a textbox and when the user clicks in the textbox I want a popup panel to show...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.