|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
|
RadioButtonList in datagrid and second in Session("Answ"). I am trying to assing value from Session("Answ") to RadioButtonList.selectedValue. However the value which is selected is the last value in session. Where did I mixed the logic.Thanks Dim Answer As Answers Dim dgItem As DataGridItem For Each dgItem In dataGrid1.Items If dgItem.ItemType = ListItemType.AlternatingItem Or dgItem.ItemType = ListItemType.Item Then Dim rbl As RadioButtonList = CType (dgItem.FindControl("rbList"), RadioButtonList) For Each Answer In Session("Answ") Dim aValue As String = Answer.rAnswer rbList.SelectedValue = aValue Next End If Next Well, you are not looping through the checkbox controls and you are not
creating new checkboxes so I would guess that is the problem. Jason Bentley http://geekswithblogs.net/jbentley Here is my code. I can't see what I am doing incorrect. I
am honestly stuck... Dim Answer As Answers Dim dgItem As DataGridItem For Each dgItem In dataGrid1.Items If dgItem.ItemType = ListItemType.AlternatingItem Or dgItem.ItemType = ListItemType.Item Then Dim rbl As RadioButtonList = CType (dgItem.FindControl("rbList"), RadioButtonList) For Each Answer In Session("Answ") Dim aValue As String = Answer.rAnswer rbList.SelectedValue = aValue Next End If Next
populating a datagrid
How can I display hashtable key values in a web page? Move bound column to right of dynamic column in datagrid? assigning itemtemplate, edititemtemplate programmatically Label text from template column is blank in ItemCommand event Trying to implement master/detail with 2 datagrids problem exporting datagrid to excel can i use dynamic variable inside a dataadapter and bind to datagrid How to pull the data out from two table and bind to repeater custom replacement of EditCommandColumn |
|||||||||||||||||||||||