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

RadGrid Rebind don't work (for page change and datarebind)

1 Answer 150 Views
Grid
This is a migrated thread and some comments may be shown as answers.
mbro87
Top achievements
Rank 1
mbro87 asked on 07 Apr 2011, 01:48 PM
Hello, I've a RadGrid into ASP:Panel but the RadGrid Rebind don't work correctly!

When close modal (RadWindow) or change the page with RadGrid pagination, the grid collapse and don't rebind the data (with debug, the page except the ItemDataBound on Rebind).

-- RAM -- 

        protected void RAM_AjaxRequest(object sender, AjaxRequestEventArgs e)
        {
            if (e.Argument == "Rebind")
            {
                RG1.MasterTableView.SortExpressions.Clear();
                RG1.MasterTableView.GroupByExpressions.Clear();
                RG1.Rebind();
            }
            else if (e.Argument == "RebindAndNavigate")
            {
                RG1.MasterTableView.SortExpressions.Clear();
                RG1.MasterTableView.GroupByExpressions.Clear();
                RG1.MasterTableView.CurrentPageIndex = RG1.MasterTableView.PageCount - 1;
                RG1.Rebind();
            }
        }

-- RAD MANAGER AND JS --

            function refreshGrid(arg) {


                if (!arg) {
                    $find("<%= RAM.ClientID %>").ajaxRequest("Rebind");
                }
                else {
                    $find("<%= RAM.ClientID %>").ajaxRequest("RebindAndNavigate");
                }
            }


       </script>
    </telerik:RadCodeBlock>


    <!-- Rad Ajax Manager -->
    <telerik:RadAjaxManager ID="RAM" runat="server" OnAjaxRequest="RAM_AjaxRequest">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RAM">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RG1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RG1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RG1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

Why this?
Thanks.

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 11 Apr 2011, 12:21 PM
Hello ctype87,

Can you elaborate on how it the grid bound in your case? If you are using simple data-binding, I suggest that you implement the advanced data-binding approach instead.

Regards,
Iana
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
Tags
Grid
Asked by
mbro87
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or