Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Binding a Gridview to a DetailsView on another page

Reply
Thread Tools

Binding a Gridview to a DetailsView on another page

 
 
Coby Herd
Guest
Posts: n/a
 
      11-15-2007
I'm having trouble finding out how to bind a gridview containing data to
individual details on another page. Can anybody send me the code or point
me in the right direction to get a tutorial for this?

thanx


--
Coby L. Herd
112-A S.E. 13th Ave.
Ft. Lauderdale, FL. 33301
954-467-0918
www.caterdata.com/portfolio


 
Reply With Quote
 
 
 
 
PJ on Development
Guest
Posts: n/a
 
      11-19-2007
Hi, Coby

What do you mean by "binding"?

Because when I hear "bind" I usually think about Data Binding, which
is not possible.

However, if you're refereing to displaying the details on another
page, I think that the best way to do this is pass the ID< or Code, or
whatever, to the page via QueryString.

Regards,

Paulo Santos
http://pjondevelopment.50webs.com

On Nov 15, 7:04 pm, "Coby Herd" <(E-Mail Removed)> wrote:
> I'm having trouble finding out how to bind a gridview containing data to
> individual details on another page. Can anybody send me the code or point
> me in the right direction to get a tutorial for this?
>
> thanx
>
> --
> Coby L. Herd
> 112-A S.E. 13th Ave.
> Ft. Lauderdale, FL. 33301
> 954-467-0918www.caterdata.com/portfolio


 
Reply With Quote
 
 
 
 
radiolandog
Guest
Posts: n/a
 
      11-26-2007
Would this help?

http://msdn2.microsoft.com/en-us/library/aa581796.aspx

Have you tried goggling "asp.net master detail?"




"Coby Herd" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm having trouble finding out how to bind a gridview containing data to
> individual details on another page. Can anybody send me the code or point
> me in the right direction to get a tutorial for this?
>
> thanx
>
>
> --
> Coby L. Herd
> 112-A S.E. 13th Ave.
> Ft. Lauderdale, FL. 33301
> 954-467-0918
> www.caterdata.com/portfolio
>
>



 
Reply With Quote
 
Angel
Guest
Posts: n/a
 
      01-06-2008
I guess by now you have your answer... But another approach

Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewCommandEventArgs ) Handles
GridView1.RowCommand
If e.CommandName.Equals("Select") Then
Dim RowIndex As Integer =
Convert.ToInt16(e.CommandArgument.ToString)
ViewState("PrimaryKey") =
GridView1.DataKeys(RowIndex).Value.ToString
BindDetailsView(ListItemType.Item)
End If
End Sub

You do need to set the gridview DataKeyNames with key field.

the wacky BindDetailsView(ListItemType.Item) is because the snippet
comes from a real working example where I dynamically set all the
properperies. I make no use of declarative stuff.

Hope it helps


--
aaa


"Coby Herd" wrote:

> I'm having trouble finding out how to bind a gridview containing data to
> individual details on another page. Can anybody send me the code or point
> me in the right direction to get a tutorial for this?
>
> thanx
>
>
> --
> Coby L. Herd
> 112-A S.E. 13th Ave.
> Ft. Lauderdale, FL. 33301
> 954-467-0918
> www.caterdata.com/portfolio
>
>
>

 
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 column values to another page via gridview hyperlink column Keith G Hicks ASP .Net 3 02-18-2008 06:17 AM
GridView binding - how to stop initial binding Amit ASP .Net 6 10-24-2006 08:06 AM
DetailsView - Changing to Insert Mode (Not By Using the Insert Button In the DetailsView Control) Feege ASP .Net Web Controls 0 12-20-2005 12:28 AM
DetailsView Data Binding Andrew Robinson ASP .Net 2 10-10-2005 11:09 AM
Binding a textbox to a detailsview in asp.net 2.0 =?Utf-8?B?Q2VyaV9EYXZpZXM=?= ASP .Net 0 03-22-2005 06:11 PM



Advertisments