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

RadGrid for Ajax Rebind() not firing

3 Answers 80 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ben
Top achievements
Rank 1
Ben asked on 27 Jan 2009, 02:48 PM
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

3 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 30 Jan 2009, 08:31 AM
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.
0
Quba
Top achievements
Rank 2
answered on 30 Jan 2009, 09:06 AM
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
0
Yavor
Telerik team
answered on 03 Feb 2009, 07:13 AM
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.
Tags
Grid
Asked by
Ben
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Quba
Top achievements
Rank 2
Share this question
or