>I have a DataGridView on my page
Do you mean a DataGrid or a GridView...?

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net
S Chapman - 25 Jul 2007 10:26 GMT
Sorry I meant {System.Web.UI.WebControls.GridView}
In theory, you can use LoadTemplate method to operate on templates in run
time. Google for it for more info. I just think it will be much easier to
add items to the ddl in every row.

Signature
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
>I have a DataGridView on my page that uses Template Fields for some of
> the cells. One such cell has a DropDownList as a control on the
[quoted text clipped - 10 lines]
> to obtain a reference to the template control itself and add the item
> only once? Thanks.
Mridul - 25 Jul 2007 12:35 GMT
I think instead of trying to add item to DropDownList, you can add
item to data source of DropDownList.
This step will automatically add item to DropDownList and you don't
need any reference of DropDownList.
Thanks!