Hi Plato,
I have attached a simple sample project that illustrates the behaviour described.
Mike
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
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
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.
Facebook
Twitter
Google+