How to toggle visibilty of a Wizard Page of Devexpress XtraWizard control - c#

I have a problem: I am using devexpress wizard control and want to toggle visibility of wizardpage on the basis of a checkbox input.
Problem:
If suppose checkbox A is checked then wizard page X must be visible while going to and fro in wizard control else page should not be visible.
What I have tried:
tried to toggle visibility in SelectedPageChanging event - didn't get success
tried to add or remove page from parent control - didn't get success
Please help me out in this..

You could:
handle the SelectedPageChanging event.
Check the Page property of the event arguments is the page right before the page to show/hide.
If true, set the Cancel property to true.
Set the SelectedPage to your desired page, depending on your checkbox A's state.
You could also optionally theck the Direction property to see whether the user is navigating forward or backward.
General hint:
When dealing with DevExpress questions/issues, the DevExpress Support Center always was the most useful location to ask my questions or browse for solutions.
Even Stack Overflow cannot compete with there speed and depths of anwsers (IMHO).
So if my answer (or the other answers) do not satisfy your need, I would recommend that you go to the Support Center and ask there for advise.

I got this from devexpress below is the link for the same
How to prevent a specific page from being activated

Related

Disable auto grouping on Windows forms

I read a question on the subject here, but the provided answer doesn't fit my case, and like said, "is a bit overkill".
I have a bunch of radio buttons in a table layout panel on a form, and .NET has decided to manage them on its own, unchecking the others when one is checked, and I don't want that.
From what I understood this is due to .NET grouping controls inside of a same container.
How do I disable that ?
Thanks.
Set the AutoCheck property to false on each RadioButton and then handle check/uncheck logic in the Click event.

Tab control - wait until control become enabled

I have multiple controls on one form,and when i select some value from combo box(for example 1) next control became enabled, else next control stay disabled.
Problem is that if i just press 1 and tab, after that next control became enabled, but program jump over it just like control are still disabled, and tab control selecting next control.
I need to find way how to tab check is control become enabled and go on this control,and if control are still disabled that go on next enabled control.
Thanx
You created a mousetrap for the user, very hard to escape from. Technically you can handle the keyboard navigation by trapping the Tab key before it can be used to navigate but the user still has an unsolvable problem when he wants to use the mouse to change the focus. He has nothing decent to click on.
You'll need to re-think your UI design. One possible solution is to change the ComboBox's DropDownStyle to DropDownList. Which ought to be pretty appropriate if you use its selected item to enable other controls, there should only be a limited set of valid selections. If that's not what you want then you need to do something drastic. Not necessarily limited to hiding controls instead of disabling them.
This is probably caused by the event of the combo-box you using to control your flow.
The "Changed"/"Value changed" events in most languages fire up after the control has lost focus.
You forgot to add a tag for the UI technology you are using.
If you are using WinForms, then you can try to execute the SelectNextControl method on your control that the user just edited. This will find the 'next' control for you, and activate it.
Lets assume it's winforms (playing with disabled/enabled like this in wpf is.. against mvvm rules).
Firstly, ensure what tab order/index of your controls is ok. To test, if they are all enabled, then pressing Tab should go through them in the right order. This can be seen easily
Next thing is to choose one of many possible solutions, to make 1,Tab to work:
disable Tab key navigation at all;
make controls to pass control (focus) to specific control (making tab order irrelevant);
use SelectNextControl (work best for custom controls, which when will support that tab-flow schema);
prevent focus changing, do all logic, change focus (theoretically).

DataGridView cannot be Focused, but one of them can

I've come across the strangest bug pertaining to DataGridViews in Windows Forms.
I have a TabControl, that is supposed to contain a docked DataGridView in each tab page. I thought it would be convenient that the grid is focused upon changing the tab page, so that the user could simply hover the mouse over the grid and start scrolling when he changes the page. So, I just put a grids[tabs.SelectedIndex].Focus() in the event handler for changing the tab page.
However, something really strange happened. In my test application, I have three tab pages. If I try scrolling the grid right after starting the application, it doesn't work; I have to click in the grid first. I was expecting this. However, if I change the tab page, I can't scroll in any of the other grids until I click, except for the first one!
So, if I switch pages to the second page, then back to the first, I can automatically scroll that grid without clicking, but if I then switch to the third, I have to click for the grid to focus.
I had a look at the CanFocus properties of the grids, and it seems that only the first grid has it set to True. They are all created programmatically, and all in the same way. I don't see why they would be different.
Any ideas?
Inactive tab pages have their Visible property set to false. The documentation for CanFocus says:
In order for a control to receive
input focus, the control must have a
handle assigned to it, and the Visible
and Enabled properties must both be
set to true for both the control and
all its parent controls
Well, I solved it. Stupid programming error on my part, I had grids[tabs.TabIndex].Focus() instead of grids[tabs.SelectedIndex].Focus().
Oh well.

Telerik RadControls RadFormDecorator - Tow Problem About Positioning

i am using asp.net with c# web app in vs 2008
problem 1:
i do not know why Telerik RadControls- RadFormDecorator Moves some controls (such as Buttons or chech boxes) and changes their positioning up or down in my form after viewing in browser...
i put those controls in a cell of a table ... but not help
i had this problem about radajaxmanager and by setting UpdatePanelsRenderMode property to inline problem solved - but here there is no property like that...
what is going on here?
problem2:
i decorated my buttons and chechboxes with radformdecorator (telerik radcontrols) control...
when i click on a checkbox to set it to true or false so my webpage positioning goes to up (like when postback occurs , but this is not postback)
how can i prevent this problem ?
thanks for attention
This happens in some scenarios because of the way RadFormDecorator styles checkboxes - real checkboxes are hidden outside of the viewport. When the decorated checkbox is clicked however, browsers try to focus the real checkbox, hence the "jumping". To avoid that, you should set position:relative to the parent container.

How do I set a TreeView Check box to partially checked?

I have a asp.net treeview control that I need to be able to set a parent node to partially checked to show that child nodes are checked. Basically I need a 3 state or multi-state checkbox. All I can see from looking through the code is ways to set checked true or false.
Thanks.
There is no 3-state or multi-state checkbox in the .Net framework, mostly because this functionality isn't supported in HTML for a checkbox. There are a number of third party components which do this (such as "FolderView" controls). Or you could pretty easily roll your own server control for this. Sorry for the bad news.
I've done this before. What you essentially do is keep track of the state of the underlying checkbox. Utilizing a custom javascript class and CSS sprites for your images, you overlay the checkbox with the appropriate image.
Here is a quick example I found
http://www.codeproject.com/KB/aspnet/TriStateCheckBox.aspx
Here is the concept of CSS Sprites and the tri-state checkbox. I've done something along these lines.
http://shamsmi.blogspot.com/2008/12/tri-state-checkbox-using-javascript.html

Categories

Resources