GRIDVIEW

Gunuti Rajesh

Total Post:1

Points:7
Posted by  Gunuti Rajesh
.NET 
 1219  View(s)
Ratings:
Rate this:
How to bind data to child gridview ..on selection of dropdown list inside parent gridview
  1. Samuel Fernandes

    Post:159

    Points:1117
    Re: Gridview

    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"
    drp.DataBind()

    Next

      Modified On Apr-09-2018 01:26:19 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!