Completed
Last Updated: 19 Mar 2018 14:13 by Dimitar
ADMIN
Stefan
Created on: 16 Oct 2012 02:42
Category:
Type: Feature Request
2
ADD. RadDropDownList/RadListControl - one should be able to add items to the control with specified text and value in bound mode
Public Sub New()
        InitializeComponent()

        Dim table As New DataTable
        table.Columns.Add("Id", GetType(Integer))
        table.Columns.Add("Name")
        For index = 1 To 10
            table.Rows.Add(index, "Name " & index)
        Next

        RadDropDownList1.DataSource = table
        RadDropDownList1.DisplayMember = "Name"
        RadDropDownList1.ValueMember = "Id"

    End Sub

    Private Sub RadButton1_Click(sender As System.Object, e As System.EventArgs) Handles RadButton1.Click
        Dim item As New RadListDataItem()
        item.Text = "hello"
        item.Value = 123
        RadDropDownList1.Items.Add(item) 'here the item does not have a valid value

    End Sub
0 comments