Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Image TemplateColumn DataGrid Viewstate

Reply
Thread Tools

Image TemplateColumn DataGrid Viewstate

 
 
=?Utf-8?B?U3RldmUgUg==?=
Guest
Posts: n/a
 
      02-26-2004
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
 
Reply With Quote
 
 
 
Reply

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
Hide datagrid TemplateColumn w/out using Cells collection =?Utf-8?B?QmlsbCBCb3Jn?= ASP .Net 0 10-21-2004 10:13 PM
Formatting a TemplateColumn of a datagrid dana lees ASP .Net 3 09-07-2004 09:47 AM
Added TemplateColumn is not showing in DataGrid after PostBack Jade Seguin ASP .Net 2 08-02-2004 09:53 AM
TemplateColumn of DataGrid =?Utf-8?B?U3RldmUgUg==?= ASP .Net 2 03-03-2004 07:30 AM
Make DataGrid TemplateColumn read-only in code Bob ASP .Net 0 07-09-2003 05:56 PM



Advertisments