Hi,
I have a gridview which gets its data from a database table
now i ghave added a dropdownlist to this gridview but this dropdown should get the data from another table and should set its value automatically with a foreign key from the gridview
i have added the code like below in my rowDatabound but it just loads 1 field and then how should i get the selectedValue according to the gridview id field??
Protected Sub Friends_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
Dim conn As New SqlConnection(HttpRuntime.Cache("con")) Dim sql As String = "select ID,ListName from FriendList order by ListName asc" Dim cmd As New SqlCommand(sql, conn) cmd.CommandType = CommandType.Text conn.Open() &
View Complete Post