<asp:DataGrid id="DataGrid1" AutoGenerateColumns="False"
runat="server">
<input type="radio" name="optSelectedName"
value=
onclick="javascript:txtFname.value =
this.value;">
<asp:Button id="Button1" style="Z-INDEX: 101; LEFT: 154px;
POSITION: absolute; TOP: 103px" runat="server"
Text="Button">
<div style="VISIBILITY: hidden">
</div>
Private Sub Page Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim myconnection As SqlConnection = New SqlConnection("server=localhost;uid=sa;password=;database=northwind")
Dim myda As SqlDataAdapter = New SqlDataAdapter("Select * from Employees", myconnection)
Dim ds As DataSet = New DataSet()
myda.Fill(ds, "AllTables")
DataGrid1.DataSource = ds
DataGrid1.DataBind()
End Sub
Private Sub Button1 Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Response.Write ("You have selected :" & txtFname.Text)
End Sub
star100
Member
10 Points
2 Posts
Adding RadioButton column to DataGrid
Aug 04, 2003 09:00 PM|LINK
ndinakar
All-Star
49092 Points
6868 Posts
Moderator
MVP
Re: Adding RadioButton column to DataGrid
Aug 05, 2003 04:47 AM|LINK
Dinakar Nethi
Life is short. Enjoy it.
***********************
SushilaSB
Star
11417 Points
2265 Posts
Re: Adding RadioButton column to DataGrid
Aug 05, 2003 11:59 AM|LINK
<asp:DataGrid id="DataGrid1" AutoGenerateColumns="False" runat="server"> <input type="radio" name="optSelectedName" value= onclick="javascript:txtFname.value = this.value;"> <asp:Button id="Button1" style="Z-INDEX: 101; LEFT: 154px; POSITION: absolute; TOP: 103px" runat="server" Text="Button"> <div style="VISIBILITY: hidden"> </div> Private Sub Page Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here Dim myconnection As SqlConnection = New SqlConnection("server=localhost;uid=sa;password=;database=northwind") Dim myda As SqlDataAdapter = New SqlDataAdapter("Select * from Employees", myconnection) Dim ds As DataSet = New DataSet() myda.Fill(ds, "AllTables") DataGrid1.DataSource = ds DataGrid1.DataBind() End Sub Private Sub Button1 Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Response.Write ("You have selected :" & txtFname.Text) End SubVisual ASP/ASP.NET MVP
http://weblogs.asp.net/sushilasb