Please help me out:
I have some records in a sqldatasource and want to show it column wise. Now I do it with a datalist because it's easy. But other options are open.
Every item/record should have a radiobutton (in a group, so that you can only choose one from all). People advised me to do this with a html radiobutton inside the template.
After the user has selected an item and chooses the next-button I need to know what item the user has choosen.
Furthermore, when the user likes to step back, the same radiobutton should allready be selected.
Please help, this is bothering me for a while,
best regards from The Netherlands,
Gert
Addition to my question in the hope for more reply.
I have a sqldatasource with records. This I like to show to the user (when possible using paging). I need the user to select one item (I thought using a radiobutton). Somekind of radiobutton in a group, because only one could be selected.
Presenting the data with a datalist is really nice, but maybe I have to give up this nice buildin control and make my own thing.
A guy advised me to put a html radiobutton inside the template of the datalist. This works a bit, but the user has a next and previous all though the program. When I do that, and the user wants to do a previous, the choosen item should be allready selected with the radiobutton as he choose before. This is not possible for me at the moment.
this code someone provided me :
<input type="radio" name="keuze" value='<%# Eval("fruitmandnr") %>' onclick="form.submit();" <%#Hulpfunctie(Eval("fruitmandnr"))%> /
Function Hulpfunctie(ByVal obj As Object) As String
If (obj Is Nothing) Then Return ""
Dim keuze As Object = Request.Form("keuze")
If (keuze Is Nothing) Then Return ""
If (keuze.ToString() = obj.ToString) Then Return "checked"
Return ""
End Function
No comments:
Post a Comment