We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Grid/Editing/Dialog Editing - in grid two ejDropDownList

Hi

Grid contain two column 

ship country     manufacturer  country
 Germany            Spain

when editing the grid - dialog box showing two DropDownlist  selected value are Germany 

but need to show ship country  DropDownlist  - Germany    and        manufacturer  country DropDownlist   - Spain

please find the grid attachment 

Thanks

Pratheep



Attachment: DialogEditing_3c48c8fb.rar

3 Replies

RU Ragavee U S Syncfusion Team September 7, 2015 05:58 AM UTC

Hi Pratheep,

Thanks for contacting Syncfusion support.

We analyzed the reported query and the sample that you shared.

From your sample, we found that in actionComplete event of the grid, you have set the incorrect value to the ejDropdownList control corresponding to the Manufacturer country which is the cause of the issue. Please refer to the below code example.

[Incorrect snippet]

function complete(args) {

               if (args.requestType == "beginedit") {                   

                    $("#ShipCountry").ejDropDownList("setSelectedValue", args.row.children().eq(4).text());

                    $("#ManufacturerCountry").ejDropDownList("setSelectedValue", args.row.children().eq(4).text());//have set the same value for both the dropdownlist

                }

            }
        }

[Correct snippet]

function complete(args) {

               if (args.requestType == "beginedit") {                   

                    $("#ShipCountry").ejDropDownList("setSelectedValue", args.row.children().eq(4).text());

                    $("#ManufacturerCountry").ejDropDownList("setSelectedValue", args.row.children().eq(5).text());//the index specified with eq indicates the index of the corresponding column in the grid

                }

            }
        }


We have modified the sample shared by you, which can be downloaded from the below location.

Sample Link: http://www.syncfusion.com/downloads/support/forum/120150/ze/DialogEditing_modified1480364768

Regards
Ragavee U S


PR Pratheep September 7, 2015 11:00 AM UTC

Hi Ragavee 

now working fine, Thanks

Pratheep
 


RU Ragavee U S Syncfusion Team September 8, 2015 07:04 AM UTC

Hi Pratheep,

We are happy that your issue is resolved.
 
If you have any queries in the future, please get back to us. We will be happy to assist you.

Regards
Ragavee U S

Loader.
Up arrow icon