Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

C1.Win.C1Command.C1DockingTab

Posted on 2013-05-23
6
Medium Priority
?
1,168 Views
Last Modified: 2013-06-11
Form1.cs contains the C1DockingTab with 6 pages to enter data.
The application must move from page to page automatically when the bSave_Click event is happening.
It does moving in 98% of the time.  But sometime it does not. bSave_Click event happened, no errors, but new page does not get displayed.  The old one does.  I am trying to catch the situation but so far not successful.

Commands that supposedly does that moving from one page to the next page are these:

this.C1DockingTab.SelectedIndex = nextTab;
this.C1DockingTab.SelectedTab.Show();

Can you suggest another method so it is consistently moving from page to page?
0
Comment
Question by:Aquarus
[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
  • 4
  • 2
6 Comments
 
LVL 3

Expert Comment

by:TechSinger
ID: 39192534
You can programmatically change the selected tab to a specific tab by using SelectTab.  You can change it using the index, name, or object:

C1DockingTab.SelectTab(1)
C1DockingTab.SelectTab("TabPage2")
C1DockingTab.SelectTab(TabPage2)

If you are using the same code to go to the next tab, you can use a Private variable to keep track of which index the tab is at and increment it as the bSave_Click event is called.
0
 

Author Comment

by:Aquarus
ID: 39192656
I think that I must give more information of the process.
It is saving a lot of data before it must turn the page over.  And there is a command right before these 2 that I posted in the initial question.  The command is such:
System.Threading.Thread.Sleep(1500).  

So the code actually looks like this:
System.Threading.Thread.Sleep(1500).  
this.C1DockingTab.SelectedIndex = nextTab;
this.C1DockingTab.SelectedTab.Show();

When I commented out the Treading - the moving from tab to tab stopped being performed at all.

When I uncommented the threading - it is back to where it was - 98% of the time the tabs are switched, but in 2% - they stay in place.

May be I should catch the information about the "process before these lines" is completed.  
But I don't know how.

Can you suggest?
0
 
LVL 3

Expert Comment

by:TechSinger
ID: 39192678
I guess I'm having a hard time trying to visualize what you are trying to do.  How are you defining "nextTab"?  I don't think that is a native .NET property.

If you want to display a new tab before all code processing is complete, you will either need to do it in a different thread or use a timer control.  Even when refreshing a control, it doesn't always show the refresh until the code in its thread has completed.
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:Aquarus
ID: 39209181
Please read the attached document.  It has a code and clarification for the question I have.  Sorry it is long.  But I hope it will not be a problem. In the middle of the document there is a detailed question, that I put closer to the lines of code I am having the issue with.
private-void-bSave.docx
0
 

Accepted Solution

by:
Aquarus earned 0 total points
ID: 39227033
The issue happened to be in another Thread that was called by the event. And it made the form I am talking about enabled for any actions.  As soon as I figured this out I found the solution.
0
 

Author Closing Comment

by:Aquarus
ID: 39237153
I have found the solution myself.  None of the solutions suggested by experts was used.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

598 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