radgrid now refreshing with data change after command

3 posts, 1 answers
  1. sf
    sf avatar
    103 posts
    Member since:
    Apr 2009

    Posted 25 Jul 2012 Link to this post

    hi i have a radgrid which is populated with ListA (generated from database) within OnNeedDataSource,

    The radgrid has command a command button. the command button trigers a radajaxloading panel. In RadGrid1_ItemCommand I take out some record from database, and call RadGrid1.Rebind() to reflect the change.

    During debug i can step through all these code and even in the OnNeedDataSource method called by RadGrid1.Rebind() method after item command i can see ListA has changed (with some records removed). 

    However when I proceed to the end the RadGrid still got the original ListA with the records that should be removed.

    any idea what I am doing wrong?

    thanks in advance
  2. Answer
    Jayesh Goyani
    Jayesh Goyani avatar
    2733 posts
    Member since:
    May 2010

    Posted 25 Jul 2012 Link to this post


    Please check below code snippet.

      <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                    <telerik:AjaxSetting AjaxControlID="RadGrid1">
                            <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    Your Grid Come here

    Jayesh Goyani
  3. Bruno
    Bruno avatar
    16 posts
    Member since:
    May 2008

    Posted 25 Jul 2012 Link to this post

    thanks very much Jayesh!
    problem solved
Back to Top