Solved

C# WinForms Development

Posted on 2004-10-08
1
254 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 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

Technology Partners: 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

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

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