Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
213 views
Hi,
I am trying to create a variable for the RadTabStrip on my page, but $find keeps returning a null value. Here is my code (the javascript is in a RadCodeBlock at the foot of the page):

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
    <link href="css/StyleSheet.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery-1.5_1.js" type="text/javascript"></script>
    <script src="js/behaviours.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
         
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                    <ClientEvents OnRequestStart="jsAjaxStarting" OnResponseEnd="ajaxFinished" />
                    <AjaxSettings>
                        <telerik:AjaxSetting AjaxControlID="Button1">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="Panel1" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                        <telerik:AjaxSetting AjaxControlID="Button2">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="Panel2" />
                                <telerik:AjaxUpdatedControl ControlID="tab1IsAJAX" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>               
                    </AjaxSettings>
        </telerik:RadAjaxManager>
         
        <div id="loadingDiv" class="screenCenter" style="display: none;">
            <br />
            <br />
            <span>LOADING</span>
        </div>       
 
        <telerik:RadTabStrip ID="TestRadTabStrip" runat="server"
                             OnClientLoad="jsStoreLicenceApplicTabStripClientObject"
                             SelectedIndex="0" MultiPageID="RadMultiPage1">
            <Tabs>
                <telerik:RadTab PageViewID="RadPageView1" runat="server" Text="Tab 1" Value="Tab1" ></telerik:RadTab>
                <telerik:RadTab PageViewID="RadPageView2" runat="server" Text="Tab 2" Value="Tab2" ></telerik:RadTab>
            </Tabs>
        </telerik:RadTabStrip>
         
        <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0">
            <telerik:RadPageView ID="RadPageView1" runat="server">
                <asp:Panel ID="Panel2" runat="server">     
                    <p>This is page 1</p>
                </asp:Panel>
                <asp:Button ID="Button1" runat="server" Text="Go to Tab 2" OnClick="Click1" /><br />
                <asp:Label ID="tab1IsAJAX" Text="" runat="server" />
            </telerik:RadPageView>
            <telerik:RadPageView ID="RadPageView2" runat="server">
                <asp:Panel ID="Panel1" runat="server">               
                    <p>This is page 2</p>
                    <asp:Button ID="Button2" runat="server" Text="Go to Tab 1" OnClick="Click2" /><br />
                    <asp:Label ID="tab2IsAJAX" Text="" runat="server" />
                </asp:Panel>
                <asp:Button ID="Button3" runat="server" Text="Hide Panel" /><br />                       
            </telerik:RadPageView>           
        </telerik:RadMultiPage>       
         
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <script type="text/javascript">
 
                $(document).ready(hookUpEvents);
                 
                function hookUpEvents() {
 
                    var tabId = '<%= TestRadTabStrip.ClientID %>';
                    var tabStrip = $find(tabId);
 
                    debugger;
 
                    if (tabStrip) {
                        var selectedTab = tabStrip.get_selectedTab();
                        var tabvalue = selectedTab.get_value();
                    }
 
                    if (tabvalue === 'Tab2')
                        $('#' + '<%= RadPageView2.FindControl("Panel1").ClientID %>').bind('click', hidePanel);
                }  
            </script>
        </telerik:RadCodeBlock>
         
    </div>
    </form>
</body>
</html>

I am using a Web site project template and Telerik.Web.UI, Version=2010.3.1215.35

Any help would be appreciated. Cheers
David
Top achievements
Rank 1
 answered on 26 Jul 2011
2 answers
350 views
Hi,

Does any one know to select multiple checkboxes in a RadGrid? I have a .net webpage, it has a dropdownlist which has values(1,2,3,4,5,6). When I select a value from the dropdownlist it should select the same number of checkboxes in the RadGrid, starting from first row. I tried to write some clientside javascript code to capture the value and then set it to the rows in RadGrid. Does anyone know how you can achive this. Help will be appreciated.

Thanks,
Raji
Raji
Top achievements
Rank 1
 answered on 26 Jul 2011
2 answers
151 views
Hi there,

is it possible using either radtextbox, or radmaskedtextbox to limit the input to only one word ?

Regards,

Alan
Alan T
Top achievements
Rank 1
 answered on 25 Jul 2011
2 answers
179 views
I have found, and tried, some of the solutions for this problem in this forum.  I'm somewhat new to Telerik controls, and I'm sure this is part of my problem, but what I want to do should not be this difficult! 

I need to limit the height of a combobox when click (dropdown).
Here is the code (copied right from a lising on this forum):
//This function limits the size of the combo box dropdown size.
    function OnClientDropDownOpeningHandler(sender, eventArgs)
    {
    //set the max allowed height of the combo 
    var MAX_ALLOWED_HEIGHT = 140;
    //this is the single item's height 
    var SINGLE_ITEM_HEIGHT = 22;
    //var calculatedHeight = ctlUserCombo.get_items().get_count() * SINGLE_ITEM_HEIGHT;
    var dropDownDiv = sender.get_dropDownElement();
 
    if (calculatedHeight > MAX_ALLOWED_HEIGHT) 
    { 
        setTimeout (
            function () {
                dropDownDiv.firstChild.style.height = MAX_ALLOWED_HEIGHT + "px"; 
            }, 20
        );                
    } 
    else 
    { 
        setTimeout (
 
            function ()
            {
                dropDownDiv.firstChild.style.height = calculatedHeight + "px"; 
            }, 20
        );
    }
  
    }
The first time I tried this I got a runtime error when I tried to calculate calculatedHeight.  The error was that the method was "Object doesn't support this property or method".  So I just put a hard value in there to see if that would work...NOPE, go the same error on the line trying to get the dropDownDiv.

I also tried sending in the name of the control directly instead of using the SENDER parameter...same thing happens. 

This page is used in several other applications, and some of them cut off the bottom of the dropdown.  All I need is a way to limit the height so that doesn't happen and the users can scroll to the bottom.  Why is this so hard?  In the web config it appears the controls are from Q3 2008, and that cannot change. 

Can anyone see what the heck I'm doing wrong and/or point me to some documentation that actually works?

Thanks from a VERY frustrated developer.

Rich
Thad
Top achievements
Rank 2
 answered on 25 Jul 2011
2 answers
110 views
telerik Hello friends would give me a help with this problem I have is that I have the paa RadMenu in them I have new, save, edit, modify, search, example

When I click the Save button checks if I have entered the relevant data if all data entry saves the save data but when I want to display a radwindows saying "successfully saved" as that radwindows designed it myself and call it a click of a button and when I call do not call it but if you click ago called when the other buttons I hope I can help



from already thank you very much here is my example I have developed

Here my example
ROJAS
Top achievements
Rank 1
 answered on 25 Jul 2011
1 answer
121 views
Hello,

I noticed this in the latest build of Telerik, and was not present in the previous version that we were using (2010 first quarter).  We're now using: 2011.1.519.35 

I've tested this across all 3 major browsers for PC (IE8, FF 5.0, Chrome latest)

if you use the following HTML and paste it into HTML view in the Editor, switch to Design view and select a link, and ctrl-k or use the toolbar/menu to get to the link properties.. It forces you to the 2nd tab "anchor" and if you go to the first tab "hyperlink" the URL is not populated.. 


<a href="http://twitter.com" name="twitter" >twitter</a> <br />
<a href="http://facebook.com" name="facebook">facebook</a> <br />
<a href="http://linkedin.com" name="linkedin">linkedin</a> <br />
<a href="http://youtube.com" name="youtube" >youtube</a>

Brian Garson
Top achievements
Rank 2
 answered on 25 Jul 2011
2 answers
144 views
I am actually using Q2.
Where should i place my skin folder on server?
Srinivasa
Top achievements
Rank 1
 answered on 25 Jul 2011
10 answers
563 views
Is there any way to disable the return key behavior in a RadGrid? Thanks. 
Daniel Aquere
Top achievements
Rank 2
 answered on 25 Jul 2011
1 answer
98 views
Scenario:
  1. User clicks "Save" button
  2. I populate a javascript object with the form values, serialize it
  3. ???
  4. Notification is shown with the saved results

I'm unsure what to do for step 3...
saveNotificationPanel.set_value(Sys.Serialization.JavaScriptSerializer.serialize(values));

I'm setting the values, and I have it wired up to the Webservice, but I'm not getting an xmlhttpcallback happening.

Is there additional something I need to do to force that callback to happen?  I'm using it like the RadXmlHttpPanel where set_value does the callback, but I assume this works differently?

The idea is the values get sent to the webservice which saves them to the DB, and the result is returned to the page as Success or Fail and I'll change the panel details clientside.

Steve
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 25 Jul 2011
1 answer
151 views
Hi!  How can I go from displaying an EmptyDataTemplate to an ItemTemplate when a user clicks a button? 

Currently I have an 'Add' button in the EmptyDataTemplate of a RadListView.  I want the user to click the 'Add' button and have the ItemTemplate display (which has various fields for user input).

Here's the aspx code for the EmptyDataTemplate:
<EmptyDataTemplate>
    <table>
        <tr>
            <td>
                <fieldset style="width: 800px">
                    <legend>SubSelection</legend>No Sub-Selections available.
                </fieldset>
            </td>
            <td style="width: 25%; text-align: right;">
                <asp:Button ID="btnAdd" runat="server" Text="Add" OnClick="btnAdd_Click" CommandName="InitInsert"/>
            </td>
        </tr>
    </table>
</EmptyDataTemplate>

Here's the vb.net code for the button click event:
Protected Sub btnAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        RadListView1.InsertItemPosition = RadListViewInsertItemPosition.FirstItem
        RadListView1.Rebind()
End Sub

I can step through the code when debugging, but nothing happens when the 'Add' button is clicked.

I also have the same 'Add' button on the EditItemTemplate with a value of 'InitInsert' for the 'CommandName'.  This button works fine since the EditItemTemplate fires off the RadListView ItemCommand routine.  In the ItemCommand routine for the 'InitInsert' command I have the same 2 lines of code used for the button click.

I'm not understanding why this doesn't work for the button click event, and was wondering if someone could explain it to me or provide an alternate solution.

Thanks!
Amy
Top achievements
Rank 1
 answered on 25 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?