Image TemplateColumn DataGrid Viewstate

G

Guest

I have a Datagrid with several TemplateColumns. I am creating ALL (BoundColumn & TemplateColumn) of the columns for the DataGrid during the PAGE_INIT. One TemplateColumn is a checkbox that allows the user to select the row/datagriditem to carry forward in a wizard. The other TemplateColumns contain a System.Web.UI.WebControls.Image. In the ITEMCREATED event for the datagrid, I toggle the ImageURL property for each Image based on certain parameters. My problem is getting the property changes I make to each Image to carry forward on subsequent postbacks. Initially I had the problem with the checkbox until I realized I was naming it in my ItemCreated event. On postbacks after the ITEMCREATED event if fired, the Images default back to the properties I assigned to them when they were created

Is there a limitation on what is kept in the Viewstate for a System.Web.UI.WebControls.Image? Perhaps someone knows of a classic pitfall that would keep this from happening? Is there a better event in which to create the columns for my datagrid other than the PAGE_INIT

Thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top