Data gets lost when I perform postback on grid

7 posts, 0 answers
  1. Hugo Aristizabal
    Hugo Aristizabal avatar
    22 posts
    Member since:
    Jan 2010

    Posted 08 Jul 2010 Link to this post


    I have a RadGrid on an ASP.NET page. When I do something that requieres a postback directly on the grid, like changing the page size, or browsing to a new page in the grid, my data gets lost and my grid becomes empty. Here's my markup:

    <telerik:RadGrid ID="ReporteGridView" runat="server" AllowPaging="True" PageSize="20"
        AllowAutomaticInserts="false" AllowSorting="True" ShowStatusBar="true" Width="880px">
        <ExportSettings ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true" />
        <MasterTableView NoMasterRecordsText="No hay registros para mostrar" ShowHeadersWhenNoRecords="True"
            PageSize="20" CommandItemDisplay="None" Width="100%">
            <PagerStyle FirstPageToolTip="Primera página" LastPageToolTip="Ultima página" NextPagesToolTip="Página siguiente"
                PageSizeLabelText="Tamaño página" PrevPagesToolTip="Página anterior" />
                <HeaderStyle Width="20px"></HeaderStyle>
                <HeaderStyle Width="20px"></HeaderStyle>
            <Scrolling AllowScroll="true" UseStaticHeaders="True"></Scrolling>

    I'm binding my grid to a DataTable at runtime. Is there something I'm missing?

  2. Pavlina
    Pavlina avatar
    6187 posts

    Posted 12 Jul 2010 Link to this post

    Hello Hugo,

    Could you please confirm that you are not binding the RadGrid control through simple data-binding calling DataBind()? You may take a look at the following article on suggested way to populate RadGrid when using CRUD operations:
    Advanced Data-binding (using NeedDataSource event)
    I hope this helps.

    Sincerely yours,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Reza
    Reza avatar
    4 posts
    Member since:
    Jun 2012

    Posted 07 Jul 2012 Link to this post

    hi guys,
    i have same problem too, consider that i have a radiobuttonList on my radgrid, when a postback accure in radgrid , its value just gone and it returns the default value when page was loded. please help ...
    ohhh , i bind my data on NeedDatasource Event with setting radgrid data source on a list. here is my code :
    protected void RadGridCustomized1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
                HSECourseEOList list = Session[cachedEntity] as HSECourseEOList;
                RadGrid1.DataSource = list;

    thanks .
  4. JJ
    JJ avatar
    21 posts
    Member since:
    Jul 2014

    Posted 24 Jul 2014 Link to this post

  5. TRA
    TRA avatar
    7 posts
    Member since:
    Aug 2008

    Posted 08 Oct 2014 Link to this post

    Is there still no answer for this?  I am having the same problem.
  6. Pavlina
    Pavlina avatar
    6187 posts

    Posted 13 Oct 2014 Link to this post


    Could you send us the problematic code along with the related code behind so we can examine it?


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  7. Arash
    Arash avatar
    1 posts
    Member since:
    Feb 2017

    Posted 07 Feb 2017 Link to this post

    When I reorder grid columns , then data is lost and I need to refresh the page again or rebind 


    any solutions?

Back to Top