RadGrid NeedDataSource not executing on postback

2 posts, 0 answers
  1. Johney
    Johney avatar
    1 posts
    Member since:
    Sep 2016

    Posted 07 Sep 2016 Link to this post

    Hello I am having one issue on RadGrid. I have a simple Employee list which I am binding in Page_Load inside !IsPostBack check.

    As soon as, a postback happens (whether it is due to a button click or due to allowsorting (automatic sort)); the grid disappears. This is because NeedDataSource is not executed on postback.

    However, if I write RadGrid1.Rebind() then NeedDataSource is executed.

    Does this means everytime when a postback happens, I have to call RadGrid1.Rebind() to bind the grid (whether it is due to a button click or due to allowsorting (automatic sort))?

    I remember in earlier version we did not needed to call Rebind() method to make NeedDataSource execute.

    Please help.

  2. Kostadin
    Kostadin avatar
    1733 posts

    Posted 10 Sep 2016 Link to this post

    Hello Johney,

    When using advanced data binding through NeedDataSource you do not need to bind the grid initially on Page_Load event handler. I would recommend you to check out the following help article which elaborates more on this binding type.

    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top