Datagrid blank on postback.

Discussion in 'ASP .Net' started by SatishPasala, Aug 8, 2007.

  1. SatishPasala

    SatishPasala Guest

    Hi

    I tried all the things I know am out of ideas now. Can you guys help
    me out with this?

    I have 4 grids on a page with I load on the Page_Load event. One of
    the grids has paging. When I move to different page on one of the
    grids, all the other Grids loose data on on postback.

    I am binding all the grids on the Page_Load event of the page the
    grids are in for each postback.

    Does any one have any idea what I am missing?

    satish
     
    SatishPasala, Aug 8, 2007
    #1
    1. Advertising

  2. SatishPasala

    David Wier Guest

    Which version of DotNet are you using?
    Are you using custom paging?
    If so, they're not using the same event handlers, are they?

    David Wier
    http://aspnet101.com
    http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
    bloated markup



    "SatishPasala" <> wrote in message
    news:...
    > Hi
    >
    > I tried all the things I know am out of ideas now. Can you guys help
    > me out with this?
    >
    > I have 4 grids on a page with I load on the Page_Load event. One of
    > the grids has paging. When I move to different page on one of the
    > grids, all the other Grids loose data on on postback.
    >
    > I am binding all the grids on the Page_Load event of the page the
    > grids are in for each postback.
    >
    > Does any one have any idea what I am missing?
    >
    > satish
    >
     
    David Wier, Aug 8, 2007
    #2
    1. Advertising

  3. SatishPasala

    SatishPasala Guest

    I am using .NET 1.1. I am not using custom paging. I debugged through
    the code.

    I see the dataview is assigned to the datasource of the DataGrid and
    BindData() method being called.

    I dont see the data in the grid except for the headers. I also
    confirmend that there is data in the dataview that is being assigned.

    I am not able to pin point where the error is.

    The datagrid is in a user control. If it makes any difference.

    satish


    On Aug 8, 5:14 pm, "David Wier" <>
    wrote:
    > Which version of DotNet are you using?
    > Are you using custom paging?
    > If so, they're not using the same event handlers, are they?
    >
    > David Wierhttp://aspnet101.comhttp://iWritePro.com- One click PDF, convert .doc/.rtf/.txt to HTML with no
    > bloated markup
    >
    > "SatishPasala" <> wrote in message
    >
    > news:...
    >
    > > Hi

    >
    > > I tried all the things I know am out of ideas now. Can you guys help
    > > me out with this?

    >
    > > I have 4 grids on a page with I load on the Page_Load event. One of
    > > the grids has paging. When I move to different page on one of the
    > > grids, all the other Grids loose data on on postback.

    >
    > > I am binding all the grids on the Page_Load event of the page the
    > > grids are in for each postback.

    >
    > > Does any one have any idea what I am missing?

    >
    > > satish
     
    SatishPasala, Aug 8, 2007
    #3
  4. SatishPasala

    David Wier Guest

    Since you're saying the DataGrid is in a User control, you have 4 user
    controls on the page, each of which has a DataGrid in it, right?

    Do the datagrids share any information with one another (do any of them rely
    on one or more of the others)?

    David Wier
    http://aspnet101.com
    http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
    bloated markup


    "SatishPasala" <> wrote in message
    news:...
    >I am using .NET 1.1. I am not using custom paging. I debugged through
    > the code.
    >
    > I see the dataview is assigned to the datasource of the DataGrid and
    > BindData() method being called.
    >
    > I dont see the data in the grid except for the headers. I also
    > confirmend that there is data in the dataview that is being assigned.
    >
    > I am not able to pin point where the error is.
    >
    > The datagrid is in a user control. If it makes any difference.
    >
    > satish
    >
    >
    > On Aug 8, 5:14 pm, "David Wier" <>
    > wrote:
    >> Which version of DotNet are you using?
    >> Are you using custom paging?
    >> If so, they're not using the same event handlers, are they?
    >>
    >> David Wierhttp://aspnet101.comhttp://iWritePro.com- One click PDF,
    >> convert .doc/.rtf/.txt to HTML with no
    >> bloated markup
    >>
    >> "SatishPasala" <> wrote in message
    >>
    >> news:...
    >>
    >> > Hi

    >>
    >> > I tried all the things I know am out of ideas now. Can you guys help
    >> > me out with this?

    >>
    >> > I have 4 grids on a page with I load on the Page_Load event. One of
    >> > the grids has paging. When I move to different page on one of the
    >> > grids, all the other Grids loose data on on postback.

    >>
    >> > I am binding all the grids on the Page_Load event of the page the
    >> > grids are in for each postback.

    >>
    >> > Does any one have any idea what I am missing?

    >>
    >> > satish

    >
    >
     
    David Wier, Aug 8, 2007
    #4
  5. SatishPasala

    SatishPasala Guest

    All of them have different information from different sources. They
    are independent grids and do not share any information. I have paging
    enabled in one grid. That particular grid works fine when I page to
    different pages. For the first time !IsPostBack all the grids display
    data properly. They only go blank when I click on a different page on
    the datagrid.

    Studio 2003 has a tendency to remove the event registrations in
    InitializeComponent() method. I checked this method too to make sure
    the event registrations are present.

    satish

    On Aug 8, 5:47 pm, "David Wier" <>
    wrote:
    > Since you're saying the DataGrid is in a User control, you have 4 user
    > controls on the page, each of which has a DataGrid in it, right?
    >
    > Do the datagrids share any information with one another (do any of them rely
    > on one or more of the others)?
    >
    > David Wierhttp://aspnet101.comhttp://iWritePro.com- One click PDF, convert .doc/.rtf/.txt to HTML with no
    > bloated markup
    >
    > "SatishPasala" <> wrote in message
    >
    > news:...
    >
    > >I am using .NET 1.1. I am not using custom paging. I debugged through
    > > the code.

    >
    > > I see the dataview is assigned to the datasource of the DataGrid and
    > > BindData() method being called.

    >
    > > I dont see the data in the grid except for the headers. I also
    > > confirmend that there is data in the dataview that is being assigned.

    >
    > > I am not able to pin point where the error is.

    >
    > > The datagrid is in a user control. If it makes any difference.

    >
    > > satish

    >
    > > On Aug 8, 5:14 pm, "David Wier" <>
    > > wrote:
    > >> Which version of DotNet are you using?
    > >> Are you using custom paging?
    > >> If so, they're not using the same event handlers, are they?

    >
    > >> David Wierhttp://aspnet101.comhttp://iWritePro.com-One click PDF,
    > >> convert .doc/.rtf/.txt to HTML with no
    > >> bloated markup

    >
    > >> "SatishPasala" <> wrote in message

    >
    > >>news:...

    >
    > >> > Hi

    >
    > >> > I tried all the things I know am out of ideas now. Can you guys help
    > >> > me out with this?

    >
    > >> > I have 4 grids on a page with I load on the Page_Load event. One of
    > >> > the grids has paging. When I move to different page on one of the
    > >> > grids, all the other Grids loose data on on postback.

    >
    > >> > I am binding all the grids on the Page_Load event of the page the
    > >> > grids are in for each postback.

    >
    > >> > Does any one have any idea what I am missing?

    >
    > >> > satish
     
    SatishPasala, Aug 8, 2007
    #5
  6. SatishPasala

    Guest

    your paging logic might be repeated?

    So if you go to page 2 on AAA.aspx, then go to BBB.aspx the grid looks
    for page 2 but only has page 1. happens when you use common session
    variables. Try using a ViewState variable instead.

    Just a guess.
     
    , Aug 8, 2007
    #6
  7. SatishPasala

    SatishPasala Guest

    All the girds are on one page. Paging is referenced to datagrid
    paging. I am loosing data on the postback.

    satish

    On Aug 8, 6:58 pm, wrote:
    > your paging logic might be repeated?
    >
    > So if you go to page 2 on AAA.aspx, then go to BBB.aspx the grid looks
    > for page 2 but only has page 1. happens when you use common session
    > variables. Try using a ViewState variable instead.
    >
    > Just a guess.
     
    SatishPasala, Aug 9, 2007
    #7
    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. Chris Brandsma

    DataGrid going blank on edit

    Chris Brandsma, Jan 30, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    367
    Mark Jen [MSFT]
    Jan 30, 2004
  2. tshad

    Add a blank row to DataGrid

    tshad, Oct 20, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    9,933
    tshad
    Oct 20, 2004
  3. =?Utf-8?B?YWo=?=
    Replies:
    0
    Views:
    390
    =?Utf-8?B?YWo=?=
    Nov 2, 2004
  4. ibiza
    Replies:
    0
    Views:
    745
    ibiza
    Jan 16, 2006
  5. Schipa - Mint Inc.

    Get a blank screen after postback

    Schipa - Mint Inc., Jan 23, 2005, in forum: ASP .Net Security
    Replies:
    0
    Views:
    321
    Schipa - Mint Inc.
    Jan 23, 2005
Loading...

Share This Page