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

Reset Client Changes

2 Answers 77 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
richamo
Top achievements
Rank 2
richamo asked on 09 Sep 2010, 09:31 AM
Hi,

Is there a way to reset all changes made by the client-side (since the last postback) with a client-side script call. If not can I store the last server state in a custom attribute and restore it. I am using Q1 2010 version with checkboxes and reordering by drag and drop features.

Help is appreciated

Bye 

Morgan

2 Answers, 1 is accepted

Sort by
0
Accepted
Genady Sergeev
Telerik team
answered on 14 Sep 2010, 09:40 AM
Hello richamo,

You can reset the changes made to a listbox with the following script:

<script type="text/javascript">
       function clearState(listBox) {
           listBox._logEntriesJson = "[]";
           listBox._selectedIndicesJson = "[]";
           listBox._checkedIndicesJson = "[]";
           listBox.updateClientState();
       }
   </script>

Where listBox is the instance of RadListBox that you want to reset.

Best wishes,
Genady Sergeev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
richamo
Top achievements
Rank 2
answered on 28 Sep 2010, 09:14 AM
Hi Genady,

Thank you for the clue ! I'm sorry to reply only now but I was a little busy.

Great support ! thanks again.

Morgan
Tags
ListBox
Asked by
richamo
Top achievements
Rank 2
Answers by
Genady Sergeev
Telerik team
richamo
Top achievements
Rank 2
Share this question
or