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. creating a radiobuttons column in a datagrid

creating a radiobuttons column in a datagrid

Scheduled Pinned Locked Moved ASP.NET
helpquestion
6 Posts 4 Posters 2 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 need to create a column of radiobuttons in a dtagrid. i've done already this, but the problem is i can't choose just one from all the radiobuttons. even if i set the group's name.. can any one help??? Thanks

    M V P 3 Replies Last reply
    0
    • M momo007

      hi everybody, i need to create a column of radiobuttons in a dtagrid. i've done already this, but the problem is i can't choose just one from all the radiobuttons. even if i set the group's name.. can any one help??? Thanks

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      http://metabuilders.com/Tools/RowSelectorColumn.aspx[^]

      1 Reply Last reply
      0
      • M momo007

        hi everybody, i need to create a column of radiobuttons in a dtagrid. i've done already this, but the problem is i can't choose just one from all the radiobuttons. even if i set the group's name.. can any one help??? Thanks

        V Offline
        V Offline
        V Senthil
        wrote on last edited by
        #3

        Hi, Use this Code in the DataGrid ----------------------------- Put this in the Coding area. ---------------------------- Public Sub SelectOnlyOne(ByVal sender As Object, ByVal e As System.EventArgs) Dim m_ClientID As String = "" Dim rb As New RadioButton rb = CType(sender, RadioButton) m_ClientID = rb.ClientID For Each i As DataGridItem In DataGrid.Items rb = CType(i.FindControl("rdoPriority"), RadioButton) rb.Checked = False If (m_ClientID = rb.ClientID) Then rb.Checked = True End If Next End Sub Regards, Senthil V.

        M 1 Reply Last reply
        0
        • M momo007

          hi everybody, i need to create a column of radiobuttons in a dtagrid. i've done already this, but the problem is i can't choose just one from all the radiobuttons. even if i set the group's name.. can any one help??? Thanks

          P Offline
          P Offline
          postmaster programmingknowledge com
          wrote on last edited by
          #4

          what are you using RadioButton or RadiobuttonList? ========== http://www.programmingknowledge.com/[^] ================

          M 1 Reply Last reply
          0
          • V V Senthil

            Hi, Use this Code in the DataGrid ----------------------------- Put this in the Coding area. ---------------------------- Public Sub SelectOnlyOne(ByVal sender As Object, ByVal e As System.EventArgs) Dim m_ClientID As String = "" Dim rb As New RadioButton rb = CType(sender, RadioButton) m_ClientID = rb.ClientID For Each i As DataGridItem In DataGrid.Items rb = CType(i.FindControl("rdoPriority"), RadioButton) rb.Checked = False If (m_ClientID = rb.ClientID) Then rb.Checked = True End If Next End Sub Regards, Senthil V.

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

            hi, thanks for he reply, i'm developping with c#, could you plz just give the code in c# of: rb=CType(i.FindControl("rdoPriority"), RadioButton) thanks agian for your help

            1 Reply Last reply
            0
            • P postmaster programmingknowledge com

              what are you using RadioButton or RadiobuttonList? ========== http://www.programmingknowledge.com/[^] ================

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

              radiobutton, i have just one in a cell

              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