This is a migrated thread and some comments may be shown as answers.

radgrid now refreshing with data change after command

2 Answers 95 Views
Grid
This is a migrated thread and some comments may be shown as answers.
sf
Top achievements
Rank 1
sf asked on 25 Jul 2012, 10:03 AM
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 Answers, 1 is accepted

Sort by
0
Accepted
Jayesh Goyani
Top achievements
Rank 2
answered on 25 Jul 2012, 11:09 AM
Hello,

Please check below code snippet.

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


Thanks,
Jayesh Goyani
0
Bruno
Top achievements
Rank 2
answered on 26 Jul 2012, 01:42 AM
thanks very much Jayesh!
problem solved
Tags
Grid
Asked by
sf
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Bruno
Top achievements
Rank 2
Share this question
or