This is a migrated thread and some comments may be shown as answers.

RadGrid in RadToolTip?

3 Answers 140 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 19 Dec 2008, 10:47 AM
Hey Telerik Team!

I am new to Telerik and trying to create a Popup that displays a RadGrid (which can be edited and added to). The Grid displays the Values that are in a RadComboBox, this should be used to add or change values.

My initial approach was to set up the RadGrid inside of a ToolTip, but I'm not sure if this is possible, or if it's a good solution at all. Is it possible to have the RagGrid use Ajax Postbacks while it's in the ToolTip or will the Tooltip close whenever there is a update to the Grid?

Is there a better solution to this problem?

Thank you for any suggestions,
Peter Ferak

3 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 22 Dec 2008, 12:32 PM
Hi Peter,

I am not quite sure what is your exact scenario and setup but basically you can achieve the desired behavior with a RadToolTip - having an update panel in it is a valid scenario. You can find the RadToolTip's demos here.

I also suggest to examine the RadWindow control - its demos are here.

When you choose the control that meets best your needs, you can start your implementation and you can rely on our help if you encounter problems.


Sincerely yours,
Svetlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Peter
Top achievements
Rank 1
answered on 23 Dec 2008, 06:38 AM
I decided to use the RadToolTipManager (because I need to pass data and events to other pages, and using a window here would have made it more complicated, though I considered that option) and it works ok. I still have a few problems updating the Grid inside of the ToolTip, but I think this is because I have not found the right Ajax Settings for the controls, I will continue to work on that.

One problem I am a little bit stuck with is the following: Inside of the RadGrid (which is in the ToolTip) I have a DropDownBox and onclick it gets rendered on the actual page and behind the ToolTip. I tried setting the z-order of the components with no effect. I'm thinking it has to do with the fact that in Code my Grid is on the page in asp:panel that is set to invisible and than added to the ToolTip and set to visible. I read somewhere in the forum that the DropDownBoxes get rendered differently, would it make a difference if I created the Grid by Code and added it to the RadGrid directly?

Thank you for all the help! You guys are great, I'm glad my company bought your product, definately makes it a lot easier on us.

I think my mistakes are trivial I'm just not seeing them yet, I only started working with your components about a week ago. If it helps I can built a demo and open a support ticket.

Sincerely,
Peter Ferak
0
Svetlina Anati
Telerik team
answered on 26 Dec 2008, 10:16 AM

Hello Peter,

I am not quite sure what is your exact setup but you are correct and the described behavior most probably comes from the fact that the z-index of the tooltip is bigger than the one of the combobox. However, you can achieve the desired behavior by setting a bigger z-index to the RadComboBox by using its style attribute as shown below:

 

 <asp:HyperLink ID="HyperLink1" runat="server">Mouse over to show tooltip</asp:HyperLink>    
        <telerik:RadToolTip ID="RadToolTip1" OnClientHide=HideDropDownFunction runat="server" TargetControlID=HyperLink1 Sticky=true >    
            <telerik:RadComboBox ID="RadComboBox1" runat="server" style="z-index:8001">     
                <Items>    
                    <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem1" Value="RadComboBoxItem1" />    
                    <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem2" Value="RadComboBoxItem2" />    
                    <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem3" Value="RadComboBoxItem3" />    
                    <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem4" Value="RadComboBoxItem4" />    
                    <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem5" Value="RadComboBoxItem5" />    
                </Items>    
                <CollapseAnimation Duration="200" Type="OutQuint" />    
            </telerik:RadComboBox>    
        </telerik:RadToolTip>    
 
 
 
 

   

You can find more information about controlling visual appearance of absolute positioned RadControls in the following location:

http://www.telerik.com/help/aspnet-ajax/controlling-absolute-positioning-with-zindex.html

I also assume that you would like to hide the dropdown list of the RadComboBox when the RadToolTip hides - in order to do this you can use javascript as shown below:

 

  <script type="text/javascript">     
        function HideDropDownFunction()     
        {     
         var combo = $find("<%= RadComboBox1.ClientID %>");     
         if(combo && combo.get_dropDownElement().style.display != "none")     
         {     
           combo.hideDropDown();     
         }     
        }      
        </script>    
 

 

For your convenience I attached a sample demo. In case this does not help, please open a new support ticket and send me a fully runnable reproduction demo along with detailed explanations and reproduction steps. Once I receieve it, I will do my best to help.

Best wishes,

Svetlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
ToolTip
Asked by
Peter
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Peter
Top achievements
Rank 1
Share this question
or