Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

204
Visualizações
How to get the Selected Data Items from KendoDropDowntree when checkboxes is enabled?

I am using kendo dropdowntree with checkboxes enabled. I need to get the entire data item of the selected nodes when the change is triggered. Currently, I'm getting only the Value field of the selected Items. How to get the entire Item?

<script>
$("#dropdowntree").kendoDropDownTree({
 dataSource: [{ text: "item1", value: 1 }, { text: "item2", value: 2 },{ text: "item3", value: 3 }],
 checkboxes: true,
 change: function(e) {
   var value = this.value();
   // Here I need the checked dataItems as full objects, instead of just values
 }
});
</script>
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Unfortunately it does not appear as though Kendo exposes the selected dataItems, so you will need to do it manually.

The parameter e exposes the widget that triggered the event via e.sender. From there you can filter the widget's dataSource by the value returned by this.value.

Take a look at this example:

change: function(e) {
  var value = this.value();
  var dataSource = e.sender.dataSource;
  var dataItems = e.sender.dataSource.data().filter(dataItem => value.indexOf(dataItem.value) > -1);
  console.log(dataItems);
}

Fiddle: https://dojo.telerik.com/eKaFojav

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda