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

Ajax Grid Refresh 1 row behind

1 Answer 19 Views
Grid
This is a migrated thread and some comments may be shown as answers.
david
Top achievements
Rank 1
david asked on 20 Nov 2008, 08:23 PM
I have two grids, a delete on Grid1 cause an add on Grid2 and vice-versa.

When I delete from Grid2 , Grid1 is nicely Ajax updated.

When I delete from Grid1, Grid2 gets updated on the 2nd delete, meaning its alway 1 row behind?

what am I missing?

  <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid2">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid2" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                </AjaxSettings>
        </telerik:RadAjaxManager>

in both cases the item_command handlers are doing a rebind();

            RadGrid1.Rebind();
            RadGrid2.Rebind();

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 21 Nov 2008, 07:09 AM
Hi david,

You may need to add additional setting in order to update the grid itself.

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid2">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                        <telerik:AjaxUpdatedControl ControlID="RadGrid2" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                       
<telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                        <telerik:AjaxUpdatedControl ControlID="RadGrid2" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                </AjaxSettings>
        </telerik:RadAjaxManager>


Greetings,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
david
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or