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

Use RadWindow like jquery dialog?

3 Answers 79 Views
Window
This is a migrated thread and some comments may be shown as answers.
Wired_Nerve
Top achievements
Rank 2
Wired_Nerve asked on 12 Dec 2012, 09:10 PM
On my master page I have a DIV that is used to return a list of results when  a user uses our generic search function at the top of all the pages in our site.  I am currently using jquery dialog to make the Search Result DIV look and act like a window.  While this works great, it is a departure from the look and feel from the rest of the site because it is not styled like Telerik controls...

Is there a means to do a similar ability in Telerik asp.net ajax? 

In my code I have something like this:
function OpenSearchInfo() {
            var search = $("#RadTextBoxTag").val();
  
            if (search.length < 3) {
                alert("A minimum of three characters is required for Search.");
                return false;
            }
  
            $("#SearchResults").show();
            $("#SearchResults").dialog({
                title:"Results",
                height: 300, width: 500,
                position: ['middle', 40],
                close: function() {
                      $find("<%= RadTextBoxTag.ClientID %>").clear();
                }
  
            });


The panel and Div
  <asp:Panel ID="PanelFindTag" runat="server" DefaultButton="ImageButtonSearch">
                    <div class="FindTag">
                        <table>
                            <tr>
                                <td>
                                    <telerik:RadTextBox ID="RadTextBoxTag" runat="server" EmptyMessage="Tag / Serial Search"
                                        ClientIDMode="Static" />
                                    <div id="SearchResults">
                                        <div id="innerSearchResults">
                                        </div>
                                    </div>
                                </td>
                                <td>
                                    <asp:ImageButton ID="ImageButtonSearch" AlternateText="Tag / Serial Search" ToolTip="Tag / Serial Search"
                                        runat="server" OnClientClick="OpenSearchInfo();return false;" />
                                </td>
                            </tr>
                        </table>
                    </div>
                </asp:Panel>

3 Answers, 1 is accepted

Sort by
0
Kevin
Top achievements
Rank 2
answered on 12 Dec 2012, 09:29 PM
Hello Warren,

I think the control you're trying to replicate is the RadComboBox with LoadOnDemand. If you want it to look like a textbox, you can just set ShowToggleImage="false".

I hope that helps.
0
Wired_Nerve
Top achievements
Rank 2
answered on 12 Dec 2012, 11:11 PM
I am trying to open the DIV as a modal...  nothing really to do with a combo box...
0
Accepted
Marin Bratanov
Telerik team
answered on 13 Dec 2012, 02:19 PM
Hello Warren,

You can place the panel in a RadWindow's ContentTemplate and show() the RadWindow. This demo shows how to use this mode of the control: http://demos.telerik.com/aspnet-ajax/window/examples/contenttemplatevsnavigateurl/defaultcs.aspx. The client-side API of the control allows you to control its title, size and position if you do not want to declare them in the markup: http://www.telerik.com/help/aspnet-ajax/window-programming-radwindow-methods.html. The OnClientClose event we expose can be used to execute code after the popup is closed: http://demos.telerik.com/aspnet-ajax/window/examples/clientsideevents/defaultcs.aspx?product=window.


Regards,
Marin Bratanov
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.
Tags
Window
Asked by
Wired_Nerve
Top achievements
Rank 2
Answers by
Kevin
Top achievements
Rank 2
Wired_Nerve
Top achievements
Rank 2
Marin Bratanov
Telerik team
Share this question
or