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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. a group of Radio buttons in datagrid

a group of Radio buttons in datagrid

Scheduled Pinned Locked Moved ASP.NET
help
10 Posts 3 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.
  • M Offline
    M Offline
    momo007
    wrote on last edited by
    #1

    hi everybody, i have a little problem, i have a group of Radio buttons in a datagrid. and when i want to save their value: radio.checked is always false!!! here is the code: foreach(DataGridItem i in DataGrid1.Items) { RadioButton ri=i.FindControl("RInit") as RadioButton; RadioButton rp=i.FindControl("RPerfect") as RadioButton; RadioButton rm=i.FindControl("RMaitrise") as RadioButton; if(ri.Checked) { } else if(rp.Checked) { } else if(rm.Checked) { } } thanks

    M 1 Reply Last reply
    0
    • M momo007

      hi everybody, i have a little problem, i have a group of Radio buttons in a datagrid. and when i want to save their value: radio.checked is always false!!! here is the code: foreach(DataGridItem i in DataGrid1.Items) { RadioButton ri=i.FindControl("RInit") as RadioButton; RadioButton rp=i.FindControl("RPerfect") as RadioButton; RadioButton rm=i.FindControl("RMaitrise") as RadioButton; if(ri.Checked) { } else if(rp.Checked) { } else if(rm.Checked) { } } thanks

      M Offline
      M Offline
      Mihai Drebot
      wrote on last edited by
      #2

      Make sure you have the right radiobuttons, from the right tr.

      M 1 Reply Last reply
      0
      • M Mihai Drebot

        Make sure you have the right radiobuttons, from the right tr.

        M Offline
        M Offline
        momo007
        wrote on last edited by
        #3

        yes i'm sure, i have only one column of the radiobuttons. i checked also with the debug... thanks

        M 1 Reply Last reply
        0
        • M momo007

          yes i'm sure, i have only one column of the radiobuttons. i checked also with the debug... thanks

          M Offline
          M Offline
          Mihai Drebot
          wrote on last edited by
          #4

          Try this:

          _ 1 Reply Last reply
          0
          • M Mihai Drebot

            Try this:

            _ Offline
            _ Offline
            _AK_
            wrote on last edited by
            #5

            nothing to try in that :) Best Regards, Apurva Kaushal

            M M 2 Replies Last reply
            0
            • _ _AK_

              nothing to try in that :) Best Regards, Apurva Kaushal

              M Offline
              M Offline
              momo007
              wrote on last edited by
              #6

              what do i try :^)

              1 Reply Last reply
              0
              • _ _AK_

                nothing to try in that :) Best Regards, Apurva Kaushal

                M Offline
                M Offline
                Mihai Drebot
                wrote on last edited by
                #7

                http://www.c-sharpcorner.com/Code/2003/Jan/AccessDataGridVal.asp[^] sorry, my mistake :) wrong paste

                _ M 2 Replies Last reply
                0
                • M Mihai Drebot

                  http://www.c-sharpcorner.com/Code/2003/Jan/AccessDataGridVal.asp[^] sorry, my mistake :) wrong paste

                  _ Offline
                  _ Offline
                  _AK_
                  wrote on last edited by
                  #8

                  Mihai Drebot wrote:

                  wrong paste

                  not wrong paste invisible paste :) Best Regards, Apurva Kaushal

                  M 1 Reply Last reply
                  0
                  • _ _AK_

                    Mihai Drebot wrote:

                    wrong paste

                    not wrong paste invisible paste :) Best Regards, Apurva Kaushal

                    M Offline
                    M Offline
                    Mihai Drebot
                    wrote on last edited by
                    #9

                    actualy, there is a link there, right url in href, just forgot to add it as visible text inside the tag :)

                    1 Reply Last reply
                    0
                    • M Mihai Drebot

                      http://www.c-sharpcorner.com/Code/2003/Jan/AccessDataGridVal.asp[^] sorry, my mistake :) wrong paste

                      M Offline
                      M Offline
                      momo007
                      wrote on last edited by
                      #10

                      Thanks a lot, i'll take a look at it. Hope it works

                      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