DG lose viewstate

Discussion in 'ASP .Net Datagrid Control' started by Amir, Oct 15, 2004.

  1. Amir

    Amir Guest

    Hi all
    I have only a Datagrid and a submit button on a form.
    I use 2 template columns and some bound columns in my grid.
    My code in the event handler of submit button's click count the datagrid
    items with process it's items with a for loop.

    But "Dg.Items.Count" is ZERO.

    When I debug the code, after postback in Page_load "Dg.Items.Count" is not
    ZERO.
    But in click's event handler it return zero.

    It seems the DG lose it's data in viewstate between to method (Page_load &
    click's event handler).
    I instlled the .NET framework 1.1 SP1.

    I'm very Penitent that have not switch to J2EE till yet.
     
    Amir, Oct 15, 2004
    #1
    1. Advertisements

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. Ben Rush
    Replies:
    2
    Views:
    793
    Ben Rush
    Dec 5, 2003
  2. Gerald Klein

    Whay do I lose viewstate in my usercontrol

    Gerald Klein, Jan 24, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    478
    Gerald Klein
    Jan 24, 2004
  3. Steph
    Replies:
    2
    Views:
    1,898
    heislord5
    May 11, 2011
  4. ujjc001
    Replies:
    0
    Views:
    1,572
    ujjc001
    Jul 27, 2005
  5. sck10
    Replies:
    6
    Views:
    1,259
    sck10
    Sep 1, 2006
  6. gnewsgroup
    Replies:
    2
    Views:
    619
    gnewsgroup
    Oct 31, 2007
  7. mark

    Viewstate errors... how do I get viewstate working?

    mark, Feb 20, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    443
  8. Amir

    Viewstate lose data

    Amir, Dec 28, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    199
Loading...