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

98
Visualizações
How to setup a callback method for Kendo MVC DropDownList programmatically

I'm using a Kendo MVC DropDownList with cascading programmatically. I have my Orders DropDownList as an editor template for the Kendo Grid row. The values in the Orders DropDownList are dependent upon the selected value from the Customer dropdown in the same grid row. The Customer dropdown is a searchable control with no values bound initially.

My grid is set up to invoke a JavaScript method on editing a row, like this:

.Events(e => e
    .Edit("onGridEdit")
    .DataBound("onGridDataBound")
    .Save("onGridSave"))

In my onGridEdit JavaScript method, I read my Customer dropdown like this:

custCtrl.dataSource.read({ text: dataItem.CustomerId });

This will read a unique customer from the DB and binds to Customer dropdown.

Now I would like to get the corresponding list of values in the Orders dropdown based on this selected CustomerId, which is done like this:

// own version of cascade;
orderCtrl.dataSource.read({ customerId: dataItem.CustomerId });

This return might take few seconds; hence I need to set a callback function for this read programmatically so that I can set the selected value for the Order dropdown with the value from the editing row. How can I do it?

about 4 years ago · Juan Pablo Isaza
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