Hello ashish,
Here is another idea to get the desired scenario. You can add another custom command to the dockable object and set its Enabled property to False so that it does not appear in the control and at the same time set its Tooltip property to the value you want to pass to the
OnClientCommand. Then in OnClientCommand you can get the disabled custom command's tooltip value and use it. I am attaching a simple page demonstrating this approach. Here is how it looks like:
[ASPX]
<script type="text/javascript">
function clientEditWidget(dockableObject, command)
{
alert(dockableObject.GetCommandByName("MyCustomCommand").title);
}
</script>
<cc1:raddockingmanager id="RadDockingManager1" runat="server" skin="Default" />
<table>
<tr>
<td>
<cc1:raddockingzone id="RadDockingZone1" runat="server" width="172px">
<cc1:raddockableobject id="RadDockableObject1" runat="server" text="Dock1">
</cc1:raddockableobject>
<cc1:raddockableobject id="RadDockableObject2" runat="server" text="Dock2">
</cc1:raddockableobject>
</cc1:raddockingzone>
</td>
<td>
<cc1:raddockingzone id="RadDockingZone2" runat="server" width="172px">
</cc1:raddockingzone>
</td>
</tr>
</table>
[C#]protected void Page_Load(object sender, EventArgs e)
{
RadDockableObjectCommand l_EditCommand = new RadDockableObjectCommand("editWidget");
l_EditCommand.ToolTip = "It is work and edit";
l_EditCommand.Image = "edit.gif";
l_EditCommand.OnClientCommand = "clientEditWidget";
RadDockableObject2.Commands.Add(l_EditCommand);
RadDockableObjectCommand hiddenCommand = new RadDockableObjectCommand();
hiddenCommand.ToolTip = "new value";//the value you need in OnClientCommand hiddenCommand.Name = "MyCustomCommand";
hiddenCommand.Enabled = false;
RadDockableObject2.Commands.Add(hiddenCommand);
}
Hope you find it helpful.
Regards,
Petya
the Telerik team