Click here to Skip to main content
15,886,873 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionProblems with Profiles ... Pin
Promised_Coming2-Feb-14 0:20
Promised_Coming2-Feb-14 0:20 
AnswerRe: Problems with Profiles ... Pin
Prasad Vj2-Feb-14 1:35
professionalPrasad Vj2-Feb-14 1:35 
AnswerRe: Problems with Profiles ... Pin
Richard Deeming3-Feb-14 2:20
mveRichard Deeming3-Feb-14 2:20 
QuestionBest Practise Pin
abhi_24311-Feb-14 16:55
professionalabhi_24311-Feb-14 16:55 
AnswerRe: Best Practise Pin
Peter Leow1-Feb-14 17:30
professionalPeter Leow1-Feb-14 17:30 
AnswerRe: Best Practise Pin
Prasad Vj1-Feb-14 22:12
professionalPrasad Vj1-Feb-14 22:12 
QuestionRadiobutton not fire an event.. Pin
Member 1051352931-Jan-14 23:09
Member 1051352931-Jan-14 23:09 
AnswerRe: Radiobutton not fire an event.. Pin
Prasad Vj1-Feb-14 21:50
professionalPrasad Vj1-Feb-14 21:50 
Hi,

I think to view the controls in the list box or gridview, we need to provide some data source.

Here i have tried some code to view the radio button control in the list view.

XML
<asp:ListView ID="lv1" GroupItemCount="3" runat="server" DataKeyNames="1" >
<LayoutTemplate>
<fieldset>
    <legend>MyGroups</legend>
    &nbsp;
    <asp:PlaceHolder runat="server"  ID="groupPlaceholder"></asp:PlaceHolder>
</fieldset>
</LayoutTemplate>
<GroupTemplate>
<fieldset>
    <legend>Individual Group</legend>
    <asp:PlaceHolder runat="server" ID="itemPlaceholder"></asp:PlaceHolder>
</fieldset>
</GroupTemplate>
<GroupSeparatorTemplate>
&nbsp;
</GroupSeparatorTemplate>
<EmptyDataTemplate>No records present.</EmptyDataTemplate>
<ItemTemplate>
&nbsp;&nbsp;
    <asp:RadioButton ID="RadioButton1" runat="server" AutoPostBack ="true" value='<%# Eval(1)%>' /><%# Eval("Text1")%>
</ItemTemplate>
</asp:ListView>


**********************************************

VB
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
       If Not IsPostBack Then
           BindListView()
       End If
   End Sub

   Private Sub BindListView()
       lv1.DataSource = GetData()
       lv1.DataBind()
   End Sub

   Private Function GetData() As DataTable
       Dim dt As New DataTable()
       dt.Columns.Add("1", System.Type.[GetType]("System.Int32"))
       dt.Columns.Add("Text1", System.Type.[GetType]("System.Int32"))
       Dim k As Integer = 0
       Dim strTemp As String = 10
       For i As Integer = 0 To 11
           Dim dr As DataRow = dt.NewRow()
           dr("1") = i + 13
           dr("Text1") = 10
           k += 1
           If k = 3 Then
               strTemp = 12
               k = 0
           End If
           dt.Rows.Add(dr)
       Next
       Return dt
   End Function



once try this code
I can't provide the answer, but have provide some suggestions.
Prasad Vj

QuestionASP.NET MVC Pin
woopsydoozy31-Jan-14 4:59
woopsydoozy31-Jan-14 4:59 
AnswerRe: ASP.NET MVC Pin
thatraja2-Feb-14 21:20
professionalthatraja2-Feb-14 21:20 
QuestionAJAX/Web Services and GET vs. POST Pin
littleGreenDude30-Jan-14 10:03
littleGreenDude30-Jan-14 10:03 
AnswerRe: AJAX/Web Services and GET vs. POST Pin
Gopi Kishan Mariyala31-Jan-14 0:27
Gopi Kishan Mariyala31-Jan-14 0:27 
GeneralRe: AJAX/Web Services and GET vs. POST Pin
littleGreenDude31-Jan-14 1:47
littleGreenDude31-Jan-14 1:47 
GeneralRe: AJAX/Web Services and GET vs. POST Pin
Gopi Kishan Mariyala31-Jan-14 1:50
Gopi Kishan Mariyala31-Jan-14 1:50 
QuestionLoading ascx control Using C# code Pin
Saeed Ansarinejad30-Jan-14 6:48
Saeed Ansarinejad30-Jan-14 6:48 
Questionhow to download xlsx file from sftp & convet into datatable Pin
antony beula30-Jan-14 1:04
antony beula30-Jan-14 1:04 
AnswerRe: how to download xlsx file from sftp & convet into datatable Pin
Richard Deeming30-Jan-14 2:10
mveRichard Deeming30-Jan-14 2:10 
Questionupdate a row in gridview when checkbox is checking (using button) Pin
Member 1036798129-Jan-14 12:12
Member 1036798129-Jan-14 12:12 
AnswerRe: update a row in gridview when checkbox is checking (using button) Pin
Member 1036798129-Jan-14 12:17
Member 1036798129-Jan-14 12:17 
AnswerRe: update a row in gridview when checkbox is checking (using button) Pin
Richard Andrew x6429-Jan-14 14:07
professionalRichard Andrew x6429-Jan-14 14:07 
AnswerRe: update a row in gridview when checkbox is checking (using button) Pin
vishal.gavle29-Jan-14 20:29
vishal.gavle29-Jan-14 20:29 
QuestionMove items between 2 asp listbox with SQL Data Source and double click event Pin
Member 775837529-Jan-14 5:16
Member 775837529-Jan-14 5:16 
AnswerRe: Move items between 2 asp listbox with SQL Data Source and double click event Pin
Kornfeld Eliyahu Peter29-Jan-14 6:19
professionalKornfeld Eliyahu Peter29-Jan-14 6:19 
AnswerRe: Move items between 2 asp listbox with SQL Data Source and double click event Pin
Prasad Vj2-Feb-14 1:47
professionalPrasad Vj2-Feb-14 1:47 
Questionuser role - web api Pin
miss78629-Jan-14 5:03
miss78629-Jan-14 5:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.