Home > DeveloperSection > Forums > Gridview
Gunuti Rajesh
Gunuti Rajesh

Total Post:1

Posted on    February-10-2015 9:09 PM


 1 Reply(s)
 994  View(s)
Rate this:
How to bind data to child gridview ..on selection of dropdown list inside parent gridview

Samuel Fernandes
Samuel Fernandes

Total Post:159

Posted on    February-11-2015 2:17 AM

From Gridview onrowdatabound event, you have to write the code for finding the dropdownlist and bind the records from the dataset which you have

For Each rw As GridViewRow In grid.Rows
Dim drp As New DropDownList
drp = DirectCast(rw.FindControl("drp1"), DropDownList)
Dim ds As New DataSet
drp.DataSource = ds.Tables(0).DefaultView
drp.DataTextField = "Name"
drp.DataValueField = "ID"

Don't want to miss updates? Please click the below button!

Follow MindStick