?
Solved

Using asp:TabPanel

Posted on 2010-09-21
3
Medium Priority
?
355 Views
Last Modified: 2013-11-07
I'm using a tab panel to display the same grid, just with different data, depending on which tab is selected.  E.G., I have a tab for New Records, Pending Records, and Active Records.  My datagrid is quite complex, so I'd like to write it once, then just change my SelectCommand dependent on which tab is selected.

How do I do this?  The way I'm doing it, I use three separate grids, one withing each TabPanel.  Thanks -

Justin
0
Comment
Question by:JT_SIRO
3 Comments
 
LVL 1

Accepted Solution

by:
mrbvh earned 500 total points
ID: 33732332
you could create one grid and keep a reference in your global form. If your code is triggered to change the tab page, you can change the parent object of your grid to the new selected tab page. that way you can change the datasource or something else, but the same grid is used on every tab page...

Hope this infomration is useful to you!

Regards
Ben
0
 
LVL 6

Assisted Solution

by:thaytu888888
thaytu888888 earned 500 total points
ID: 33732418
- On ActiveTabChanged, change SelectCommand dependent on which tab is selected, and move the grid to the selected tab, code example: tabNewRecords.Controls.Add(gridRecord);
- Hope this help!
0
 

Author Closing Comment

by:JT_SIRO
ID: 33852809
good solutions
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question