Help Using Selected Values between Tables

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Jan 2006
Posts: 21
Reputation: Mikecool509 is an unknown quantity at this point 
Solved Threads: 0
Mikecool509's Avatar
Mikecool509 Mikecool509 is offline Offline
Newbie Poster

Help Using Selected Values between Tables

 
0
  #1
Feb 21st, 2006
Hello everyone. I have a pretty straight foreward problem. Here is an overview of what i am trying to accomplish
1. I am trying to allow "teachers" of my quiz site to create a class list and in that class list, they can have a list of students. I created two tables, one called class list, and the other student list

2. On my page, I have two gridviews and two sql sources. the one sql source retreives the data from the class list table, and limits the results to a where statement based on a session object. The second sql data source grabs the data from the student list

3. I want the teacher to be able to click a class period from the table that is displaying the class list and have the student list data table display the list of students that are in that class period.

My problem: I restriced the sql source that is getting the student list to only show the data based on the selected value of the class list view. However, when i run the program, i get an error that says:

  1. Data keys must be specified on GridView
  2. 'classlistView' before the selected data keys can be retrieved.
  3. Use the DataKeyNames property to specify data keys.

I think that this means i need to create a primary key. However, because multiple teachers are using the program, and each will have the same class period number, i cannot have the class period colum in my table be the primary key.

If this is kind of confusing, please let me know, and i will clarify. Thank you for all of your help!!! :p
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 483
Reputation: campkev is an unknown quantity at this point 
Solved Threads: 19
campkev campkev is offline Offline
Posting Pro in Training

Re: Help Using Selected Values between Tables

 
0
  #2
Feb 22nd, 2006
maybe what is happening is that on the initial load, you have nothing selected in the list of classes, so when your second grid tries to load based on the the selected object in the first gridview, it isn't working
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC