disabled-control

Posting changed values of a disabled control in ASP.NET

孤街浪徒 提交于 2019-12-12 05:06:09
问题 EXAMPLE <asp:TextBox ID="txbx" runat="Server" Text="1" Enabled="false" /> A textbox with value '1' is set to disabled. The texbox value is updated to '2' using javascript. When posted to the server the intial value '1' is used. I have tried overwriting this functionality with the following VB Code: Page.Form.SubmitDisabledControls = True QUESTION Why doesn't the updated value post to the server? NOTES The updated value post correctly '2' if enabled="true" <asp:TextBox ID="txbx" runat="Server"

Disable NSTextField without changing color of multi-colored text

拈花ヽ惹草 提交于 2019-12-12 01:33:02
问题 Whenever I disable an NSTextField the text loses its color and changes to gray. How can I disable the text field and keep the text color? In my particular situation some words are colored red. I'd like those words to stay red when I disable. 回答1: You need to subclass NSTextField to do that. See this CocoaBuilder thread: - (void)setEnabled:(BOOL)flag { [super setEnabled:flag]; if (!flag) { [self setTextColor:[NSColor secondarySelectedControlColor]]; } else { [self setTextColor:[NSColor

How to disable copy,paste options in UITextView and enable it again iPhone app?

痴心易碎 提交于 2019-12-11 16:29:57
问题 Am working in UITextView based iPhone app. In one of my screen i having 3 UITextView when the user tap on the screen am showing UIMenuController with custom MenuItems. In this scenario UITextView is in Active means UITextView is becomResponder. So when i show UIMenuItem taping the screen UITextView UIMenuController showing with "Paste" option. I want to disable UIMenuController item from UITextView when the user touches the screen. Could you please anyone tell me how to disable UITextView

WebView Disable DoubleTap

你离开我真会死。 提交于 2019-12-11 08:06:08
问题 I am developing an android application and successfully disabled zoom-in, zoom-out by swiping. But I have failed to disable double tap zooming. Is there an obvious function to use? Thanks. Here is my code, webview.getSettings().setJavaScriptEnabled(true); webview.getSettings().setLoadWithOverviewMode(true); webview.getSettings().setUseWideViewPort(true); webview.getSettings().setBuiltInZoomControls(false); webview.getSettings().setDisplayZoomControls(false); webview.getSettings()

Disable a row in jQGrid

冷暖自知 提交于 2019-12-11 05:27:37
问题 I want to disable 1 row on my grid depending on the value of a global javascript variable. For example, lets say the value of this variable is 123. Then any row which has 123 in a column called "XYZ" should be disabled. where would be the best way to implement such a functionality ? inside loadcomplete or beforeselectrow ? Thanks 回答1: The best way for inline editing mode is adding not-editable-row class to the row. You can use rowattr to add the class based on the content of some column. See

How to protect an asp:textbox from user input?

此生再无相见时 提交于 2019-12-11 02:49:16
问题 How to protect an asp:textbox from user input? DISABLE IT <asp:TextBox ID="txbx" runat="Server" Text="1" Enabled="false" /> PROTECT IT <asp:TextBox ID="txbx" runat="Server" Text="1" ReadOnly="true" /> I wish to protect the textbox as above from user input but still allow the value to be updated with javascript. This works fine so what's the problem? THE PROBLEM If a textbox is disabled or readonly the updated values will not post to the server when submitted! QUESTION How to create a textbox

Disabling Listbox is not changing background color in style

一个人想着一个人 提交于 2019-12-10 13:44:30
问题 I have this simple style that does not change the ListBox Background when the ListBox is disabled: <Style TargetType="ListBox" > <Style.Triggers> <Trigger Property="IsEnabled" Value="True"> <Setter Property="Background" Value="Red"/> </Trigger> <Trigger Property="IsEnabled" Value="False"> <Setter Property="Background" Value="Orange"/> </Trigger> </Style.Triggers> </Style> Snoop does not help me on this one and I cannot figure a simple way without overriding templates. Anyone have a simple way

Change Button Background when is not enabled

时光毁灭记忆、已成空白 提交于 2019-12-10 12:36:05
问题 I need to change my Button background (as SolidColorBrush for example) only when it is not enabled ( IsEnabled == false ). How can I do? Have I to modify the Button Style using the XAML or can I do this work programmatically? What is the correct XAML code, to change only the Background when it is not enabled? I tried the following XAML code but it has no effect: <Button> <Button.Style> <Style TargetType="Button"> <Style.Triggers> <Trigger Property="IsEnabled" Value="False"> <Setter Property=

AngularJS ng-disabled not working with list items

蓝咒 提交于 2019-12-10 12:35:55
问题 I am facing a problem with disabling a item in the list. <div id="searchdropdown"> <ul> <li>list1</li> <li ng-disabled="someCondition" ng-click="changeStatus()">list2</li> <li>list3</li> </ul> </div> It does not work with ng-disabled . I also tried with: <li ng-class="disabled:someCondition" click="changeStatus()"> list2 </ li> It also does not work. Can anyone suggest something? 回答1: I'm assuming it is a search box of some kind. ngDisabled is really used for interactive elements and not list

disabled dropdownlist does not keep selected value on postback

情到浓时终转凉″ 提交于 2019-12-10 09:56:11
问题 I'm getting a weird behavior with a dropdownlist when I trigger a postback. If the dropdownlist is enabled, the selected value remains the same after a postback. However, if the dropdownlist is disabled (via a javascript when user ticks a checkbox), then the selected value is reset to the first item in the list. How come ? 回答1: you need to look up the value manually (probably store it in another field or so), and then set it yourself in the code behind. This is because if a control is