Search Results

Search found 1325 results on 53 pages for 'radio'.

Page 11/53 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • How to make groupbox invisble on select of a radiobutton

    - by Aditya
    Hi, I am doing an Windows Application using XAML ,WPF in C#. I have 2 radio buttons called "WriteData" and "ReadData". when writeData is selected, I need groupbox with a textbox and browse button inside it to be displayed at a particular location, (this i have already designed in UI..) <GroupBox Header="Browse Data" Name="grpBrowseData" Height="78" VerticalAlignment="Top" HorizontalAlignment="Left" Width="1030"> <Grid Name="grdBrowse" Height="60" Width="1030"> <Button x:Name="btnBrowseButton" Margin="0,7.5,45,20" Content="Browse" Click="BrowseButton_Click" HorizontalAlignment="Right" Width="111" /> <TextBox x:Name="txtBxBrowseTB" Margin="46,13.993,185,17.5" Text="TextBox" TextWrapping="Wrap" TextChanged="BrowseTB_TextChanged" ></TextBox> <Label HorizontalAlignment="Left" Margin="-1.25,8.75,0,15" Name="label1" Width="47.5" FontSize="13" VerticalContentAlignment="Center" HorizontalContentAlignment="Center">Path:</Label> Now, if I select "ReadData" radio button, a combo box should be visible in the SAME LOCATION where the above groupbox is displayed, the xaml code for this <GroupBox Header="Select the Project" Name="grpSelectProject" Height="78" VerticalAlignment="Top" HorizontalAlignment="Left" Width="1030" Visibility="Visible" Margin="-1030,0,0,0"> <Grid Name="grdSelectProject" Height="60" Width="1030"> <Label HorizontalAlignment="Left" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Margin="0,11.662,0,20.825" Width="95.103">Select the Project</Label> <ComboBox Margin="119.952,13.994,493.969,16.66"></ComboBox> </Grid></GroupBox> so, how do I make only one visible as per the radio button selected. In the ReadData_click event i tried to make other groupbox invisble. but I wasnt able to do that. please help me. Thanks Ramm

    Read the article

  • select (or click) specific radiobutton using jQuery

    - by Oleg Babanov
    I am trying to make specific radiobutton checked on page load and tried a lot of ways, but no one worked for me. This is a part of orderform on my webstore. <input type="radio" name="sPaymentCarrier" id="pC_2-1" value="1;2;0.00" onclick="countCarrierPrice( this )" /> <label for="pC_2-1">0</label> Actually this radiobutton is the only on radiobutton on page, and it must be checked to let user make order. I tried $(function() { var $radios = $('input:radio[name=sPaymentCarrier]'); if($radios.is(':checked') === false) { $radios.filter('[value=1;2;0.00]').attr('checked', true); } }); and $('input:radio[name="sPaymentCarrier"]').filter('[value="1;2;0.00"]').attr('checked', true); but none of these ways worked. Also I tried a lot of other codes, but when I refreshed page I still saw this button unchecked. I guess maybe I have to set up jquery click on this button instead of select, but actually I cannot make this work. Any help is appreciated!

    Read the article

  • MVVM: Binding radio buttons to a view model?

    - by David Veeneman
    I have been trying to bind a group of radio buttons to a view model using the IsChecked button. After reviewing other posts, it appears that the IsChecked property simply doesn't work. I have put together a short demo that reproduces the problem, which I have included below. Here is my question: Is there a straightforward and reliable way to bind radio buttons using MVVM? Thanks. Additional information: The IsChecked property doesn't work for two reasons: When a button is selected, the IsChecked properties of other buttons in the group don't get set to false. When a button is selected, its own IsChecked property does not get set after the first time the button is selected. I am guessing that the binding is getting trashed by WPF on the first click. Demo project: Here is the code and markup for a simple demo that reproduces the problem. Create a WPF project and replace the markup in Window1.xaml with the following: <Window x:Class="WpfApplication1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300" Loaded="Window_Loaded"> <StackPanel> <RadioButton Content="Button A" IsChecked="{Binding Path=ButtonAIsChecked, Mode=TwoWay}" /> <RadioButton Content="Button B" IsChecked="{Binding Path=ButtonBIsChecked, Mode=TwoWay}" /> </StackPanel> </Window> Replace the code in Window1.xaml.cs with the following code (a hack), which sets the view model: using System.Windows; namespace WpfApplication1 { /// <summary> /// Interaction logic for Window1.xaml /// </summary> public partial class Window1 : Window { public Window1() { InitializeComponent(); } private void Window_Loaded(object sender, RoutedEventArgs e) { this.DataContext = new Window1ViewModel(); } } } Now add the following code to the project as Window1ViewModel.cs: using System.Windows; namespace WpfApplication1 { public class Window1ViewModel { private bool p_ButtonAIsChecked; /// <summary> /// Summary /// </summary> public bool ButtonAIsChecked { get { return p_ButtonAIsChecked; } set { p_ButtonAIsChecked = value; MessageBox.Show(string.Format("Button A is checked: {0}", value)); } } private bool p_ButtonBIsChecked; /// <summary> /// Summary /// </summary> public bool ButtonBIsChecked { get { return p_ButtonBIsChecked; } set { p_ButtonBIsChecked = value; MessageBox.Show(string.Format("Button B is checked: {0}", value)); } } } } To reproduce the problem, run the app and click Button A. A message box will appear, saying that Button A's IsChecked property has been set to true. Now select Button B. Another message box will appear, saying that Button B's IsChecked property has been set to true, but there is no message box indicating that Button A's IsChecked property has been set to false--the property hasn't been changed. Now click Button A again. The button will be selected in the window, but no message box will appear--the IsChecked property has not been changed. Finally, click on Button B again--same result. The IsChecked property is not updated at all for either button after the button is first clicked.

    Read the article

  • Deleting xml file using radio value

    - by ???? ???
    i using php to delete file, but i got table loop like this: <table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table"> <tr class="bg_tableheader"> <th class="table-header-check"><a id="toggle-all" ></a> </th> <th class="table-header-check"><a href="#"><font color="white">Username</font></a> </th> <th class="table-header-check"><a href="#"><font color="white">First Name</font></a></th> <th class="table-header-check"><a href="#"><font color="white">Last Name</font></a></th> <th class="table-header-check"><a href="#"><font color="white">Email</font></a></th> <th class="table-header-check"><a href="#"><font color="white">Group</font></a></th> <th class="table-header-check"><a href="#"><font color="white">Birthday</font></a></th> <th class="table-header-check"><a href="#"><font color="white">Gender</font></a></th> <th class="table-header-check"><a href="#"><font color="white">Age</font></a></th> <th class="table-header-check"><a href="#"><font color="white">Country</font></a></th> </tr> <?php $files = glob('users/*.xml'); foreach($files as $file){ $xml = new SimpleXMLElement($file, 0, true); echo ' <tr> <td></td> <form action="" method="post"> <td class="alternate-row1"><input type="radio" name="file_name" value="'. basename($file, '.xml') .'" />'. basename($file, '.xml') .'</td> <td>'. $xml->name .'&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp</td> <td class="alternate-row1">'. $xml->lastname .'</td> <td>'. $xml->email .'</td> <td class="alternate-row1">'. $xml->level .'</td> <td>'. $xml->birthday .'</td> <td class="alternate-row1">'. $xml->gender .'</td> <td>'. $xml->age .'</td> <td class="alternate-row1">'. $xml->country .'</td> </tr>'; } ?> </table> </div> <?php if(isset($_POST['file_name'])){ unlink('users/'.$_POST['file_name']); } ?> <input type="submit" value="Delete" /> </form> so as you can see i got radio value set has basename (xml file name) but from some reason it not working, any idea why is that? Thanks in advance.

    Read the article

  • How to stream a shoutcast radio broadcast in Flash (Shoutcast Flash Player)

    - by Jourdan
    I've been looking for a solution to this for years, but nothing is conclusively documented. There are many Shoutcast Flash players out there (e.g. radio.de) so I know it's possible. However, most of my research leads to this: s = new Sound(); s.loadSound ("url.of.shoutcaststream:8003",true); Which works for me in FireFox but not in IE. I don't want to buy a component, I want to know how those components do it so that I can build my own custom player.

    Read the article

  • Radio Button with html.radiobutton ASP.NET MVC

    - by vikitor
    Hello, I'm a newbie to all this ASP.NET MVC stuff, and I was making some tests for my project. I wanted to ask how is it possible to introduce a javascript function call from the html.radiobutton function. For example, how would you declare this: <input type="radio" name = "Kingdom" value = "All" onclick="GetSelectedItem(this);" checked ="checked" /> with html.radiobutton. I've been looking for some documentation, but I don't really get to understand, I guess it has something to do with the html object attributes, but don't really know the syntax and I haven't found any example. Thank you all in advance :) vikitor

    Read the article

  • How to sort a gridview once a radio button is selected

    - by metashockwave
    I'm trying to sort records in the gridview right after a radio button is selected. My approach is with the dataview, but because the dataset variable doesn't survive a round trip to the server, I don't know how to make this happen. please help! Public Sub GetCustomers() db.RunProcedure("usp_customers_get_all") db.doSort(radList.SelectedValue) gvCustomers.DataSource = db.MyView End Sub Protected Sub radList_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles radList.SelectedIndexChanged If radList.SelectedValue = 0 Then db.doSort(0) gvCustomers.DataSource = db.MyView End If If radList.SelectedValue = 1 Then db.doSort(1) gvCustomers.DataSource = db.MyView End If End Sub Public Sub doSort(ByVal strIn As Integer) If strIn = 0 Then MyView.Sort = "lastname, firstname" Else MyView.Sort = "username" End If End Sub Public Sub RunProcedure(ByVal strName As String) Dim objConnection As New SqlConnection(mstrConnection) Dim mdbDataAdapter As New SqlDataAdapter(strName, objConnection) Try mdbDataAdapter.SelectCommand.CommandType = CommandType.StoredProcedure Me.mDataset.Clear() mdbDataAdapter.Fill(mDataset, "tblCustomers") MyView.Table = mDataset.Tables("tblCustomers") Catch ex As Exception Throw New Exception("stored procedure is " & strName.ToString & " error is " & ex.Message) End Try End Sub

    Read the article

  • Javascript validation for radio button

    - by Priyanka
    Hello.I am doing newsletter subscription.I have 2radio buttons-subscribe and unsubscibe and a submit button.But when I click on submit button,ajax function gets called for subscription.Now i want to do validation.I have written a javascript validation for radio buttons as below: function validate_radio() { var radio_choice = false; var radio_val = document.newsletterform.subscribe.length; for (counter = 0; counter < radio_val; counter++) { if (document.newsletterform.subscribe[counter].checked) radio_choice = true; } if (!radio_choice) { document.getElementById("mandatory").innerHTML="Select Subscribe/Unsubscribe"; return false; } } But now I am getting the validate message but at the same time i am getting subscribed. tell me a way so that i can stop the subscription being done if the function returns false.

    Read the article

  • Best method to compress JSON string in term of performance and compress radio

    - by Eric Yin
    For a JSON string, contains all kinds of settings, numbers, string etc. Total JSON string fairly fall into 10k~50K range. I want to compress it before save to database. So I wonder which compress method should I choose, I am using c# 4, I know I can choose gzip and deflate but the compression radio is not good (although speed is good). More specific, compress can be a little slow (since only once) but should be small. Decompress should be lighting fast since decompress happens lots. Please give some advice.

    Read the article

  • Space bar and arrow keys on Radio buttons trigger TypeError: Error #1009

    - by Sr.Richie
    I've just discovered a bug in my app, it looks like a Flash player bug, i would like to know if anyone has found a workaround or something. I've some radio buttons groups in my app. If I press the arrow keys while holding the spacebar pressed, it ends up triggering TypeError: Error #1009: Cannot access a property or method of a null object reference. at fl.controls::LabelButton/drawIcon() at fl.controls::LabelButton/draw() at fl.controls::RadioButton/draw() at fl.core::UIComponent/callLaterDispatcher() If found this thread that describes my same situation. Do you think there's any workaround for this? Is it really a flash bug?

    Read the article

  • How to check a radio button based upon the enum value

    - by user281180
    I have an enum. Based upon the value brought by model, I have to check radio button. How can I do that? <%=Html.RadioButton("Role", Role.Viewer)%><%= .Role.Viewer%> <%=Html.RadioButton("Role",.Role.Reporter)%><%= Role.Reporter%> <%=Html.RadioButton("Role",Role.User)%><%= Role.User%> My enum would be having the numbers 1 to 3 for e.g. How can I check the Role.Viewer if enum value selected is 1?

    Read the article

  • how to add multiview in a radio button

    - by Naveen31
    protected void ddlto_SelectedIndexChanged(object sender, EventArgs e) { } protected void RadioButton1_CheckedChanged1(object sender, EventArgs e) { MultiView1.ActiveViewIndex = 0; } protected void RadioButton2_CheckedChanged(object sender, EventArgs e) { MultiView1.ActiveViewIndex = 2; } <asp:RadioButtonList ID="RadioButtonList2" runat="server" AutoPostBack="True" RepeatDirection="Horizontal" Font-Names="Arial" Font-Size="Small" onselectedindexchanged="MultiView1_ActiveViewChanged"> <asp:ListItem Selected="True">One Way</asp:ListItem> <asp:ListItem>Round Trip</asp:ListItem> <asp:ListItem>Multi City</asp:ListItem> </asp:RadioButtonList> i have a radiolist of thre buttons-one way,round trip and multicity, i have taken a multiview in which in view 2 i have added the codes codes,and i want to show that code when i click on the 2nd radio button i.e on round trip,how to do it. plzz help

    Read the article

  • Radio Buttons not highlighting as though they are selected

    - by Ryan
    I'm working on an android activity with a RadioGroup containing 10 RadioButtons. For some reason or another sometimes, only sometimes, when you select a RadioButton in the RadioGroup it doesn't highlight as if it's selected but through some tests I've determined that it really IS selected even though it isn't highlighted. Another odd thing that occurs is that when you select any other RadioButton in the RadioGroup and then try selecting your original Radio Button (the one that wouldn't highlight as though it were selected) it does highlight and functions as normal. Any idea why this is happening or how to fix it? Thanks!

    Read the article

  • Radio buttons + array elements

    - by Mark
    I have a form that can be dynamically duplicated (with JS) so that the user can enter as much data as he wants. This works great for text inputs, because I just leave the name attribute the same (ending with a []) and then when the values are posted, it just returns me an array. Now I just realized that this doesn't work so well for radio buttons, because the names actually need to be unique for each set. But from the data standpoint, each set only returns one value, so retrieving the data from the POST data wouldn't be a problem, it just screws up the functionality of my form. There's no way around this, is there? I'm just screwed and I can't use arrays?

    Read the article

  • How to change value by clicking radio buttons

    - by godistrue
    I am making a website in Adobe Dreamweaver with php. In the site there’s a 3 buttons for selecting payment method that will act as the continue button. What I want is when the user checks a radio buttons (I agree button), it will be add with that amount and display with previous amount.. there is three buttons which has the corresponding values(amount in pounds).. plz check my website http://www.spsmobile.co.uk in this linkgo to mobile phone unlocking and after add the cart click make payment it will go to next page there is a delivery mail details.. for that delivery mail details only am asking.. plz give some idea or code.. i tried but i can't get the result

    Read the article

  • ASP.NET Radio Button State and Back Key

    - by Dave S
    When using the browser back key on a page with radio buttons and using auto-postback, the state of the buttons (checked) stays the same while other parts of the page do not. This results in a situation where button two is checked and the cached page (because of server-side logic) displays a message that button 1 is checked. What is the best way to handle this situation? The following code example exhibits this behavior: [Form:] <asp:RadioButton ID="rb1" runat="server" AutoPostBack="true" Text="Button1" OnCheckedChanged="rb_CheckedChanged" GroupName="rbgroup" Checked="true" /> <br /> <asp:RadioButton ID="rb2" runat="server" AutoPostBack="true" Text="Button2" OnCheckedChanged="rb_CheckedChanged" GroupName="rbgroup" /> <br /> <hr /> <asp:Label ID="lbl1" runat="server">Button 1</asp:Label> [Code Behind:] protected void rb_CheckedChanged(object sender, EventArgs e) { if (rb1.Checked == true) lbl1.Text = "Button 1"; else lbl1.Text = "Button 2"; }

    Read the article

  • Grouping Windows Forms Radiobuttons with different parent controls in C#

    - by Jerry
    Hi, I've got a Windows Forms application in which I have a number of RadioButtons. These RadioButtons are placed within a FlowLayoutPanel which automatically arranges them for me. All RadioButtons that are directly added to the FlowLayoutPanel are grouped, meaning I can select only one of them. However, some of these RadioButtons are paired up with a TextBox so I can supply some argument there. But to have all this arranged properly, I add a Panel control to the FlowLayoutPanel so I can control the alignment of the RadioButton and TextBox relatively to each other myself. These RadioButtons now have their own respective Panels as parent controls and thus are no longer included in the radio group with the other RadioButtons. I read that the the RadioButtons that are in the System.Web.UI namespace have a GroupName property, but unfortunately their System.Windows.Forms counterparts lack this property. Is there some other way I can group these radio buttons are am I going to have to handle onClick events myself? Thanks, Jerry

    Read the article

  • Right-Align and Vertical Align label with checkbox/radio button CSS

    - by Jon
    Hi Everyone, I'm very close and have this working in Safari, Firefox and IE8, however IE7 the labels and radio buttons do not align vertically. My HTML is: <div id="master-container"> <fieldset id="test"> <legend>This is a test of my CSS</legend> <ul class="inputlist"> <li> <label for="test1">Test 1</label> <input name="test1" id="test1" type="checkbox" disabled="disabled"/> </li> <li> <label for="test2">Test 2</label> <input name="test2" id="test2" type="checkbox" disabled="disabled"/> </li> </ul> </fieldset> </div> My CSS Is: html{font-family:Arial,Helvetica,sans-serif;} #master-container{width:615px;font-size:12px;} ul.inputlist{list-style-type:none;} ul.inputlist li{width:100%;margin-bottom:5px;} ul.inputlist li label{width:30px; text-align:right; margin-right:7px;float:left;} Any suggestions? Thanks! EDIT: Based on the suggestion to check the rest of my html and css. I updated the code above and now it accurately demonstrates the problem. If I take font-size out of #master-container it lines up but then it is not the proper font-size. I tried to add a font-size to ul.inputlist li input but that didn't help. Any suggestions? Thanks for your help everyone!

    Read the article

  • Setting the value of a radio button with JQuery (ASP.NET MVC)

    - by Mario
    I have 2 "lists" of (4) radio buttons {value = "0", "1", "2", "3"} in all lists. The first list needs to drive the second list (which may occur multiple times). So if an option is selected in the first list, the SAME option is selected in the second list. It sounds weird, but it has a purpose. The first list is more of a "select all" type of list, and the second list is an individual selection list(s). I have the value of the "selectall" list via JQuery: $("#selectalllist").change(function() { var str = $('input[name=selectall]:checked').val(); $(".radiolist").attr('checked', str); //This is my thinking }); The current selected value is stored in the str variable, and that is seemingly correct (I used alert to tell me what is stored, and it comes up what I expect). I just need to set the value of the next set of lists. The second line of the code I thought would set the checked value of $(".radiolist") to the stored value, but it ALWAYS set the value to the last entry (value = "3"). I'm wondering if I have the wrong attribute in the .attr('', str) call? Any thoughts?

    Read the article

  • Calling a datatrigger for a radio button inside a datagrid

    - by Farax
    I have a datagrid with one column having a radio button. I want to set the GroupName when a certain condition is reached. Below is the code <Custom:DataGrid.Columns> <!-- ONLY ENABLED WHEN THE ITEM TYPE IS SINGLESELECT OR SINGLESELECT WITH ADDIOTIONAL DATA--> <Custom:DataGridTemplateColumn CanUserResize="False" MinWidth="20" > <Custom:DataGridTemplateColumn.CellTemplate> <DataTemplate> <RadioButton IsChecked="{Binding IsChecked}" d:DesignWidth="16" d:DesignHeight="16" GroupName="SingleChoiceSelection" Template="{DynamicResource RadioButtonTemplate}" Background="{DynamicResource BackgroundNew}" BorderBrush="#FF7A7171" Foreground="#FF6C6C6C" Margin="0" /> </DataTemplate> </Custom:DataGridTemplateColumn.CellTemplate> </Custom:DataGridTemplateColumn> <Custom:DataGridTextColumn Header="Choices" Binding="{Binding ChoiceText}" CellStyle="{DynamicResource DataGridCellStyle2}" MinWidth="150" /> </Custom:DataGrid.Columns> </Custom:DataGrid> The ItemSource contains a property called isChecked and I want to change the foreground color when isChecked is changed to true. How do i do this with a datatrigger?

    Read the article

  • JSF/Seam - call one component method for many radio groups

    - by purecharger
    I've got the following jsf page: <h:form> <ui:repeat value="#{list.categories}" var="cat"> <h:selectOneRadio id="sel1Rad" value="#{list.choose}" layout="pageDirection"> <f:selectItems value="#{list.names}"/> </h:selectOneRadio> </ui:repeat> <h:commandButton id="submit" action="#{list.submit}" value="Submit"/> </h:form> And a component named list. The variable cat is injected to the component, used by the method list.getNames(). What I am trying to have happen is to have list.choose() be called for each radio group. I'm not sure if this is possible with Seam. Going by the booking example distributed with Seam, there is a distinct separate method for each selectOneRadio or selectOneMenu group. Since I have an unknown number of categories, I can't / don't want to define a method for each possible choice. When I submit the form, all my choices are sent in the POST, I just don't know the correct way to tell Seam how to dispatch them to my component. Any help is appreciated!

    Read the article

  • ASP.Net radio button list

    - by c11ada
    hey all im trying to create a feedback form, i have a some mock code which looks similar to this for (int i = 1; i < 3; i++) { TableRow tr = new TableRow(); Table1.Rows.Add(tr); TableCell QuestionCell = new TableCell(); // get the text for the question and stick it in the cell QuestionCell.Text = "<b>"+i+".</b> Question " + i; tr.Cells.Add(QuestionCell); TableRow tr2 = new TableRow(); Table1.Rows.Add(tr2); // create a cell for the choice TableCell ChoicesCell = new TableCell(); ChoicesCell.Width = 1000; // align the choices on the left ChoicesCell.HorizontalAlign = HorizontalAlign.Left; tr2.Cells.Add(ChoicesCell); RadioButtonList rbl = new RadioButtonList(); rbl.ID = "Radio1_" + i; ChoicesCell.Controls.Add(rbl); rbl.Items.Add("1"); rbl.Items.Add("2"); rbl.Items.Add("3"); rbl.Items.Add("4"); } obviously this code doesn't mean anything, its just to experiment on how i can do this feedback form, the problem im having now is once some one presses the submit button (there's a submit button on the form) how do i go through the table and get text from the radio buttons the user has selected ?? the feedback from in created on page_load !! thanks for any help !!

    Read the article

  • Force close on clicking on radio button

    - by neos300
    Whenever I try to press a radio button on my emulator, it just force closes! public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button b = (Button)this.findViewById(R.id.btn_confirm); b.setOnClickListener(this); RadioButton radio_ctf = (RadioButton) findViewById(R.id.radio_ctf); RadioButton radio_ftc = (RadioButton) findViewById(R.id.radio_ftc); radio_ctf.setOnClickListener(this); radio_ftc.setOnClickListener(this); } @Override public void onClick(View v) { TextView tv = (TextView)this.findViewById(R.id.tv_result); EditText et = (EditText)this.findViewById(R.id.et_name); RadioButton radio_ctf = (RadioButton) findViewById(R.id.radio_ctf); RadioButton radio_ftc = (RadioButton) findViewById(R.id.radio_ftc); double y = 0; int x = Integer.parseInt(et.getText().toString()); if(radio_ctf.isChecked()) { y = ((double)x * 1.8) + 32; } if(radio_ftc.isChecked()) { y = ((double)x - 32) * 0.555; } String text = "Result:" + y; tv.setText(text);

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >