Hi,
Does anybody know about this issue? I have some nested Websplitters and am trying to set the size of them via the set_size() method and ran into this error. I debugged and it seems to lead to the following method definition:
{
/// <summary>Sets size of pane in pixels. That has effect only for expanded pane and only after first paint of control.</summary>
/// <param name="value" type="Number">Size of pane in pixels.</param>
/// <returns type="Boolean">Value of true means that size of pane was set. Value of false means failure,- size was not set due to collapsed state or before first paint.</returns>
var pane = ctl._validPane(this, 1, 1);
pane = ctr._validPane(this, -1, 1); <---- This line is throwing the error
return false;
if(value > both) value = both;
value = both - val2;
ctl._setPaneSize(pane, val2);
},
You can clearly see that a variable ctr is being accessed, yet when you to a search, there's no definition for this object. Is this a bug? Everywhere else it uses the ctl object. However, oddly enough, this splitter contains 3 panels, if I run the following javascript
splitter._panes[0].set_size(2000);
splitter._panes[1].set_size(2000);
Everything is kosher, however, if I run the following:
splitter._panes[2].set_size(2000);
That's where this error occurs. I'm using the new 8.3 build for .Net 3.5
Thanks
Hi Darrell,
I'm glad to hear that this will eventually be addressed. I would also like to note that this seems to happen with nested WebSplitters. That may help narrow the problem for you guys.
Also, is there no work around for the time being? I'm not really sure we can sit around and wait for a hotfix, as this really is slowing us down. If we cannot reliably resize a nested WebSplitter than we'll have to recreate our all our content layouts. This is a significant task, and if it must be done, than it must commence as early as possible. I would rather have a work around than through out all our work to date.
Thanks.
The only workaround I could think of would be to point to the splitter.js file directly rather then the resource coming from the DLL.However, apparently we don't ship the JavaScript file for the splitter, that looks like an oversight. Ok.... you could try this.
Create a extra javascript file ( a text file with a .js extension)
In it enter the following
$IG.SplitterPane.prototype ={
set_size:function(value) { /// <summary>Sets size of pane in pixels. That has effect only for expanded pane and only after first paint of control.</summary> /// <param name="value" type="Number">Size of pane in pixels.</param> /// <returns type="Boolean">Value of true means that size of pane was set. Value of false means failure,- size was not set due to collapsed state or before first paint.</returns> var ctl = this._owner; var pane = ctl._validPane(this, 1, 1); if(!pane) pane = ctl._validPane(this, -1, 1); if(!pane || this.get_collapsed() || !ctl._once) return false; var both = this._size + pane._size; if(value > both) value = both; value = this._validSize(value); var val2 = pane._validSize(both - value); value = both - val2; ctl._setPaneSize(this, value); ctl._setPaneSize(pane, val2); return true; }
}
And include this file in the page with the splitter
<script src="relativePath to the js file"></script>
Now this needs to be loaded after the normal javascript files are loaded (last declaration wins).
Okay, I've got my file created and loaded after all the normal javascript stuff, however, I'm getting it to actually work. I added it via script tags and the script manager and neither seem to work. If I add it via a script tag, I get a series of random javascript errors all relating to the SplitterPane javascript class. If I add it via script manager (or scriptmanager proxy) it complains that $IG.SplitterPane is null or not an object. What I had done was added the following lines:
Type.registerNamespace('Infragistics.Web.UI');
Figure this may work, but no luck. Any Ideas?