Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Radio Buttons in a Modal popup not updating checked status

Radio Buttons in a Modal popup not updating checked status

Scheduled Pinned Locked Moved Web Development
sysadminhelpannouncement
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Broken Bokken
    wrote on last edited by
    #1

    I'm using the 3.5 version of ajax. I have a panel set tp be a modal popup, and inside I have a few radio buttons, a text box for a comment, and a button. The button submits fine, but the radio buttons are not retaining their checked value. I can set the selected value and it shows it as selected when the popup appears, but if I click any of the radiobuttons, none of them show as selected. If I click the botton, the checked property is false for all of them.

    <asp:Panel ID="panelOutcomePopup" CssClass="OutcomePopup" runat="server" style="display:none;">
    <div class="PopupHeader">
    <table width="100%" cellspacing="2px" cellpadding="2px">
    <tr>
    <td>
    Record Outcome
    </td>
    </tr>
    </table>
    </div>
    <div class="PopupContent">
    <div>Select the outcome below and enter a comment </div>
    <asp:UpdatePanel ID="updatePanelErrors" runat="server">
    <ContentTemplate>
    <div><asp:ValidationSummary ID="validationSummary" runat="server" HeaderText="The following error(s) occurred:"
    DisplayMode="BulletList" CssClass="ErrorBox"></asp:ValidationSummary></div><br />

    <olympus:MultiValidator ID="multivalidator" runat="server" />

    </ContentTemplate>
    </asp:UpdatePanel>

    <asp:UpdatePanel ID="updatePanelOutcomes" runat="server">
    <ContentTemplate>

    <div><asp:RadioButtonList ID="radioButtonListOutComes" runat="server" /></div>

    <div><asp:RadioButton ID="radioButtonAdministered" Checked="true" runat="server"
    GroupName="OutcomeGroup" Text="Administered Successfully" /></div><br />

    <div><asp:RadioButton ID="radioButtonRefused" runat="server" GroupName="OutcomeGroup"
    Text="Patient Refused" /></div><br />

    <div><asp:RadioButton ID="radioButtonDropped" runat="server" GroupName="OutcomeGroup"
    Text="Dropped" /></div><br />

    <div><asp:RadioButton ID="radioButtonOther" runat="server" GroupName="OutcomeGroup"
    Text="Other" /></div><br />

    <div>Comment</div>
    <div><asp:TextBox ID="textBoxComment" runat="server" TextMode="MultiLine"></asp:TextBox></div><br />

    <div><asp:Button ID="buttonRecord" runat="server" Text="Record Outcome"
    onClick="buttonRecord_Click" /></div

    P B 2 Replies Last reply
    0
    • B Broken Bokken

      I'm using the 3.5 version of ajax. I have a panel set tp be a modal popup, and inside I have a few radio buttons, a text box for a comment, and a button. The button submits fine, but the radio buttons are not retaining their checked value. I can set the selected value and it shows it as selected when the popup appears, but if I click any of the radiobuttons, none of them show as selected. If I click the botton, the checked property is false for all of them.

      <asp:Panel ID="panelOutcomePopup" CssClass="OutcomePopup" runat="server" style="display:none;">
      <div class="PopupHeader">
      <table width="100%" cellspacing="2px" cellpadding="2px">
      <tr>
      <td>
      Record Outcome
      </td>
      </tr>
      </table>
      </div>
      <div class="PopupContent">
      <div>Select the outcome below and enter a comment </div>
      <asp:UpdatePanel ID="updatePanelErrors" runat="server">
      <ContentTemplate>
      <div><asp:ValidationSummary ID="validationSummary" runat="server" HeaderText="The following error(s) occurred:"
      DisplayMode="BulletList" CssClass="ErrorBox"></asp:ValidationSummary></div><br />

      <olympus:MultiValidator ID="multivalidator" runat="server" />

      </ContentTemplate>
      </asp:UpdatePanel>

      <asp:UpdatePanel ID="updatePanelOutcomes" runat="server">
      <ContentTemplate>

      <div><asp:RadioButtonList ID="radioButtonListOutComes" runat="server" /></div>

      <div><asp:RadioButton ID="radioButtonAdministered" Checked="true" runat="server"
      GroupName="OutcomeGroup" Text="Administered Successfully" /></div><br />

      <div><asp:RadioButton ID="radioButtonRefused" runat="server" GroupName="OutcomeGroup"
      Text="Patient Refused" /></div><br />

      <div><asp:RadioButton ID="radioButtonDropped" runat="server" GroupName="OutcomeGroup"
      Text="Dropped" /></div><br />

      <div><asp:RadioButton ID="radioButtonOther" runat="server" GroupName="OutcomeGroup"
      Text="Other" /></div><br />

      <div>Comment</div>
      <div><asp:TextBox ID="textBoxComment" runat="server" TextMode="MultiLine"></asp:TextBox></div><br />

      <div><asp:Button ID="buttonRecord" runat="server" Text="Record Outcome"
      onClick="buttonRecord_Click" /></div

      P Offline
      P Offline
      Paddy Boyd
      wrote on last edited by
      #2

      Are you sure you're not rebinding the radio buttons prior to checking to see if they are selected?

      B 1 Reply Last reply
      0
      • P Paddy Boyd

        Are you sure you're not rebinding the radio buttons prior to checking to see if they are selected?

        B Offline
        B Offline
        Broken Bokken
        wrote on last edited by
        #3

        Thanks for your response. No, I'm not binding the radio buttons at all. If I put text in the text box and click any of the buttons, the text is not cleared. The behavior is mostly on the client side as far as them not showing selected. The button highlights and reacts to the click, but does not actually have the little blue circle in it, and does not show selected in tha backend.

        Broken Bokken You can't carry out a ninja-style assasination dressed as an astronaut. It's the luminous fabric; too visible. - Tripod The story of your fighting is a poem of two words: YOU SUCK.

        1 Reply Last reply
        0
        • B Broken Bokken

          I'm using the 3.5 version of ajax. I have a panel set tp be a modal popup, and inside I have a few radio buttons, a text box for a comment, and a button. The button submits fine, but the radio buttons are not retaining their checked value. I can set the selected value and it shows it as selected when the popup appears, but if I click any of the radiobuttons, none of them show as selected. If I click the botton, the checked property is false for all of them.

          <asp:Panel ID="panelOutcomePopup" CssClass="OutcomePopup" runat="server" style="display:none;">
          <div class="PopupHeader">
          <table width="100%" cellspacing="2px" cellpadding="2px">
          <tr>
          <td>
          Record Outcome
          </td>
          </tr>
          </table>
          </div>
          <div class="PopupContent">
          <div>Select the outcome below and enter a comment </div>
          <asp:UpdatePanel ID="updatePanelErrors" runat="server">
          <ContentTemplate>
          <div><asp:ValidationSummary ID="validationSummary" runat="server" HeaderText="The following error(s) occurred:"
          DisplayMode="BulletList" CssClass="ErrorBox"></asp:ValidationSummary></div><br />

          <olympus:MultiValidator ID="multivalidator" runat="server" />

          </ContentTemplate>
          </asp:UpdatePanel>

          <asp:UpdatePanel ID="updatePanelOutcomes" runat="server">
          <ContentTemplate>

          <div><asp:RadioButtonList ID="radioButtonListOutComes" runat="server" /></div>

          <div><asp:RadioButton ID="radioButtonAdministered" Checked="true" runat="server"
          GroupName="OutcomeGroup" Text="Administered Successfully" /></div><br />

          <div><asp:RadioButton ID="radioButtonRefused" runat="server" GroupName="OutcomeGroup"
          Text="Patient Refused" /></div><br />

          <div><asp:RadioButton ID="radioButtonDropped" runat="server" GroupName="OutcomeGroup"
          Text="Dropped" /></div><br />

          <div><asp:RadioButton ID="radioButtonOther" runat="server" GroupName="OutcomeGroup"
          Text="Other" /></div><br />

          <div>Comment</div>
          <div><asp:TextBox ID="textBoxComment" runat="server" TextMode="MultiLine"></asp:TextBox></div><br />

          <div><asp:Button ID="buttonRecord" runat="server" Text="Record Outcome"
          onClick="buttonRecord_Click" /></div

          B Offline
          B Offline
          Broken Bokken
          wrote on last edited by
          #4

          I've been digging around and it appears to be the way I am showing the modal. Using a link button, it works fine. But I can't do that. I'm trigging a text changed event when the user clicks enter in a text box, I then validate the data entered, and then show the modal. modalPopupOutcome.Show() does not work. Any ideas?

          Broken Bokken You can't carry out a ninja-style assasination dressed as an astronaut. It's the luminous fabric; too visible. - Tripod The story of your fighting is a poem of two words: YOU SUCK.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups