Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • I do not see how to use the client side events of the ComboBox, or where they are exposed.

                                    For example, with the DX MVC Extensions Menu, the client side events are exposed through the settings object. For example, this is how you could handle the client-side events:

                                    settings.ClientSideEvents.Init = "function(s, e) { DXEventMonitor.Trace(s, e, 'Init'); }";
                                    settings.ClientSideEvents.ItemClick = "function(s, e) { DXEventMonitor.Trace(s, e, 'ItemClick'); }";

                                    How would you do the same with ComboBox? All I see is the ComboBoxSettings.ClientEnabled property.
                                            
                                    Thanks

                                • 10.14.2011

                                  Nevermind, I figured this out:

                                  settings.Properties.EnableClientSideAPI = true;
                                  settings.Properties.ClientSideEvents.SelectedIndexChanged
                                                              = "onComboBoxSelectedIndexChanged";

                                  You may close this issue.

                                • 10.14.2011

                                  Wait, don't close this issue yet.

                                  I would like to know how to determine the ComboBox currently selected index or current value from JavaScript when the ComboBoxSettings.Properties.ClientSideEvents.SelectedIndexChanged or ComboBoxSettings.Properties.ClientSideEvents.ValueChanged occurs.

                                  For example, here is my ComboBoxSettings object:

                                   settings.Properties.EnableClientSideAPI = true;
                                                          settings.Properties.ClientSideEvents.SelectedIndexChanged
                                                              = "onComboBoxSelectedIndexChanged";
                                                          settings.Properties.ClientSideEvents.ValueChanged
                                                              = "onComboBoxValueChanged";

                                  And here is my client-side JavaScript:

                                     var onComboBoxSelectedIndexChanged = function (s, e) {

                                      };
                                      var onComboBoxValueChanged = function (s, e) {
                                      }

                                  When either of the two event handlers run, the argument e does not give any indication what the currently selected value or index is. Also, it's not clear on the s (sender) argument where to find these properties.

                                You must  log in  or  register  to leave comments

                                1 Solution

                                1

                                Hi Trevor,

                                Thank you for contacting us. As MVCxComboBox uses the ASPxComboBox rendering, I suggest that you refer to the ASPxClientComboBox Members to learn which client-side methods you can use. For example:

                                	
                                [JScript]
                                function onComboBoxSelectedIndexChanged(s, e) { alert(s.GetValue()); }

                                In addition, take a moment to look at the following topic that describes how to operate client-side DevExpress objects:

                                Client-Side Functionality

                                Thanks,
                                Marion

                                You must  log in  or  register  to leave comments

                                To start a chat you should create a support ticket


                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners