I've created a custom user control with a RadGrid in the control. I have several search results pages that get their data in different types of searches and end up on different pages, but the RadGrid displays the same fields and has the same actions, so instead of just copying functionality to a million places, I figured I'd create a user control and then just drop that user control on the pages.
Anyway, I need the actual code that is run in the NeedDataSource event to be called in the page including the User Control, not in the user control itself. So when the RadGrid needs a datasource, it fires the event, and that somehow fires another event to the page, the datasource is set, and then bound to the grid.
I'm not new to programming, but I am new to .NET and I'm not quite sure how to do this. I've read a little bit on OnBubbleEvent etc, but I don't quite understand how to make that work in this situation.
Edit: I'm using Visual Studio 2008 and C# as my programming language.
Any help would be greatly appreciated,
Stephanie
Anyway, I need the actual code that is run in the NeedDataSource event to be called in the page including the User Control, not in the user control itself. So when the RadGrid needs a datasource, it fires the event, and that somehow fires another event to the page, the datasource is set, and then bound to the grid.
I'm not new to programming, but I am new to .NET and I'm not quite sure how to do this. I've read a little bit on OnBubbleEvent etc, but I don't quite understand how to make that work in this situation.
Edit: I'm using Visual Studio 2008 and C# as my programming language.
Any help would be greatly appreciated,
Stephanie