Radgrid needdatasource not updating

20 Apr

If, at the time of the event, the Data Source property is not set to a valid data source object, the grid will not behave correctly.This event fires in the following cases: The advantage of using the Need Data Source event is that you have the flexibility of generating your data source in the code-behind, but you are freed from handling the logic of when and how data binding should take place. NET AJAX and its functionality to Insert/Update/Delete content items.First we need to create a template for our custom control.Therefore when the Data Source property is not null, that should mean that there is 'NO need for a data source'.Therefore quite naturally the Need Data Source event will not get fired when you rebind the grid.

radgrid needdatasource not updating-34radgrid needdatasource not updating-46

So you're using telerik, and you want your Need Data Source method to get called when you rebind. Just got the same error so this time, decided to put it down here. Rebind(); Description: Most likely you are not adhering to the standard way the Rad Grid is supposed to be implemented (which is OK in my opinion).

It is still your responsibility to properly construct a data source object and assign it to the Rad Grid's Data Source property.

Important: You should never call the Rebind () method in a Need Data Source event handler.

You should never call Data Bind () as well when using advanced data binding through Need Data Source .

For Microsoft Grid View -like data binding, see Simple Data-binding.