Current filter:
                                You should refresh the page.
                                  • Hi there,
                                    I am using an ASPxGridView in a div that is movable using JQuery UI's Sortable framework:
                                    http://jqueryui.com/demos/sortable/#portlets
                                    My grid behaves correctly until I move the div that the grid resides in. Once it is moved grid callbacks no longer work (I can't add or edit rows using the command column buttons or by calling the javascript myself (ex. grid.AddNewRos()).
                                    Is there something that I need to be doing to ensure the grid behaves correctly in this scenario?
                                    Thanks,
                                    Mike
                                    Steps to Reproduce:

                                    1. Place an editable ASPxGridView in a div that is draggable using the JQuery UI Sortable framework.
                                    2. Try editing the grid - it works.
                                    3. Change the location of the div the grid resides in.
                                    4. Try editing the grid - it no longer works - nothing happens.
                                    Expected Results:
                                    5. Place an editable ASPxGridView in a div that is draggable using the JQuery UI Sortable framework.
                                    6. Try editing the grid - it works.
                                    7. Change the location of the div the grid resides in.
                                    8. Try editing the grid - it should work.
                                Show all comments
                                • Plato (DevExpress Support) 12.08.2009

                                  Hi Mike,
                                  This can be an issue of the JQuery framework, or some incompatibility issue. Anyway, to be able to research this issue in detail, please send us a sample project showing this issue. We will try to find a solution for you.
                                  Thanks,
                                  Plato

                                • Michael_11 12.08.2009

                                  Hi Plato,
                                  I have attached a simple sample project that illustrates the behaviour described.
                                  Mike

                                • Plato (DevExpress Support) 12.09.2009

                                  Hi Michael,
                                  Thank you for sending the code to us. I see the problem. We will research why it appears and let you know our results. Please bear with us.
                                  Thanks,
                                  Plato

                                • Plato (DevExpress Support) 12.09.2009

                                  Hi Michael,
                                  We have researched the problem and come to the conclusion that this is a JQuery problem. Some JQuery methods working with the containers execute all scripts which are defined inside this container. In your case, this happens when a container is dropped. You can see this behavior if you add the following code to the DIV element which owns both the grid and GadgetA:
                                  <script type="text/javascript">
                                      alert('Gadget A');
                                  </script>
                                  If you drag this area, you will see that once it is dropped, the alert('Gadget A'); code will be executed. I.e. all scripts defining in this area were executed.
                                  The ASPxGridView alongside its already initialized script is residing in this area. A new execution of this script makes the grid stop working.
                                  Thanks,
                                  Plato

                                • Michael_11 12.09.2009

                                  Hi Plato,
                                  If Initialize should only ever be called once can a guard be put in place to ensure it is only executes once? This would be safer then letting Initialize be called again (by jQuery or anyone else).
                                  Mike

                                • Plato (DevExpress Support) 12.10.2009

                                  Hi Michael,
                                  We will think about your suggestion and will possibly implement it in the future.
                                  Thanks,
                                  Plato

                                • Plato (DevExpress Support) 12.14.2009

                                  Hi Michael,
                                  We have researched the problem and here is our conclusion:
                                  every initialization script which creates and initializes a client instance of our control looks like:
                                  <script>
                                      var dxo = new ASPxMyControl(...);
                                      window["name"] = dxo;
                                      dxo.prop1 = val1;
                                      ...
                                  </script>
                                  JQuery implements all the scripts inside the container and also implements our initialization script. This will result in creation of a new object and setting its state to the default value. We tried to workaround this problem by using the following code:
                                  <script>
                                      if(!window["name"]) {
                                          var dxo = new ASPxMyControl(...);
                                          window["name"] = dxo;
                                          dxo.prop1 = val1;
                                          ...
                                      }
                                  </script>
                                  However, this approach wouldn't work because the initialization script should sometimes be implemented even if the object is already initialized. This should be done when the callback result comes from the server. I am afraid there is no an easy solution to this problem, and we decided to reject this bug report, as generally, this is not an issue of our controls.
                                  Thanks,
                                  Plato

                                0 Solutions

                                Creation Date Importance Sort by