MVC Checkbox 'disable' true issue - asp.net-mvc-2

I have two controls ControlEdit and ControlView with some inputs and checkbox and two views ReadOnly and Edit, I was using MvcContribn checkbox helper to make checkbox disable I did set attribute disable to true on defaultView(here I am loading ControlView) by default user chant make any changes on that view, then if user click change button he comes to edit view (ControlEdit) and here everything enabled.
For some reason every time on EditView check box became unchecked. I was trying to use default check box html helper - the same story.
On edit view it is always becoming unchecked. When I remove disable true attribute on ViewControl then it is became working and in that case check box does not loosing his state on EdivVew.
Then I was using jQuery to set checkbox disable, didn't help. I did look different browsers the same story everywhere. I am getting correct behavior only when i does not setting disable to true on ReadOnly view.
May be somebody come across that. Need help.

-FIXED-
Finally I fixed that,
I wrapped checkbox in to div and make checkbox disable inside div like this
$('#DivWrapper :input').attr("disabled", true)

Related

How to toggle browser_spellcheck dynamically in tinymce

I've a custom toolbar button, which is used to toggle the browser's spell check. I've used
browser_spellcheck : true
in the initialization. Now if we press button, then i need to 'off' the spell check.
So, how can we set browser_spellcheck to false dynamically?
You cannot change the init settings of TinyMCE dynamically - it simply does not allow that to happen. If you need to change a setting like this you would need to use the remove() and init() APIs to reload the editor with new settings.

MS Access Form Development: Hide Objects when an Option Button is Pressed without coding for each Object that needs to be hidden

MS Access Development Question:
I have 3 options and I need each one associated with a different set of objects. Therefore, if you click option 1, a set of objects will appear in a box I'm referring to as "Report Parameters". If I click option 2, the objects in the "Report Parameters" box will disappear and a new set of objects will appear.
I didn't want to write code to switch each object from visible = true to visible = false. I thought that would take too long, especially if the number of option buttons or the objects related to it grow.
So I'm trying several things...
I tried putting all objects, that relate to a particular option, in a Subform. Therefore, I would have three subforms and that would sit in the same position on my main form. When you click on an option, the subform for that option is made visible any anything else is hidden. But I have a background picture that needs to be visible on the main form and you can't make the subform background transparent.
I used Tab Controls; however, I didn't want to use the tabs to control the switch between objects. I can hide the tabs but you can still switch between them if you click the space where the tab should be. It can be made transparent though so that helps a lot.
I need something in-between a Subform and Tab Control but I've hit a dead end. Does anyone have any other suggestions or recommendations? Or am I stuck coding for each object?
I'm an experienced VBA developer. My last option was to run a query against the form and pull all object names and save it to a table. Since the syntax of the name for each object connects it to a button, I can always run a loop that makes all objects visible/invisible if the object's name corresponds with a specific option... but... I guess I'm trying to find a shortcut. Let me know what you think! Thanks.
I was able to resolve my issue. I just needed to do some thinking... so writing up this question was a bit premature. I'll write down what I did in the event that someone has the same issue I have.
First, I used the Tab Control object to resolve my issue. I made the control transparent and named each page to reflect the Option Button I was selecting.
I then mapped each option to a button in the VBA code of the button. Therefore, when the button is selected it does several things.
First, it makes the default value of any of the other options equal to false. I also set the visibility of their corresponding pages to false.
Second, I select the page I need visible and set the visibility to true. I also make it my active page.
Lastly, as a safety measure, if the option button is already selected, and you select it again, by setting the value of that option to true. This is to prevent it from changing to false. One option should always be selected.
Hope that all made sense!

Access Menu sub form - No default Tab stop

I have a main form...imagine that...that for most of my users will be the only form they use. Naturally, it contains tabs with sub forms.
I have a navigation sub form on the left side of this form that changes based on the user's rights level. Currently, this sub form is all buttons...and 1 always is selected as the default tab stop for that form.
I don't want to highlight any of them at first...and I can remove the highlight by switching off Tab Stops for all buttons. However, I'm not sure that I want to remove that functionality all together...and it still highlights a button. I'd just like for there to not be a default button highlighted.
As you can see, Add Course is 'selected'. I can't seem to find the correct terminology to search for a way to do this. I tried using a smaller button set behind another button, but since it has the focus, it moves to the front. Using a text field with the same colors as the background shows the cursor in a random, blank area...not visually ideal.
I'm sure that there is someone here clever enough to have this figured out. Please enlighten me. I don't care if this can be handled in VBA code or through design view.
"Focus" is the word you're looking for - you don't want any visible control to have the focus when opening the form.
The easiest method is an invisible button: create a button with Transparent = True, and an empty OnClick (i.e. the button does nothing, even when accidentally clicked).
Move this button to the top in the Tab Order, so it has the focus when opening the form.
But if your users use TAB to walk through the buttons, there will be one position where the focus disappears (when circling around from the last to first control). I don't know if it will confuse them.
Create a button on the main form itself.
Named is cmdDummyButton with the following GotFocus event code.
Set the tab order property to 0 (ie first)
Make the button transparent.
This will cause no control on the form to have the focus when it starts up.
Private Sub cmdDummyButton_GotFocus()
Static IveHadFocusAlready As Boolean
If Not IveHadFocusAlready Then
Me.cmdDummyButton.Enabled = False
IveHadFocusAlready = True
End If
End Sub
Sweet.

Sencha Touch/Ext: How to disable a Form inside a Tab Panel (tabpanel) without disabling the Tab

I have a simple Tab Panel (tabpanel) where each Tab is a Form. By default, I want the Form to be disabled (read only), and editable once the user taps the Edit button. By setting the "disabled" config of the form, the Tab is also disabled (cannot tap it).
How can I disable the form while keeping the Tab enabled? I have a couple of solutions to fall back on, but I'm hoping for something cleaner/simpler.
My solutions so far:
Make the Tabs Containers and place the Form inside the Container
Disable at the Fieldset level
My current solution uses the Tab Panel's "initialize" event handler and calls "setDisabled(true)" on each Form Panel.
onTabPanelInitializer: function(component, options){
component.query('formpanel').forEach(function(element, index, array){
element.setDisabled(true);
});
}

how to design hidden field in android and it will appear when we click it

i am try use hidden field like Div tags in android for hiding some field and when we will click that button the related fields will appear.
try setting visibility to GONE this will remove the display. You can then set it to visibile. This will remove the view completely but everything else will still line up properly. If you want to just make it invisible there is an invisible setting too.