I am using Telerik.WinControls.UI,RadDropdownList in winform.I have to display user list into dropdown.but prior to that i want to add "select user" as default item in dropdown list.
When I tried it using following code,it gave me following error.
I have datasource that contains John,Andy and Ren as users.While displaying it on winform,I want to display "--select user--" as first item in it. like below;
I want following type of dropnlist
Code is given below:
Dim uBl As New UserBusinessLogic()
Dim _user As IQueryable(Of User) = uBl.GetAllUsersByCompany(_project.Company.CompanyID)
Dim RadListDataItem1 As RadListDataItem = New RadListDataItem()
RadListDataItem1.Selected = True
RadListDataItem1.Text = "Select User"
RadListDataItem1.Value = "0"
Me.ddlUsers.DataSource = Nothing
Me.ddlUsers.DataSource = _user
Me.ddlUsers.DisplayMember = "UserName"
Me.ddlUsers.ValueMember = "UserID"
RadListControl can not transition directly from bound to unbound mode. The data source must be removed first.
please give me solution ASAP.
Thanks in advance.