Current filter:
                                You should refresh the page.
                                  • Is there a way to prevent the context menu from closing on click. I would like to be able to add an input inside the context menu and allow the user to click on it to change a number field. Then close the context menu programmatically. 

                                    I found how to add the input, also how to close and open programatically but could not find an option to prevent close as soon as the user click on the input field.

                                    Using .net core MVC project.
                                • Hello April,

                                  At the moment your scenario is not completely clear to me. Would you please describe it in greater detail: what component's context menu you use and what "a number field" should be changed? It will be of great help if you provide us with a sample project, showing your current progress, so we can concentrate our attention on the problematic part and provide you with a solution. Your time and cooperation are appreciated.

                                • April Vitale 05.16.2018
                                  @(Html.DevExtreme().ContextMenu() .ID("contextMenu") .Target(".homebox") .Width(250) .OnShown("context_opened") .OnHidden("context_hidden") .ItemTemplate(@<text> <div> <% if(Type == "copy") { %> <div class="copy-btn" id="<%= ID %>"><i class="far fa-copy"></i> <%= Text %></div> <% } %> <% if(Text == "Add To Cart") { %> <div class="dx-field border-top pt-2"> <div class="p-0 d-flex"> <button class="btn-ico ico yellow m-0 add-to-cart-context" data-controller="cart" data-method="add"><span><i class="fa fa-cart-plus"></i></span>Add To Cart</button> <div class="pl-1"> @(Html.DevExtreme().NumberBox() .ID("context-input-cont") .Value(1) .Min(1) .Max(20) .Width(80) .ShowSpinButtons(true) .InputAttr("class", "addqty-input text-left context-addqty-input") ) </div> </div> </div> <% } %> </div> </text>) .DataSource(new object[] { new { Text = "Copy Part Number", ID = "Copy-Part", Type = "copy" }, new { Text = "Copy Description", ID = "Copy-Description", Type = "copy" }, new { Text = "Add To Cart", Type = "input" } }) )

                                1 Solution

                                Creation Date Importance Sort by


                                ContextMenu provides the closeOnOutsideClick option for this purpose. Please set it to "false" it and let us know your results.