I'm trying to understand someone else's code, and what I'm seeing it do doesn't seem consistent, or with Telerik's documentation.
There is a RadSplitter:
It connects the OnClientLoaded event to the OnClientLoadedHandler javascript function. This function is passed a reference to the splitter object. This function sets the width of the splitter object by calling set_width() - which I can't see in the API documentation.
The API documentation mentions a SetWidth() method, not a set_width() method, which makes me uncertain that I understand what is going on. When I replace splitter.set_width() with splitter.setWidth(), I get an "Object doesn't support this property or method" error.
More confusing yet, when I try to access the RadSplitter's client-side object from javascript outside the OnClientLoadedHandler() event function, as described in the documentation I linked, I get another object entirely:
Looking at it in the Visual Studio 2008 debugger, the splitter object I get has entirely different methods and attributes than than did the splitter object that was passed to OnClientLoadedHandler(). The splitter object passed to the handler function has an empty id attribute and a _clientStateFieldID attribute equal to "ctl00_MasterContentPlaceHolder_RadSplitter1_ClientState". The splitter object returned by <%=RadSplitter1.ClientID %> has an id of "ctl00_MasterContentPlaceHolder_RadSplitter1", and doesn't have a _clientStateFieldID attribute at all. It doesn't have SetWidth(), setWidth(), or set_width() methods, either.
Color me confused.
There is a RadSplitter:
<telerik:RadSplitter ID="RadSplitter1" runat="server" LiveResize="true" |
OnClientLoaded="OnClientLoadedHandler" VisibleDuringInit="false"> |
It connects the OnClientLoaded event to the OnClientLoadedHandler javascript function. This function is passed a reference to the splitter object. This function sets the width of the splitter object by calling set_width() - which I can't see in the API documentation.
function OnClientLoadedHandler(splitter, args) |
{ |
// ... |
splitter.set_width(w); |
} |
More confusing yet, when I try to access the RadSplitter's client-side object from javascript outside the OnClientLoadedHandler() event function, as described in the documentation I linked, I get another object entirely:
var splitter = <%=RadSplitter1.ClientID %>; |
splitter.setHeight(123); |
Color me confused.