This is a migrated thread and some comments may be shown as answers.

Combobox Item Source in XMAL File.

0 Answers 34 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Purushothaman
Top achievements
Rank 2
Purushothaman asked on 26 Jul 2011, 09:57 AM
Hi Experts,

Now i am using Combobox in Silverlight.In my project i am using one gridview.inside of gridview am having one combobox.i want to populate that combobox from LIST<>.I am having also List program,

    Private Sub CreateList()
        Dim iDays As Integer
        Dim iHours As Integer
        Dim iTotal As Double = 0
        Dim list As New Collections.Generic.List(Of String)

        For iDays = 0 To 6
            For iHours = 0 To 24
                If iDays = 0 And iHours = 0 Then
                    iTotal += 1
                     pgmlist.Add("00:30")
                Else
                    list.Add(iTotal & ":00")
                    If iDays <> 6 And iHours <> 24 Then
                         pgmlist.Add(iTotal & ":30")
                    End If
                End If
            Next
        Next

    End Sub

The name of LIST is pgmlist.Now in design page(XMAL) i am using folloing code.

<ComboBox
x:Name="cbxMaxAvailableHours"
ItemsSource="{Binding list}">

But it didnt populate.Please let me know anyone have the solution for this issue.its urgent..

No answers yet. Maybe you can help?

Tags
ComboBox
Asked by
Purushothaman
Top achievements
Rank 2
Share this question
or