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

Clientside processing

1 Answer 16 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Stuart Hemming
Top achievements
Rank 2
Stuart Hemming asked on 25 May 2012, 10:40 AM
I have a ListView that I'm populating client-side using a WebService.

I have been trying to get the data in my item template to change when I click on the item. I used code in ListViewBinding.js from this demo as the basis for the following code...
setTimeout(function ()
{
    $telerik.$(".item").click(function (e) { listView.toggleSelection($(this).index()); });
}, 500);

My problem is that if I click on an item, it toggle to the SelectedItemTemplate (which is fine) but clicking again doesn't change it back.

If I click on a 2nd item it switched to the SelectedItem template and the first item switches back. However once an item has been toggled once it won't toggle again.

--
Stuart

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 30 May 2012, 08:02 AM
Hello Stuart,

The behavior that you describe is different from the actual behavior of the demo, so I assume there are differences in your code. Which parts from it are you missing or are modified? Can you post the full code that you use, so we can test it locally?

All the best,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ListView
Asked by
Stuart Hemming
Top achievements
Rank 2
Answers by
Tsvetina
Telerik team
Share this question
or