Hi
I have a grid that i use on several different pages. Naturally i don't want to keep copying the grid formatting and template definition and item data bound events from page to page so i thought i would put it in a reusable control.
The problem i am facing is that the different pages that use the control display different sets of data so the logic in the NeedDataSource event is completely different on the different pages.
Could i do something like bubble up the NeedDatasource event so it is handled by the page that uses the control. That doesnt seem a very nice design. Certainly doesn't seem in keeping with the whole principle of information hiding and the like but it's the only thing i could think of
any other suggestions heartily welcomed!
I have a grid that i use on several different pages. Naturally i don't want to keep copying the grid formatting and template definition and item data bound events from page to page so i thought i would put it in a reusable control.
The problem i am facing is that the different pages that use the control display different sets of data so the logic in the NeedDataSource event is completely different on the different pages.
Could i do something like bubble up the NeedDatasource event so it is handled by the page that uses the control. That doesnt seem a very nice design. Certainly doesn't seem in keeping with the whole principle of information hiding and the like but it's the only thing i could think of
any other suggestions heartily welcomed!