Image TemplateColumn DataGrid Viewstate

Discussion in 'ASP .Net' started by =?Utf-8?B?U3RldmUgUg==?=, Feb 26, 2004.

  1. 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
     
    =?Utf-8?B?U3RldmUgUg==?=, Feb 26, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bob
    Replies:
    0
    Views:
    637
  2. =?Utf-8?B?U3RldmUgUg==?=

    TemplateColumn of DataGrid

    =?Utf-8?B?U3RldmUgUg==?=, Mar 1, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    456
    Brian K. Williams
    Mar 3, 2004
  3. Jade Seguin
    Replies:
    2
    Views:
    493
    Elad Volpin
    Aug 2, 2004
  4. dana lees
    Replies:
    3
    Views:
    5,073
    Eliyahu Goldin
    Sep 7, 2004
  5. =?Utf-8?B?QmlsbCBCb3Jn?=

    Hide datagrid TemplateColumn w/out using Cells collection

    =?Utf-8?B?QmlsbCBCb3Jn?=, Oct 21, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    1,669
    =?Utf-8?B?QmlsbCBCb3Jn?=
    Oct 21, 2004
Loading...

Share This Page