RadGrid for Ajax Rebind() not firing

4 posts, 0 answers
  1. Ben
    Ben avatar
    1 posts
    Member since:
    Jan 2009

    Posted 27 Jan 2009 Link to this post

    Hi, I'm hoping you can help.

    I have a RadGrid that contains an edit form; within this edit form I have 2 more RadGrids. The idea is that the user can select an item from one of these and add it to the other. This works fine, but my problem is trying to load them back in at a later date.

    Basically the ReBind() method isn't firing. I have:

    private void Rebind()
    {
            RgCustomers.Rebind();
            RgCustomersSelected.Rebind();
    }

    and

    protected void RgCustomers_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
    {
        RgCustomers.DataSource = CustomerDataSource;
        if (!Page.IsPostBack)
            ApplyFilters();
    }

    protected void RgCustomersSelected_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
    {
        RgCustomersSelected.DataSource = CustomerSelectedDataSource;
    }

    but when I debug through it the NeedDataSource's never get called when I call the Rebind method.

    Anyway help would be great!! Many thanks, Ben

  2. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 30 Jan 2009 Link to this post

    Hello Ben,

    This looks like an issue with the way the controls are ajaxified. Does the setup work as expected, when you temporarily disable the Ajax? You can consider opening a formal support ticket, and sending us the implementation, for additional investigation.

    Best wishes,
    Yavor
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Quba
    Quba avatar
    7 posts
    Member since:
    Jun 2006

    Posted 30 Jan 2009 Link to this post

    Thanks for your reply Yavor.

    I don't think it's an AJAX problem as I have it set to False within the RadAjaxManagers for each Grid.

    What I really need is someway of rebinding the Grid dynamically, within the code of the page. What seems to be happening is the Grid is bound on page load, but then when I try to rebind it with the ReBind() method nothing happens. The reason I need to rebind it on the fly is the datasource for the grid is this:

    private IQueryable<Customer> CustomerSelectedDataSource
    {
        get
        {
             List<int> source = PromoStore.SpecificCustomerIDs;
             return Customer.GetCustomersOrderByDateRegistered(db, source);
        }
    }


    and the value of PromoStore.SpecificCustomerIDs is stored in memory, so can be different every time.

    Is there any way I can rebind the brid programmatically????

    Many thanks, Ben
  5. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 03 Feb 2009 Link to this post

    Hi Charlie,

    How and where is the rebind function called? Additionally, if the issue persists, you can open a formal support ticket, and send us the problematic implementation, for additional testing and review.

    Sincerely yours,
    Yavor
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top