0

i have records in gridview , showing results of different students, roll no. wise along with name and gpa, so i want to view detail marks sheet of each rollno. present in gridview, when i click on roll no. of any student. how ? in asp.net ?

2
Contributors
5
Replies
6
Views
4 Years
Discussion Span
Last Post by JorgeM
0

@jORGEM: yes , that's fine but i mean that how i would know that on which rollno. visitor clicked ? or viewing whose details ?

1

If I understand you correctly, you do understand that you can use a detailsview in combination with a gridview and that the data shown in the detailsview is based on a selection in the gridview.

Ok, if this is the case, using the wizard when adding new controls...

what I have done in the past is add the details view after my gridview is created. When creating the detailsview datasource, going through the SQL steps (Configure the Select Statement Window), I click on the "Where..." button, and in the "Add Where Clause" window, I click on the source dropdown, choose "Control", on the ControlId dropdown, choose my Gridview, finish it by clicking add for "GridView1.SelectedValue".

Make sure my gridview has a "Selected" control so that when I click on it, the details are shown in the detailsview.

This tutorial should get you on the right track.
http://www.asp.net/web-forms/tutorials/data-access/masterdetail/master-detail-using-a-selectable-master-gridview-with-a-details-detailview-vb

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.