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

cascadindg combobox of tree input dont work

0 Answers 49 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
victor
Top achievements
Rank 1
victor asked on 23 Oct 2012, 09:52 PM
hi i have a proble with  cascadinding in the 3 input hel please her is my code, i use postgres for the database:


<div id="example" class="k-content">
            <p>
                <label for="especie">Especie:</label>
                <input id="especie" style="width: 199px"/>
            </p>
            <p>
                Cepa:<span lang="es-mx">&nbsp;&nbsp;&nbsp; </span>&nbsp;<input id="cepa" disabled="disabled" style="width: 199px" />
            </p>
            <p>
                <label for="grupo">Grupo:<span lang="es-mx">&nbsp; </span></label>&nbsp;<input id="grupo" disabled="disabled" style="width: 199px" />
            </p>

            <style scoped>
                .k-readonly
                {
                    color: gray;
                }
            </style>

            <script>
                var MYAPP = (function($, kendo) {                
                
                    $("#especie").kendoComboBox({
                        dataSource: new kendo.data.DataSource({
                                 serverFiltering: true,
                            transport: {
                                read: "http://localhost/bioterio/Especie.php"
                            },
                            schema: {
                                data: "data"
                            }
                        }),
                        placeholder: "Seleccionar Especie...",
                        dataTextField: "Especie",
                        dataValueField: "Especie"
                    });

                    $("#cepa").kendoComboBox({
                          dataSource: new kendo.data.DataSource({
                            serverFiltering: true,
                            transport: {
                                read: "http://localhost/bioterio/cepa.php",
                                parameterMap: function(options, operation) {
                                    return {
                                        Especie: options.filter.filters[0].value
                                            }
                                        }
                            },
                            schema:{
                                data:"data"
                            
                            }
                        }),
                        placeholder: "Selecionar Cepa...",
                        dataTextField: "Cepa",
                        dataTextValue: "Cepa",
                        cascadeFrom: "especie",
                        autoBind: false
                    });
                    
                   $("#grupo").kendoComboBox({
                          dataSource: new kendo.data.DataSource({
                            serverFiltering: true,

                            transport: {
                                read: "http://localhost/bioterio/Grupo.php",
                                parameterMap: function(options, operation) {
                                    return {
                                        Cepa: options.filter.filters[0].value
                                            }
                                        }
                            },
                            schema:{
                                data:"data"
                            
                            }
                        }),
                        placeholder: "Selecionar Grupo...",
                        dataTextField: "ID_Grupo",
                        dataTextValue: "ID_Grupo",
                        cascadeFrom: "cepa",
                        autoBind: false
                    });

                    
                    
               })(jQuery, kendo);
             </script>

        </div>
           

No answers yet. Maybe you can help?

Tags
DropDownList
Asked by
victor
Top achievements
Rank 1
Share this question
or