First we need to create a template for our custom control.
In this template I will put the following controls: In this template I subscribed for the On Client Load event of Rad Combo Box control.
Since Rad Grid saves all of its structure properties (Detail Tables, Columns, etc.) into the View State, building a Rad Griddynamically is a task very similar to creating and adding controls dynamically to a web page.
See following two scenarios offer possible approaches to dynamically create a Rad Grid that ensure that Rad Grid will behave normally. Detail Table Data Bind = new Grid Detail Table Data Bind Event Handler(this.
Need Data Source, New Grid Need Data Source Event Handler(Address Of Me.
Detail Table Data Bind, New Grid Detail Table Data Bind Event Handler(Address Of Me.
Therefore quite naturally the Need Data Source event will not get fired when you rebind the grid.
You can remove the provider from the list if you add a condition inside the "if" check in the GCProviders method, like: if (provider ! Here I set the path to my template which has Rad Grid, Rad Combo Box, Rad Ajax Manager Proxy and Rad Ajax Loading Panel declarations.
I created a new property for the provider name which gets the value from the Rad Combo Box Selected Item.
As some of the providers like Generic Content and Wiki have different metakeys for the "Title", I had to dynamically change the Grid Bound Column value inside Grid's Pre Render event handler and then rebind the grid.
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).
When you create the structure using the designer (in Visual Studio) there is less of a chance that mistakes will be made.