>Guys Finally got Solution...........
Thanks to Harshit Rawal also.
Explanation:
The RowIndex of the GridView Row is contained in the CommandArgument Property. Thus with that index you can get the reference of the GridView Row.
My Griedview is like this ..
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" OnRowCommand="OnRowCommand"> <Columns> <asp:ButtonField CommandName="View" ButtonType="Button" /> <asp:TemplateField> <ItemTemplate> <asp:DropDownList ID="ddlitem" runat="server"> </asp:DropDownList> </ItemTemplate> </asp:TemplateField> </Columns>
</asp:GridView>
What i want i got it on handling OnRowCommand of my gridview
Protected Sub OnRowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs)
If e.CommandName = "View" Then
Dim i As Integer = Convert.ToInt32(e.CommandArgument)
Dim ddl As DropDownList = DirectCast(GridView1.Rows(i).FindControl("ddlitem"), DropDownList)
Dim x As String = ddl.SelectedValue
End If
End Sub