Current filter:
                                You should refresh the page.
                                Support Center
                                  • Is there any way we can pass values to onComboBoxSelectedIndexChanged, other than s and e.

                                • Dear Vikas,
                                  I am afraid your requirements are unclear to me. Would you please clarify what task you wish to accomplish?

                                • VikasAgarwal84 12.21.2012

                                  I have a definition of a combobox like this

                                                      settings =>
                                                              settings.Name = "VariantCode";
                                                              settings.ControlStyle.CssClass = "dropdown";
                                                              settings.Properties.IncrementalFilteringMode = IncrementalFilteringMode.StartsWith;
                                                              settings.Properties.DropDownStyle = DropDownStyle.DropDownList;
                                                              settings.Properties.TextField = "Desc";
                                                              settings.Properties.ValueField = "Id";
                                                              settings.Properties.ValueType = typeof(int);

                                  and JS like this

                                  var nullTextArr = [["VariantCode", "Variant..."],
                                      ["Style", "Style..."],
                                  ["Timing", "Timing..."],
                                  ["CurrencyCode", "Currency..."],
                                  ["DivisorOrLevel", "DivisorOrLevel..."]];

                                  function OnComboLostFocus(s, e) {
                                      if (s.GetValue() !== "" && s.GetValue() != null)
                                      var input = s.GetInputElement();
                             = "gray";
                                      input.value = FindNullValue(;

                                  function FindNullValue(colName) {
                                      for (var i=0;i<nullTextArr.length;i++)
                                          if(nullTextArr[i][0] == colName) {
                                              return nullTextArr[i][1];
                                      return "";

                                  function OnComboGotFocus(s, e) {
                                      var input = s.GetInputElement();
                                      if (input.value == FindNullValue( {
                                          input.value = "";
                                 = "black";

                                  function OnComboInit(s, e) {
                                      OnComboLostFocus(s, e);

                                  So comboBox calls certain events like OnComboInit, OnComboGotFocus and OnComboLostFocus.

                                  Now Parameters are s and e, Is there any way we can pass more parameters to the function.

                                  This question is similar to my question but with a different approach, where Mike informed be about JsProperties:

                                1 Solution

                                Creation Date Rating Importance Sort by

                                Hello Vikas,

                                Thank you for your clarification. I should say that your approach is not entirely correct. Let me clarify some points.

                                1. Our 's' and 'e' event parameters are similar to 'this' and 'event' parameters of standard JavaScript functions. As you probably know, JavaScript events take only two parameters. Our events work the same. It is impossible to send more parameters.

                                2. Against a JavaScript event, you can send any number of parameters to a JavaScript method. For example:

                                function OnComboInit(s, e) { CallSomeMethod(s, e, s.GetInputElement()); }

                                Based on these notes, your code should be as follows:

                                function OnComboGotFocus(s, e) { CallSomeMethod(s, e, s.GetInputElement()); } function OnComboInit(s, e) { CallSomeMethod(s, e, s.GetInputElement()); } function CallSomeMethod(s, e, input) { if (input.value == FindNullValue( { input.value = ""; = "black"; } }
                                • VikasAgarwal84 12.24.2012

                                  Thanks Marion for reply. I know that we can send parameters to a function but point was to send from control definition. Anyways I am using JsProperties (as the Mike's answer of my question)

                                • I am afraid from your response it is not quite clear whether or not the problem is resolved. If not, would you please clarify the issue you have encountered in greater detail? Your time and cooperation are highly appreciated.

                                • VikasAgarwal84 12.24.2012

                                  Thanks Marion. My Issue is resolved, This ticket was raised to know that if we can pass any other arguments along with s and e. As you said that is the nature of the event and DevEx also follow the same pattern, that We cannot pass any other parameter.

                                • Thank you for the update. If you have any other questions you are welcome to contact us at any time.

                                If you need additional product information, write to us at 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, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

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