I thought I posted this in Prometheus but relized I didn't so I am posting it here as well
how do you capture it from custom commands? I have tried your demo and still can't ficure it out. on your demo you call function CustomCommand(radDock, args). I have tried raddoc.getid() didn't work. I have tried raddock.id, and doesn't work. please help
thank you
how do you capture it from custom commands? I have tried your demo and still can't ficure it out. on your demo you call function CustomCommand(radDock, args). I have tried raddoc.getid() didn't work. I have tried raddock.id, and doesn't work. please help
thank you
9 Answers, 1 is accepted
0
Hello,
Your confusion was caused by a minor mistake in our example - the parameter in the function is not the dock object, but the command object. Here is how you can get the id of the dock:
function CustomCommand(dockCommand, args)
{
alert(dockCommand.get_RadDock().get_id());
}
Our online example will be changed as soon as possible.
Best wishes,
Petya
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Your confusion was caused by a minor mistake in our example - the parameter in the function is not the dock object, but the command object. Here is how you can get the id of the dock:
function CustomCommand(dockCommand, args)
{
alert(dockCommand.get_RadDock().get_id());
}
Our online example will be changed as soon as possible.
Best wishes,
Petya
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
rebtech
Top achievements
Rank 1
answered on 16 Jul 2007, 01:43 PM
in dock state you have the following variables.
{"UniqueName":"46"
,"Width":"150px"
,"Height":"150px"
,"Top":"369px"
,"Left":"257px"
,"Closed":"False"
,"Collapsed":"False"
,"Pinned":"False"
,"Title":"RSS Reader"
,"Text":""
,"Tag":"51"
,"Index":"0"
,"DockZoneID":"ZoneLeft"}
is there any way that I can access them in client side javascript?
or is there a replacement for (SetSize)?
thanks
{"UniqueName":"46"
,"Width":"150px"
,"Height":"150px"
,"Top":"369px"
,"Left":"257px"
,"Closed":"False"
,"Collapsed":"False"
,"Pinned":"False"
,"Title":"RSS Reader"
,"Text":""
,"Tag":"51"
,"Index":"0"
,"DockZoneID":"ZoneLeft"}
is there any way that I can access them in client side javascript?
or is there a replacement for (SetSize)?
thanks
0
Hello,
If you simply want to set new values for width/height of a RadDock, then I would suggest the following approach:
<telerik:raddocklayout id="RadDockLayout1" runat="server" skin="Default">
<telerik:raddockzone id="RadDockZone1" runat="server" orientation="Horizontal"
width="700px">
<telerik:raddock id="RadDock3" runat="server" dockmode="Docked" height="280px" title="Dock3"
width="200px">
</telerik:raddock>
</telerik:raddockzone>
<telerik:raddockzone backcolor="Red" id="RadDockZone2" runat="server" minheight="300px"
width="700px">
</telerik:raddockzone>
</telerik:raddocklayout>
<input id="Button2" onclick="SetSize()" type="button" value="Set Size" />
<script type="text/javascript">
function SetSize()
{
var dock = $find('<%= RadDock3.ClientID%>');
dock.set_Size(500, 100);
}
Telerik.Web.UI.RadDock.prototype.set_Size = function(width, height)
{
this.get_element().style.width = width;
this.set_Width(width);
this._setCommandsContainerWidth();
this.get_element().style.height = height;
this.set_Height(height);
this._setContentContainerHeight(true);
this.updateClientState();
}
</script>
With this approach the new size will not persist through postbacks. Currently, this feature has been logged in our system and you cannot workaround it.
Sincerely yours,
Petya
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
If you simply want to set new values for width/height of a RadDock, then I would suggest the following approach:
<telerik:raddocklayout id="RadDockLayout1" runat="server" skin="Default">
<telerik:raddockzone id="RadDockZone1" runat="server" orientation="Horizontal"
width="700px">
<telerik:raddock id="RadDock3" runat="server" dockmode="Docked" height="280px" title="Dock3"
width="200px">
</telerik:raddock>
</telerik:raddockzone>
<telerik:raddockzone backcolor="Red" id="RadDockZone2" runat="server" minheight="300px"
width="700px">
</telerik:raddockzone>
</telerik:raddocklayout>
<input id="Button2" onclick="SetSize()" type="button" value="Set Size" />
<script type="text/javascript">
function SetSize()
{
var dock = $find('<%= RadDock3.ClientID%>');
dock.set_Size(500, 100);
}
Telerik.Web.UI.RadDock.prototype.set_Size = function(width, height)
{
this.get_element().style.width = width;
this.set_Width(width);
this._setCommandsContainerWidth();
this.get_element().style.height = height;
this.set_Height(height);
this._setContentContainerHeight(true);
this.updateClientState();
}
</script>
With this approach the new size will not persist through postbacks. Currently, this feature has been logged in our system and you cannot workaround it.
Sincerely yours,
Petya
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
rebtech
Top achievements
Rank 1
answered on 17 Jul 2007, 02:07 PM
i am not having any problems changing the size on the client side. The problem is the new settings are not showing up when I use
GetRegisteredDocksState on the server side to get the new height and width. How do I get them to show up on the post back?
Thanks
0
rebtech
Top achievements
Rank 1
answered on 17 Jul 2007, 02:07 PM
i am not having any problems changing the size on the client side. The problem is the new settings are not showing up when I use
GetRegisteredDocksState on the server side to get the new height and width. How do I get them to show up on the post back?
Thanks
0
Hello rebtech,
1. If you set width/height client-side then you won't be able to get these values on the server because this functionality has not been implemented yet.
2. If you set width/height server-side then you should be able to get these values with GetRegisteredDocksState. If however you do not get them, then please send us sample running code that reproduces the issue and we will take a look at it to examine the origin of the issue.
Looking forward to your reply.
Regards,
Petya
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
1. If you set width/height client-side then you won't be able to get these values on the server because this functionality has not been implemented yet.
2. If you set width/height server-side then you should be able to get these values with GetRegisteredDocksState. If however you do not get them, then please send us sample running code that reproduces the issue and we will take a look at it to examine the origin of the issue.
Looking forward to your reply.
Regards,
Petya
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
rebtech
Top achievements
Rank 1
answered on 17 Jul 2007, 05:04 PM
and there's no way to edit these variables? and if there is not access to all of them what about the tag variable?
thanks
{"UniqueName":"46"
,"Width":"150px"
,"Height":"150px"
,"Top":"369px"
,"Left":"257px"
,"Closed":"False"
,"Collapsed":"False"
,"Pinned":"False"
,"Title":"RSS Reader"
,"Text":""
,"Tag":"51"
,"Index":"0"
,"DockZoneID":"ZoneLeft"}
thanks
{"UniqueName":"46"
,"Width":"150px"
,"Height":"150px"
,"Top":"369px"
,"Left":"257px"
,"Closed":"False"
,"Collapsed":"False"
,"Pinned":"False"
,"Title":"RSS Reader"
,"Text":""
,"Tag":"51"
,"Index":"0"
,"DockZoneID":"ZoneLeft"}
0
rebtech
Top achievements
Rank 1
answered on 17 Jul 2007, 06:12 PM
if that can't be done I built a work around using a custom command and hidden feilds that are assoiciated with the dock objects.
http://www.saidcom.net/RAD/Default.aspx
http://www.saidcom.net/RAD/Default.aspx
0
Hello rebtech,
The properties you mention are supposed to be accessed/modified on the server. About your last post - I am glad you found a solution to your issue. If you still experience any problems, please write us again with a detailed explanation about what you are trying to achieve and what are the problems that you encounter.
Sincerely yours,
Petya
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
The properties you mention are supposed to be accessed/modified on the server. About your last post - I am glad you found a solution to your issue. If you still experience any problems, please write us again with a detailed explanation about what you are trying to achieve and what are the problems that you encounter.
Sincerely yours,
Petya
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center