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

values in Listbox

1 Answer 60 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Anjali
Top achievements
Rank 1
Anjali asked on 09 May 2011, 06:45 PM
Hi All,

  I have two Rad listboxes on my web page. I can move the items from one list box. when I transfer the items from lefts side listbox to right side one, the value from left listbox are gone to the right listbox so everthing is working as I want it to be. when I save the listbox with the selected value and display the listbox again after running the web site again, the values that I selected are shown on the right side, but the same values are also shown on the left side. Is their any way I can exclude the values that are on the right side of the listbox not to be displayed on the left side of the listbox.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 10 May 2011, 07:25 AM
Hello Nitu,

I am not quite sure about the way that you bind the ListBox. The issue is because the transfered items and not actually deleted from the DB. So it is showing the same data after refreshing.

RadListBox supports automatic database updates.For that the listbox must be bound to a declarative DataSource which has its UpdateCommand and/or DeleteCommand configured.
If this is your scenario, then set the TransferMode as Move . When an item is moved then also the deletion takes place automatically.
Check out the following help article for more on this.
Automatic Database Updates.

Another suggestion is to delete the item explicitly on moving the Item.

Thanks,
Shinu.
Tags
ListBox
Asked by
Anjali
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or