?
Solved

C# WinForms Development

Posted on 2004-10-08
1
Medium Priority
?
255 Views
Last Modified: 2012-06-27
My question is best given by giving an example. Lets say I developed a form called Form1 which has 2 panes called LeftPane and RightPane.  Contained on LeftPane are 2 labels, named Label1,Label2.  If I click on Label1, I want to change the contents on RightPane.  If I click on Label2 I also want to change the contents on RightPane.

This is kind of like using MS outlook where you click on inbox and the right pane shows your email.  If you click on your address book the right pane shows your contacts.

I just want to be sure that I do this correctly.  I had thought that I could make 2 more panes, contained inside of RightPane and when someone clicks on Label1, or Label2, I would just make the panes visiibility true or false.  But I am wondering if this is a good idea as I will be initially loading all the panes. (I feel that this is probably the hack way around this.)  So if anyone knows how to do this properly I would great appreciate the info.

Thanks!
0
Comment
Question by:sbreen
[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
1 Comment
 
LVL 9

Accepted Solution

by:
msdixon earned 2000 total points
ID: 12262761
you're going to take a performance hit, it just depends on when you want it.

if you load it all up front, the initial load will take longer, but hiding and showing data will be speedy.

if you load it on demand, the page will load quickly, but every time the user clicks on an item, they have to wait for it to load.

here's what i've done:

1. load the absolutely necessary information initially.
   (i set the cursor to Cursors.WaitCursor, and have the status bar let the user know the data is loading "Loading Data..." or somethign like that)
2. at the end of the load method (or init, or the contstructor -- wherever you're loading the data initially), i reset the cursor and status bar.
3. in a new thread i load the rest of the data. for instance i have master / detail grids. i fill all the details in the dataset for all of the master records. then, when they click on a master record, i filter the detail grid.

filter uses sql like statements. i.e. "[columnName] = 'value'"
grid.DataSource = new DataView(ds.Table[0], filter, "", DataViewRowState.CurrentRows);
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

770 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