On 25 jul, 13:47, Leon Mayne <leon.rm...@mvps.orgwrote:
h...@paralax.nl wrote:
Hi all,
I'm stuck on the following seemingly easy issue?
When I know the row nr and column nr of *a cell in a datagridview with
a combobox in it how do I get a reference to that combobox?
Help would be very much appreciated.
Regards,
Henk
Something like (for row 1, column 2):
Dim ddlYourDropDown As DropDownList =
CType(CType(Me.GridView1.Controls(0),
Table).Rows(1).Cells(2).FindControl("ddlYourDropDo wn"), DropDownList)
Thanks for the try Leon, but gridview1.Controls does not contain
something that can be cast to Table. In my case it only contains the
scrollbars.
I found out that there isn't even a edit control for every cell. Not
until some cell gets in the editmode an edit control is instantiated.
And with dataGridview.EditingControl it can be retreived.