Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
Iggrid rowedittemplate dropdown control does not have an id
posted

Hi,

I have an igGrid that has editmode set to rowedittemplate.  I have multiple columns in the grid, but 2 of them have editorOptions 'editortype: text' and 'button: dropdown'.  These 2 columns are interdependent on each other, so I need to catch the valuechanged events for either to be sure the other column has the correct value.  However, I can't get the id of the either column's control.  If I set the grid's editmode to row the id show's up, and I can do what I need.  But I'd really like to use the rowedittemplate.

eg

$("#paycodegrid").igGrid({

 columns: [
                    { headerText: "Name", key: "name", dataType: "string", width: "150px" },
                    { headerText: "Description", key: "description", dataType: "string", width: "400px" },
                    { headerText: "Active", key: "active", dataType: "bool", width: "100px" },
                    { headerText: "Worked/Non-Worked", key: "workedString", dataType: "string", width: "200px" },
                    { headerText: "Hours/Amount", key: "isAmountString", dataType: "string", width: "150px" },
                    { headerText: "Hour Type", key: "hourTypeString", dataType: "string", width: "150px" },
                    { headerText: "ID", key: "id", dataType: "number", width: "5px" }
                ],

...

                        name: "Updating",
                        editMode: "rowedittemplate",
...

                        columnSettings: [
                            {
                                columnKey: "isAmountString",
                                editorType: "text",
                                editorOptions: {
                                    button: "dropdown",
                                    id: "isAmountCombo",
                                    listItems: isAmountValues,
                                    dropDownOnFocus: true,
                                    dropDownOnReadOnly: true,
                                    listSelected: function (evt, ui) {
                                        debugger;
                                        if (ui.item == "Amount")
                                            $("#hourTypesCombo").igTextEditor("selectedListIndex", 3);
                                    }
                                    //                                    valueChanged: function (evt, ui) {
                                    //                                        debugger;
                                    //                                    }

                                }
                            },
                            {
                                columnKey: "hourTypeString",
                                editorType: "text",
                                editorOptions: {
                                    button: "dropdown",
                                    id: "hourTypesCombo",
                                    listAutoComplete: true,
                                    listItems: hourTypeValues,
                                    listDropDownAsChild: true,
                                    dropDownOnFocus: true,
                                    dropDownOnReadOnly: true,
                                    valueChanged: function (evt, ui) {
                                        debugger;
                                        if (ui.value != "None")
                                            $("#isAmountCombo").igCombo("selectedIndex", 1);
                                    }
                                }
                            },
...

The isAmountString and hourTypeString columns are interrelated.  So when the amount column changes I need to set the hour type drop-down to a certain value, and vice versa. 

I need to access $("#isAmountCombo") and $("$hourTypesCombo"), but they come up empty.

Is there a trick to get the id of these controls in rowedittemplate mode?

Thanks,

Pete

Parents
No Data
Reply
  • 2355
    Offline posted

    Hi Pete,

    I have investigated your issue and I have logged this behavior in our internal tracking system with a Development ID of 159202. The next step will be for a developer to review my investigation and confirm my findings or to offer a fix, or other resolution. I will create a private case and update you with any new information after the review in that case. 

    For now I can offer you a temporary workaround. I used a jQuery selector instead of an ID to select the other editor and then I called its API method. I have attached a sample page that demonstrates the workaround.

    Please let me know if you need more information.

     

    Kind regards,

    Petko Zhekov

    Software Engineer

    sample-RETeditors.zip
Children
No Data