Solved

Using asp:TabPanel

Posted on 2010-09-21
3
352 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Increase Agility with Enabled Toolchains

Connect your existing build, deployment, management, monitoring, and collaboration platforms. From Puppet to Chef, HipChat to Slack, ServiceNow to JIRA, Splunk to New Relic and beyond, hand off data between systems to engage the right people.

Connect with xMatters.

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…
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.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

717 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