Hi,
I have some complicated scenario over here. I have one User control with one button, on click of this button modal popup is open up.
I need electives from below:
* Can same Panel control (Within modal popup) open in radtooltip?
OR
* If I will make new user control and call this new user control as tooltip on parent user control's button?
Thanks,
Kaushal Jani
I have some complicated scenario over here. I have one User control with one button, on click of this button modal popup is open up.
I need electives from below:
* Can same Panel control (Within modal popup) open in radtooltip?
OR
* If I will make new user control and call this new user control as tooltip on parent user control's button?
Thanks,
Kaushal Jani
2 Answers, 1 is accepted
0
Hi Kaushal,
The answer to your question depends on the current functionality you are using. As a quick answer - I believe placing your content in a user control will work out easily, yet please read through this post for several alternatives - the options for loading content in the RadToolTip or RadToolTipManager as I believe it will allow you to choose the scenario that best fits your needs:
1) RadToolTip holds static content which you can place directly between its opening and closing tag. Thus if there isn't too much content you want to show in it you can simply move it so. This is explained in this help article: http://www.telerik.com/help/aspnet-ajax/tooltip-content.html. As you can see you can do this declaratively, or from the code-behind
2) The RadToolTipManager loads its content when needed via an AJAX request. This is usually done by putting your content in a user control, as this is the simplest way - you just add code for one control. This is explained in this article: http://www.telerik.com/help/aspnet-ajax/tooltipmanager-ajaxupdate.html.
You can also examine the online demos for the RadToolTIp to see the functionality of the control. I believe this one shows the difference between the two approaches clearly.
A third, more complex option is to add an empty iframe in the RadToolTip and use the OnClientShow event to change its src to the page you were previously loading. You could also add a global JS variable to use as flag so that you do not reload the content each time.
Regards,
Marin
the Telerik team
The answer to your question depends on the current functionality you are using. As a quick answer - I believe placing your content in a user control will work out easily, yet please read through this post for several alternatives - the options for loading content in the RadToolTip or RadToolTipManager as I believe it will allow you to choose the scenario that best fits your needs:
1) RadToolTip holds static content which you can place directly between its opening and closing tag. Thus if there isn't too much content you want to show in it you can simply move it so. This is explained in this help article: http://www.telerik.com/help/aspnet-ajax/tooltip-content.html. As you can see you can do this declaratively, or from the code-behind
2) The RadToolTipManager loads its content when needed via an AJAX request. This is usually done by putting your content in a user control, as this is the simplest way - you just add code for one control. This is explained in this article: http://www.telerik.com/help/aspnet-ajax/tooltipmanager-ajaxupdate.html.
You can also examine the online demos for the RadToolTIp to see the functionality of the control. I believe this one shows the difference between the two approaches clearly.
A third, more complex option is to add an empty iframe in the RadToolTip and use the OnClientShow event to change its src to the page you were previously loading. You could also add a global JS variable to use as flag so that you do not reload the content each time.
Regards,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Kaushal
Top achievements
Rank 1
answered on 21 Jan 2012, 04:54 AM
Hi Marin,
I really thank full to you for your reply. it helped me a lot to in my development.I followed your comments and I got result with below code.
User Control 1: (In User Control 1 I am calling User Control 2 which will populate in radtooltip)
Thanks Marin once again,
Kaushal Jani
I really thank full to you for your reply. it helped me a lot to in my development.I followed your comments and I got result with below code.
User Control 1: (In User Control 1 I am calling User Control 2 which will populate in radtooltip)
<
telerik:RadAjaxManagerProxy
ID
=
"ramRadAjaxManager"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"pnlModal"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"rtlunits"
LoadingPanelID
=
"ralpRadAjaxLoadingPanel"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManagerProxy
>
<
div
id
=
"divMain"
runat
=
"server"
style
=
"height: 30px; display: block; margin: 3px;"
>
<
telerik:RadButton
ID
=
"btnShow"
runat
=
"server"
AutoPostBack
=
"True"
ButtonType
=
"StandardButton"
Icon-PrimaryIconUrl
=
"~/Images/Filter_Icon_0.gif"
OnClick
=
"btnShow_OnClick"
>
</
telerik:RadButton
>
<
telerik:RadToolTip
runat
=
"server"
ID
=
"rttBuDisplay"
Width
=
"250px"
Modal
=
"true"
TargetControlID
=
"btnShow"
ManualClose
=
"true"
Title
=
"Another User Control"
>
<
telerik:RadAjaxPanel
ID
=
"rapBUDisplay"
runat
=
"server"
>
<
AnotherUCDisplay:AnotherUC
ID
=
"buDisplay"
runat
=
"server"
/>
</
telerik:RadAjaxPanel
>
</
telerik:RadToolTip
>
</
div
>
<
asp:Panel
ID
=
"pnlMpMain"
runat
=
"server"
>
<
ajaxToolkit:ModalPopupExtender
TargetControlID
=
"hnfDummy"
ID
=
"mpeUnit"
CancelControlID
=
"imgbtnClose"
runat
=
"server"
Enabled
=
"True"
BackgroundCssClass
=
"modalBackground"
PopupControlID
=
"pnlModal"
>
</
ajaxToolkit:ModalPopupExtender
>
<
asp:HiddenField
ID
=
"hnfDummy"
runat
=
"server"
/>
<
asp:Panel
ID
=
"pnlModal"
runat
=
"server"
Style
=
"width: 500px;"
CssClass
=
"pop-up"
>
<
div
class
=
"pop-up-content"
style
=
"padding-bottom: 5px;"
>
<
div
class
=
"pop-up-top"
>
<
h1
>
Select Bussiness Units:
</
h1
>
<
a
href
=
"#"
>
<
asp:ImageButton
ID
=
"imgbtnClose"
runat
=
"server"
Width
=
"7"
Height
=
"8"
border
=
"0"
ToolTip
=
"Close"
AlternateText
=
"Close"
ImageAlign
=
"AbsMiddle"
ImageUrl
=
"~/Images/close.png"
/>
</
a
>
</
div
>
<
fieldset
style
=
"margin: 0px 0px 0px 0px"
>
<
telerik:RadTreeList
ID
=
"rtlunits"
runat
=
"server"
DataKeyNames
=
"Unit_ID"
ClientSettings-AllowPostBackOnItemClick
=
"false"
OnNeedDataSource
=
"rtlunits_OnNeedDataSource"
ParentDataKeyNames
=
"ParentUID"
OnItemCreated
=
"rtlunits_OnItemCreated"
AutoGenerateColumns
=
"false"
AllowMultiItemSelection
=
"true"
>
<
Columns
>
<
telerik:TreeListSelectColumn
HeaderStyle-Width
=
"38px"
UniqueName
=
"UnitCheckboxes"
>
</
telerik:TreeListSelectColumn
>
<
telerik:TreeListBoundColumn
DataField
=
"Unit_ID"
HeaderText
=
"Unit_ID"
Visible
=
"false"
UniqueName
=
"Unit_ID"
/>
<
telerik:TreeListBoundColumn
DataField
=
"LegalName"
HeaderText
=
"Name"
UniqueName
=
"LegalName"
/>
</
Columns
>
<
ClientSettings
>
<
Selecting
UseSelectColumnOnly
=
"true"
AllowItemSelection
=
"true"
/>
<
ClientEvents
OnItemSelected
=
"OnClientNodeClicked"
OnItemDeselected
=
"OnClientNodeClicked"
/>
<
Scrolling
AllowScroll
=
"true"
UseStaticHeaders
=
"true"
SaveScrollPosition
=
"true"
ScrollHeight
=
"300"
/>
</
ClientSettings
>
</
telerik:RadTreeList
>
</
fieldset
>
</
div
>
</
asp:Panel
>
</
asp:Panel
>
Thanks Marin once again,
Kaushal Jani