I have a datagrid with two bound columns and I need to add a column containing a pair of radiobuttons per row. Is there an easy way to do that using VS.net, or must I code it to dynamically generate the radiobuttons at databinding time?
I realized that I need a RadioButtonList, which I addded to a template column in my datagrid. This is what I currently have for a binding subroutine:
Private Sub grants_datagrid_bind()
disp_grants_org_lbl.Text = candidate_orgs.SelectedItem.Text
'disp_grants_org_lbl.Text = selected_org_nm 'WHY DOESN'T THIS WORK???
disp_grants_pi_lbl.Text = selected_pi_nm
disp_grants_page()
Dim strConn As String = ConfigurationSettings.AppSettings("ConnectstrW"
Dim conn As New SqlConnection(strConn)
Dim myCommand As New SqlDataAdapter("[dbo].get_grants_for_pi", strConn)
Dim workParam As New SqlParameter()
Dim mydad As New SqlDataAdapter()
mydad.SelectCommand = New SqlCommand("[dbo].get_grants_for_pi", conn)
mydad.SelectCommand.CommandType = CommandType.StoredProcedure
mydad.SelectCommand.Parameters.Add("@pi_id", SqlDbType.VarChar).Value = selected_pi_id
Dim ds As New DataSet()
So now that I already have all of that data floating around this subroutine - how do I set the appropriate radioButton in each approprate row? The names of the buttons are oligo_grant_yes and oligo_grant_no. The name of the database field with either a "Y" or "N" value is oligo_user.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.