This question is locked. New answers and comments are not allowed.
Hi,
I am using this code to populate DataBoundListBox
I know how to remove an item from database.
I want to know how do i remove a selected item from the DataBoundListBox?
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?