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
105
Get value from dropdown provider in grid
posted

I have a cascading dropdown scenario in the webdatagrid.  In order to populate the second dropdown, I need to value of the selecteditem in the first dropdown.  The following javascript firest on the CellEditing_EnteredEditMode event and gives me a value, but the value does not appear to be for the dropdown on the correct row.

 

 if (args._editor._id.indexOf("ddlTeams") > -1) {
                var editorID = sender._editorProviders._items[1]._editor._id;
                var val = getWDDLValue(editorID);
                args._editor.loadItems(val);
            }

function getWDDLValue(wddlID) {
           var wddl = $find(wddlID);
            var item = wddl.get_items().getItem(wddl.get_selectedItemIndex());
            if (item != null) {
                return item.get_value();
            } else {
            return null;
            }
        }

I need the value, not the text since the query that populates the second dropdown requires it.

Any help appreciated!
-Lee


 

 

Parents Reply Children
No Data