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

Grid with multiple synchronized custom editors

3 Answers 79 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Simon
Top achievements
Rank 1
Simon asked on 13 Aug 2015, 10:13 AM
Hi,

(I use the following components: Kendo UI Professional, Angular JS, ASP.NET WebAPI with OData)

I have to build a grid that contains rows of articles. It is necessary that I have a autocomplete Box for the article number and the article description. 
The values for the articles(key, number, description) get loaded from an OData API. The challenge is that,
if I select an article number that the description must be selected equivalent. Same the other way round.

Does anyone know a nice workflow for this, from my knowledge this can only be done using JQuery, what I want to avoid as far as I can use Angular.

Thanks!

3 Answers, 1 is accepted

Sort by
0
Simon
Top achievements
Rank 1
answered on 14 Aug 2015, 05:59 AM

Doesn't anyone have an idea?

 I tried the following in Angular (with Typescript):

this.VerschiebeGridOptions = {
                sortable: false, pageable: false,
                editable: "inline",toolbar: ["create"],
                columns:
                [
                    ​...{
                        field: "ArtNr",
                        title: "Artikelnummer",
                        width: "15%",
                        values: this.VerschiebeArtikelNummern,
                        
                    },{
                        field: "ArtNr",
                        title: "Artikelbezeichnung",
                        values: this.VerschiebeArtikel,
                        width: "20%"
                    },{
                        command: ["edit", "destroy"],
                        title: " ",
                        width: "180px"
                    } ] }

As you see I tried to bind two columns on one field, using two values arrays containing the same values but different text. This is working right now, but in both columns both Dropdowns are shown:

 

0
Simon
Top achievements
Rank 1
answered on 14 Aug 2015, 07:27 AM

The next issue is, that if the first value of the array is 0 the Dropdown shows [object object] instead of 0

 

0
Vladimir Iliev
Telerik team
answered on 17 Aug 2015, 08:24 AM
Hello Benjamin,

You can for example use the "change" event of the grid dataSource in which to check if current action is "itemchange" and the field is one of the two required fields to update the other using "set" method of the model.

Regards,
Vladimir Iliev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Simon
Top achievements
Rank 1
Answers by
Simon
Top achievements
Rank 1
Vladimir Iliev
Telerik team
Share this question
or