Solved

Using asp:TabPanel

Posted on 2010-09-21
3
350 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 125 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 125 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

830 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