Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 78072

Select All items after data is read

$
0
0

Yeah I saw this article and tried to implement.  Either my javascript/jquery is weak or  there is something I'm missing about this dataSource structure.  So my routine looks like this:

function selectAllBenchmarks()
{
var multiselect = $("#Benchmarks").data("kendoMultiSelect");
//multiselect.wrapper.find(".k-multiselect-wrap").removeClass("floatWrap").addClass("k-floatwrap");
var all = $.map(multiselect.dataSource.data(), function (dataItem) {
return dataItem.value;
});
multiselect.value(all);
}

I'm calling it on the dataBound event and I've stepped through it.  It hits the map line and then skips down to the multiselect.value(all) as if the multiselect.dataSource.data() is empty but there are 6 items in my multiselect afterward.  Am I calling it on the wrong event or am I setting my multiselect incorrectly?

 

Thanks for help

Lee


Viewing all articles
Browse latest Browse all 78072

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>