hi ,
here im using vb.net 2005how can i add radiobuttons as column to windows datagridview control
plz help me....
here im using vb.net 2005how can i add radiobuttons as column to windows datagridview control
plz help me....
Private Sub main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
Dim rb As New RadioButton
con.ConnectionString = "Server= harika;uid=sa; initial catalog=superlynx"
con.Open()
cmd.CommandText = "select * from reports"
cmd.Connection = con
cmd.CommandType = CommandType.Text
Call populategrid()
Catch ex As Exception
MsgBox("Load" & ex.Message)
Finally
con.Close()
End Try
End Sub
Private Sub populategrid()
Dim dtcCheck As New DataColumn("Select")
dtcCheck.DataType = System.Type.GetType("System.Boolean")
dtcCheck.DefaultValue = False
adpt = New SqlDataAdapter("SELECT * FROM reports", con)
ds = New DataSet
adpt.Fill(ds, "reports")
'dvEmp = New DataView
'dvEmp.Table = dsEmp.Tables(0)
dt = New DataTable
dt = ds.Tables("reports")
dt.Columns.Add(dtcCheck)
DataGridView1.DataSource = dt
End Sub
Comment