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

Rebind() in OnInit() breaks UpdateCommand

1 Answer 46 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brad
Top achievements
Rank 1
Brad asked on 31 Jan 2009, 01:43 AM
I need to update a grid during page initialization rather than later in OnLoad(). I'm calling Rebind() in OnInit() in order to cause NeedDataSource() to fire so that I can set the DataSource to what I need. Everything works except the UpdateCommand event. I can load items into the grid, click on an Edit button, and get the edit form to show up, but clicking Update doesn't fire UpdateCommand or ItemCommand.

Is there a simple workaround?

1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 02 Feb 2009, 04:47 PM
Hi Brad,

What is the purpose of the Rebind() call you placed inside the OnInit handler of the page? Note that the NeedDataSource event will be raised each time when the grid has to be rebound and simply removing your extra Rebind() call from the OnInit event handler will address the issue in question.
 
Regards,
Sebastian
the Telerik team

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