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

Remove item from datadatabounlistbox

1 Answer 40 Views
DataBoundListBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sanjeewa
Top achievements
Rank 1
Sanjeewa asked on 19 Jun 2014, 11:31 AM
Hi,
I am using this code to populate DataBoundListBox
1.Dim listDatas As New List(Of Ex_Categories)()
2.        Using db = New n_DataContext(Common.ConnectionString)
3.        Dim query = Await System.Threading.Tasks.Task.Factory.StartNew(Function() From cat In db.ExCat Order By cat.n_type Select cat)
4.        listDatas = Await System.Threading.Tasks.Task.Factory.StartNew(Function() query.OrderBy(Function(c As Ex_Categories) c.n_type).ThenBy(Function(c As Ex_Categories) c.cat_name).ToList())
5.        End Using
6.LstCategories.ItemsSource = New ObservableCollection(Of Ex_Categories)(listDatas)

I know how to remove an item from database.
I want to know how do i remove a selected item from the DataBoundListBox?

1 Answer, 1 is accepted

Sort by
0
Accepted
Ves
Telerik team
answered on 24 Jun 2014, 10:35 AM
Hi Sanjeewa,

RadDataBoundListBox will not handle deletion internally. You will need to perform it by yourself. In order to determine which item to delete you can take advantage of ItemTap or SelectionChanging/SelectionChanged events of the control. This will depend on the specific implementation. You can find more details about events in RadDataBoundListBox here.

Best regards,
Ves
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
DataBoundListBox
Asked by
Sanjeewa
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or