Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Doubt template

Thread Tools

Doubt template

Posts: n/a
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 2.0 C#??


Reply With Quote
Muhammad Naveed Yaseen
Posts: n/a
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).

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
dotnet doubt can any body clarify my doubt ASP .Net 0 08-22-2012 06:02 AM
template template arguments: expected a class template, got `Component<T1, T2, T3> C++ 1 06-08-2007 07:10 AM
doubt about doubt Bob Nelson C Programming 11 07-30-2006 08:17 PM
Re: A Newbie Question about template template template tom_usenet C++ 0 07-24-2003 12:06 PM
Re: A Newbie Question about template template template Chris Theis C++ 2 07-24-2003 09:42 AM