I have multiple results sets coming back from a server request against a datasource. I want to organise these with a WinForms tabPage for each result set, on a single tabControl. I am displaying the data in a DataGridView, but want to avoid having a DataGridView instance on each tabPage - I'd rather intercept the "switching to new tab page" message, and load up the appropriate results set from my local cache. Is there an easy/obvious way to do this?
A:
Why would you want to do this? You'd lose the designability per result set (unless they're all the same structure) and have to manage all of this yourself.
Adam Robinson
2009-04-16 14:20:35
They are all the same structure, it's multiple results for different parameters.
endian
2009-04-16 14:24:28
+1
A:
Create a tab control as usual and then put a DataGridView on top of it (be sure not to put it inside a tab page).
Subscribe to the SelectedIndexChanged event and reload the data when the event fires.
Gerrie Schenck
2009-04-16 14:20:54