radiobuttonlist

Change color of disabled radiobutton list element

落爺英雄遲暮 提交于 2019-12-24 22:58:18
问题 I've got a radiobuttonlist with a bunch of list items, some of them disabled. The label control beside the radio button turns gray, which can be hard to read. How do I change the color of the label? I've tried CSS, changing the forecolor - nothing seems to work: currentButton.Attributes.Add("class", "disabled"); Any ideas? 回答1: Although I've never used asp.net built-in controls, I'm guessing here that your RadioButtonList is trying to be smart enough and renders some CSS (inline or class/id)

CustomValidator textbox required on radiobuttonlist select

只愿长相守 提交于 2019-12-24 14:11:53
问题 On my page I have a Radio button list and a textbox. The textbox is hidden by default then appears if the user clicks yes. Once they click yes then the textbox must be filled in before they can proceed. I've put in the following code, however it doesn't seem to work at all and when the button is pressed to go to the next page it continues instead of stopping and asking the user to enter something in the box. function Q12iYes() { document.getElementById('txt12i').style.display = "block" }

How to wrap long radiobutton label in extjs

会有一股神秘感。 提交于 2019-12-24 12:06:09
问题 My above radion button wraps the label, but it is not aligned properly. It should align right below the first text on the top. Is there a config I have to set inorder for the labels to wrap correctly. 回答1: Im pretty sure there is no config to do this. Only reasonable way is by fiddling with CSS - How to align checkboxes and their labels consistently cross-browsers +In current version (4.2.1.), there is a bug, which wraps whole label text under the radio (see here). 回答2: By looking at what

RadioButtonList Inside Repeater OnSelectedIndexChanged Not Firing

坚强是说给别人听的谎言 提交于 2019-12-24 11:10:00
问题 I have a RadioButtonList inside a Repeater. I have AutoPostback set to "true" and the OnSelectedIndexChanged defined. When I selected a different radiobutton in my list the page does postback, but my defined OnSelectedIndexChanged event is not catching or firing. Not sure what I am missing. Here is my markup and codebehind: 回答1: Use the repeater's itemcreated event to bind your eventhandler: protected void Repeater!_ItemCreated(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType ==

reset button in angular js

独自空忆成欢 提交于 2019-12-23 07:39:01
问题 I have a "clear" button, once user hit it all the data in container,all binding and the radio buttons should be reset (like initially). Currently only the view becomes empty but the container has still the old value. How can I fix it? <div class="field"> <textarea name="price" ng-model="list.price"></textarea> </div> <input type="radio" ng-model="list.phone" value="1" />cell <input type="radio" ng-model="list.phone" value="2" />home <button class="btn btn-primary btn-large center" type="reset

how to create datasource for radiobuttonlist?

让人想犯罪 __ 提交于 2019-12-23 07:36:55
问题 I want to create several items for radiobuttonlist by myself, the item has text and value properties. How to do it in c#/asp.net? Thanks in advance. 回答1: You can us a Dictionary object to store the key/values and bind it to the RadioButtonList like so: Dictionary<string, string> values = new Dictionary<string, string>(); values.Add("key 1", "value 1"); values.Add("key 2", "value 2"); values.Add("key 3", "value 3"); RadioButtonList radioButtonList = new RadioButtonList(); radioButtonList

How to add objects to a RadioButtonList based on random order ?

北城余情 提交于 2019-12-22 12:41:10
问题 I am creating a radio button list in the back end of the system. Is there any method that let me display items with random order ? My Code : <asp:radiobuttonlist id="RadioButtonList1" runat="server" TextAlign="Right" CellPadding="10" RepeatLayout="Table" CausesValidation="True" CssClass="radioAnswers" ClientIDMode="Static"></asp:radiobuttonlist> c# RadioButtonList1.Items.Add(New ListItem(rsQuestion("a"), "A")) RadioButtonList1.Items.Add(New ListItem(rsQuestion("b"), "B")) RadioButtonList1

How to add objects to a RadioButtonList based on random order ?

不想你离开。 提交于 2019-12-22 12:39:12
问题 I am creating a radio button list in the back end of the system. Is there any method that let me display items with random order ? My Code : <asp:radiobuttonlist id="RadioButtonList1" runat="server" TextAlign="Right" CellPadding="10" RepeatLayout="Table" CausesValidation="True" CssClass="radioAnswers" ClientIDMode="Static"></asp:radiobuttonlist> c# RadioButtonList1.Items.Add(New ListItem(rsQuestion("a"), "A")) RadioButtonList1.Items.Add(New ListItem(rsQuestion("b"), "B")) RadioButtonList1

Radiobuttonlist event not always firing

♀尐吖头ヾ 提交于 2019-12-21 20:33:56
问题 I have a radiobuttonlist with a selectedindexchanged event that updates a search function. One of the items is specified in the aspx, and the others are appended databound items. No matter what I set as the default, that item will not fire the event. All other items will fire the event. Also, it seems that after the "dead" item is selected, the event won't fire at all. How can I track down the error and correct? Here is current code. EDIT: Sorry if the short version was misleading. I wasn't

How to Find selected item from radiobutton list using javascript

≯℡__Kan透↙ 提交于 2019-12-19 03:44:19
问题 I need to find selected item from radiobutton list using javascript... Here is my code <asp:RadioButtonList name="test" ID="RadioButtonList1" runat="server"> <asp:ListItem Text="List1" Value="1"></asp:ListItem> <asp:ListItem Text="List2" Value="3"></asp:ListItem> </asp:RadioButtonList> <asp:Button Text="test" runat="server" OnClientClick=" GetListItem()" /> script: <script type="text/javascript" language="javascript"> function GetListItem() { var id = document.getElementById("<%