Solved

C# WinForms Development

Posted on 2004-10-08
1
251 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
1 Comment
 
LVL 9

Accepted Solution

by:
msdixon earned 500 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

815 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now