ASP.Net 2.0 GridView inside Checkbox/Dropdown
-
Hi All, I have Gridview and inside checkbox/Dropdownlist controls.I want capture checked/selecteditem rows values. I am trying to get select checkbox rows values.but IsChecked variable not set True.Here is the example code. // Checkbox control... Dim i As Integer For i = 0 To gridview1.Rows.Count - 1 Dim gvr As GridViewRow = gridview1.Rows(i) Dim isChecked As Boolean isChecked = CType(gvr.FindControl("checkbox1"),CheckBox).Checked If isChecked Then textbox1.Text = gridview1.Rows(i).Cells(1).Text End If Next // DropdownList Dim gvr As GridViewRow Dim str As String For Each gvr In gridview1.Rows str = (CType(gvr.FindControl("ddlType"), DropDownList)).SelectedItem.Text textbox2.Text = str Next Please let me know why is not working the above code and how to do that.
Thanks & Regards Rao