|
Prev: Spy Video Eyewear Recorder EVR130 available at http://www.gusdeluxe.info/Catalog
Next: Dessous Erotic Lingerie Shop http://dessouserotic.com
From: hvj on 24 Jul 2008 14:45 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
From: Leon Mayne on 25 Jul 2008 07:47 hvj(a)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("ddlYourDropDown"), DropDownList)
From: hvj on 27 Jul 2008 08:41
On 25 jul, 13:47, Leon Mayne <leon.rm...(a)mvps.org> wrote: > h...(a)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("ddlYourDropDown"), 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. |