Hi, inside a template field, ItemTemplate, on a GridView, I have a combobox,
but how can I fill it only on first time before filling the gridview rows?
Im usvig VS 2005 asp.net 2.0 C#??
Thanks
Muhammad Naveed Yaseen - 03 Sep 2007 21:53 GMT
Perhaps the best way is to bind it with a DataSource Control (e.g.
ObjectDataSource or SqlDataSource). That would take care of details
like 'when, how, where' and caching. Please note that DataSource
controls are bound by propertie DataSourceID (and not DataSource).
Alternatively you may hook up RowCreated event and get manual access
by e.Row.FindControl (after ensuring its a data row by e.Row.RowType
== DataControlRowType.DataRow).