Click here to Skip to main content
15,917,456 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a gridview which will show all the lesson, however each row of lesson, i want to show a list of available date that the lesson have in the radio button list in one of the column of the gridview

the gridview data is retrieve by sql data source

so how should i do the binding?

HTML
Table: Lesson 


lessonID lessonName    
1         English
2         Chinese
3         Maths   

HTML
 Table: LessonDate
 

lessonDateID date        
1            12/2/2012   
2            13/2/2012   
3            20/3/2012   
4            25/4/2012   


HTML
 Table: LessonWithDate

lessonWithDateID   lessonDateID     lessonID
1                       1             1
2                       1             2
3                       2             2
4                       3             1
5                       4             3
Posted

1 solution

just wanna ask. you want to show the lesson name and the lesson date?
then what for is the radio button?
are going to select the lesson?
please clarify so we can help.
thanks! :)
 
Share this answer
 
Comments
cutexxbaby 26-Jan-12 2:26am    
the radio button list is for all the available date to display there, so basically , one column cell is the lesson name, den one column cell is the list of radio button list (all the available date are bind to it)
graciax8 26-Jan-12 3:58am    
try this one.
radData is the radiobuttonlist

Dim dt As DataTable
Dim con As New OdbcConnection(ConnStr)
Dim da As New OdbcDataAdapter("select * from phonebook limit 5", con)
con.Open()
Dim ds As New DataSet()
da.Fill(ds)
dt = ds.Tables(0)


radData.DataSource = ds
radData.DataTextField = "name"
radData.DataValueField = "idphonebook"
radData.DataBind()
Jaideep Ameta 28-Apr-12 6:41am    
How to create radiobutton from database and after retrive the data from radiobutton ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900