Few different things you could look at depending upon the level of
sophistication and complexity and size of data set returned.
Simplest
Postback to the page from the buttons. Populate and make the
appropriate gridview visible.
Whilst this is simple it will cause the browser to refresh the page on
the postback.
AJAX
Put the buttons and gridviews in an update panel and do the same as
the above.
This has the advantage that there is no "flicker". However, you get
the overhead associated with using an update panel.
JavaScript/jQuery
Populate both gridviews on page load and bind some JavaScript to the
menu items.
This has the advantage that their is no reload of the page but you do
have to send all of the data for both gridviews to the user on the
page load. If you have large data sets then performance would be an
issue.
Hope this helps,
Mark
I have a web form. Where I have menu items and when in the same page I have a
conten holder where I have to show Grid views. e.g if I click on MenuItem1
it should show GridView1 in the same page. If I click on MenuItem2 it should
show Gridview2 and so on. How can I do that.
--
|\ _,,,---,,_ A picture used to be worth a
ZZZzzz /,`.-'`' -. ;-;;, thousand words - then along
|,4- ) )-,_. ,\ ( `'-' came television!
'---''(_/--' `-'\_)
Mark Stevens (mark at thepcsite fullstop co fullstop uk)
This message is provided "as is".