Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
115 views
$find() is failing miserably for me when I try to obtain a reference to the RadMultiPage control on my page. The following just returns null on the second statement of showPageView .Here is my markup... I've got the showPageView function bound to the OnClientItemClicked event of the RadMenu. I'm just trying to show a different multiPage when a RadMenuItem is clicked. Extremely simple, I know. Any thoughts? This is driving me crazy. I'm using VS2008 and v 2010.2.929.35

Thanks in advance for any help/insight!

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
 
<!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>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
    <link href="CSS/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </asp:ScriptManager>
    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
        <script type="text/javascript">
            $(document).ready(function() {      // Wait for the HTML to finish loading.
                var resize = function() {
                    var height = $(window).height();  // Get the height of the browser window area.
                    var element = $("form");          // Find the element to resize.
                    element.height(height);           // Set the element's height.
                }
                resize();
                $(window).bind("resize", resize);
            });
 
            function showPageView(sender, eventArgs) {
                var clientId = "<%= RadMultiPage1.ClientID %>";
                var multipage = $find(clientId);
                if (eventArgs.get_item().get_value() != null) {
                    alert(eventArgs.get_item().get_value());
                    var pageView = multipage.findPageViewByID(eventArgs.get_item().get_value());
                    if (pageView)
                        pageView.set_selected(true);
                }
            }
    </script>
    </telerik:RadScriptBlock>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div id="mainWrapper">
        <div id="pageWrapper">
            <div id="topWelcomeBanner">
                <div id="welcomebox">
                    <a target="_blank" href="http://www.mercer.com:80/regredirect.htm?siteLanguage=100">Register on our site</a
                    <font style="color:#0057A6">|</font>
                    <a target="_blank" href="https://clients.haifc.com">Log in to Client Portal</a>
                </div>
            </div>
            <div id="masthead">
                <a href="">
                    <img border="0" src="images/mercer_logo_175x24.gif" name="cmp_img_global_header_logo" alt="Mercer" title="Mercer"/>
                </a>
                <div align="right" style="font-size:10px" class="piller1">
                    <a href="">
                        <img border="0" src="images/mercer_pillars_new.gif" name="cmp_img_global_header_logo" alt="Consulting. Outsourcing. Investments."/>
                    </a>
                </div>
            </div>
            <div class="hnav">
                <telerik:RadMenu ID="RadMenu1" runat="server" Flow="Horizontal" OnClientItemClicked="showPageView" CssClass="menu">
                <DefaultGroupSettings ExpandDirection="Auto" Flow="Vertical" />
                <CollapseAnimation Duration="200" Type="OutQuint" />
                <Items>
                    <telerik:RadMenuItem runat="server" ExpandMode="ClientSide" Text="Home" Value="RadPageView6" Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Bold="true">
                        <GroupSettings ExpandDirection="Auto" Flow="Vertical" />
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem runat="server" ExpandMode="ClientSide" Text="Who We Are" Value="RadPageView1" Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Bold="true">
                        <GroupSettings ExpandDirection="Auto" Flow="Vertical" />
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem runat="server" ExpandMode="ClientSide" Text="Who We Serve" Value="RadPageView2" Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Bold="true">
                        <GroupSettings ExpandDirection="Auto" Flow="Vertical" />
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem runat="server" ExpandMode="ClientSide" Text="Research" Value="RadPageView3" Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Bold="true">
                        <GroupSettings ExpandDirection="Auto" Flow="Vertical" />
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem runat="server" ExpandMode="ClientSide" Text="Media Center" Value="RadPageView4" Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Bold="true">
                        <GroupSettings ExpandDirection="Auto" Flow="Vertical" />
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem runat="server" ExpandMode="ClientSide" Text="Contact Us" Value="RadPageView5" Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Bold="true">
                        <GroupSettings ExpandDirection="Auto" Flow="Vertical" />
                    </telerik:RadMenuItem>
                </Items>
                <ExpandAnimation Type="OutQuart" />
            </telerik:RadMenu>              
            </div>
                    <div id="leftCol">
                        <telerik:RadMultiPage ID="RadMultiPage1" runat="server"
                                            SelectedIndex="0">
                            <telerik:RadPageView ID="RadPageView6" runat="server">                                           
                            </telerik:RadPageView>
                            <telerik:RadPageView ID="RadPageView1" runat="server">                                  
                            </telerik:RadPageView>
                            <telerik:RadPageView ID="RadPageView2" runat="server">                              
                            </telerik:RadPageView>
                            <telerik:RadPageView ID="RadPageView3" runat="server">
                            </telerik:RadPageView>
                            <telerik:RadPageView ID="RadPageView4" runat="server">
                                Media Center</telerik:RadPageView>
                            <telerik:RadPageView ID="RadPageView5" runat="server">
                                </telerik:RadPageView>
                        </telerik:RadMultiPage>
                    </div>
                <div id="rightCol">                 
                    <img src="images/DRH.gif" width="121px" height="212px" alt="Dennis R. Hammond"  />
                    <div id="overlay"></div>
                    <div id="dennis">Dennis Hammond</div>
                    <div style="margin-bottom:8px" class="hrboxForMercerInNewsRightBucket"></div>
                    <h3><font color="#000000"><strong>Research Weekly Update</strong></font></h3>
                    <br />
                    <asp:Button ID="btnWeekly" runat="server" Text="Get the Latest" CssClass="headerbutton" PostBackUrl="http://www.haifc.com/ResearchLibrary/weekly/2011/09062011.pdf"/>
                    <div style="margin-bottom:8px" class="hrboxForMercerInNewsRightBucket"></div>
                    <div id="connect">
                     <h3><font color="#000000"><strong>Connect with us</strong></font></h3>
                            <br />
                           <p style="font-size:12px; margin-bottom:10px;">
                          <span class="iconMercerInNews">
                            <a href="http://twitter.com/MercerInsights" target="_blank">
                            <img align="absmiddle" src="images/icn-share-twitter_14x14.gif"/>
                            </a>
                            </span>
                              <a href="http://twitter.com/MercerInsights" target="_blank" class="linksNoSize">Twitter</a>
                            </p>
                           <p style="font-size:12px; margin-bottom:10px;">
                          <span class="iconMercerInNews">
                            <a href="http://www.linkedin.com/groups?mostPopular=&;gid=113026" target="_blank">
                            <img align="absmiddle" src="images/icn-share-linkedin_14x14.gif"/>
                            </a>
                            </span>
                              <a href="http://www.linkedin.com/groups?mostPopular=&;gid=113026" target="_blank" class="linksNoSize">LinkedIn</a>
                            </p>
                           <p style="font-size:12px; margin-bottom:10px;">   
                          <span class="iconMercerInNews">
                            <a href="http://www.facebook.com/MercerInsights" target="_blank">
                            <img align="absmiddle" src="images/icn-share-facebook_14x14.gif"/>
                            </a>
                            </span>
                              <a href="http://www.facebook.com/MercerInsights" target="_blank" class="linksNoSize">Facebook</a>
                             </p>
                             <div style="margin-bottom:8px" class="hrboxForMercerInNewsRightBucket"></div>
                      </div>
                </div>
                <div id="footer">
                    <hr />
                    <table width="100%" cellspacing="0" cellpadding="0" border="0">
                        <tbody><tr>
                            <td valign="top" align="left">
                            <p style="margin-bottom:20px;"><a href="http://www.mmc.com" title="Marsh & McLennan Companies" target="_blank">
                            <img border="0" src="images/parent_logo_199x27.gif" name="cmp_img_global_header_logo" alt="Consulting. Outsourcing. Investments."/>
                            </a></p>
                            </td>
                            <td valign="top">
                            <div id="footertable">
                                <a href="http://www.mercer.com:80/rsslisting.htm?siteLanguage=100"><img style="cursor: pointer" src="images/icon_rss.gif"></a> |  
                                <a href="http://www.mercer.com:80/termsofuse.htm?siteLanguage=100">Terms of use</a> | <a href="http://www.mercer.com:80/privacy.htm?siteLanguage=100">Privacy</a> | <a href="http://www.mercer.com:80/help.htm?siteLanguage=100">  
                                Help</a> | <a href="https://connectv7.mercer.com/eRoom">Mercer's Client Extranet</a><br />
                            ©2011 Mercer LLC, All Rights Reserved</div>
                            </td>
                        </tr>
                    </tbody></table>
                </div>
            </div>
        </div>
    </form>
</body>
</html>
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
 answered on 08 Sep 2011
2 answers
283 views
Hi,
I added the below code for masking a column. The column has to display 9-digit number in this form ####-#####
But the column is displayed as  123456789 instead of  1234-56789

<telerik:RadGrid ID="rg_submitted_requests" runat="server" AllowPaging="True" AutoGenerateColumns="False" AllowSorting="True" GridLines="Both" CellPadding="0">
   <MasterTableView  AutoGenerateColumns="false">
    <Columns>
        <telerik:GridMaskedColumn Mask="####-#####" HeaderText="PAF #" DataField="PAF_NUMBER">                        
        </telerik:GridMaskedColumn>
    </Columns>
   </MasterTableView>
</telerik:RadGrid>

Please let me know if there any issues with the above code.

Appreciate your help,
Mani
Eva
Top achievements
Rank 1
 answered on 08 Sep 2011
2 answers
108 views
I have a screen awith a radgrid and In the eidt form I have a textbox which allows a user to enter a numeric value. 
<td>
      <label for="CIK">
           CIK:</label>
     <asp:TextBox ID="CIKTextbox" runat="server" Text='<%# Bind("CIK") %>' Columns="35" AutoPostBack="true" OnTextChanged="CIK_TextChanged" />
     <asp:label id="DupCheck" Font-Bold="true" ForeColor="Red" runat="server" />
</td>
Ithen in the code behind I have
protected void CIK_TextChanged(object sender, EventArgs e)
 {
     TextBox txtbx = (TextBox)sender;            
     GridEditFormItem editFormItem = (GridEditFormItem)txtbx.NamingContainer;
     Label lbl = (Label)editFormItem.FindControl("DupCheck");
     if (CheckCIK(txtbx.Text))
         lbl.Text = "This CIK Already Exists";
     else
         lbl.Text = "";
 }

This works and it displays the message when it should, but when it refreshes the grid is locked and I am unabel to edit any of the text fields fields, but the drop down lists work and when ever I access a drop down that causes a postback the textboxes work again. 

Eric Klein
Top achievements
Rank 1
 answered on 08 Sep 2011
2 answers
153 views
Hello, please see the following page for our issue:

http://www.humaliensacademy.com/market/

- You will be redirected to login screen, login with:
username:  joeTester
password:  joeTester1

Once logged in, go back to the link above.

- ISSUE:  click on the SELECT SET combobox in Google Chrome.  You will see it appears behind the Silverlight PivotViewer below it.  This only happens in Google Chrome.  I've tried all the Z-Index fixes from all the other threads, no luck, and if you view the source you will see I have the Z-Index set very high on the combobox and its surrounding div.  Is there a way to set the Z-index on the actual pop out specifically or something?    Please help.  thank you.

- SIDE QUESTION:  Notice I changed the background color of the combobox to that green to match the screen.  How do I change the background color of the pull down image part?  you will see it is still the default white color.  Thanks again.

joe
Joe
Top achievements
Rank 1
 answered on 08 Sep 2011
1 answer
78 views
I'm following the RadDock demo "My Portal" pretty closely to add existing docks.  I have drop downs and other controls that need to be loaded dynamically on my dock controls.  I can get the docks to be created, but data isn't loaded.  How can I get the Page_Load to run on a dock when I create it dynamically?

Edit: FIGURED IT OUT...PLEASE DISREGARD!!!  Thanks
CG
Top achievements
Rank 1
 answered on 08 Sep 2011
6 answers
354 views
I'm dynamically creating several RadComboBoxes.  MarkFirstMatch is true, AllowCustomText is false, and the TabIndex is set for each of the controls.

I need the Enter key to function as such:  1) select the item selected in the combo box (the way that it functions by default) and then 2) tab into the next tabindex.

I've been trying to achieve this using the OnClientKeyPressing event without sucess since I'm not sure how to "turn" the Enter key press into a Tab key press.

Thank You,
sash
erato
Top achievements
Rank 1
 answered on 08 Sep 2011
1 answer
180 views
Hi
I am trying to paste a document from word into the RAD Editor.
 I have tried all the options available to me , i.e. paste from word, paste from word - strip font etc etc.

The issue is that the tables come up with really wierd extra style attributes which makes the rendering of the table in html totally messed up.

For example, below is a snippet of the HTML generated of one cell.
<td valign="bottom" style="border:1pt solid windowtext;width: 77.25pt;             padding-top: 0in; padding-right: 5.4pt; padding-bottom: 0in; padding-left: 5.4pt;">
            <p style="margin-top: 2pt; margin-right: 0in; margin-bottom: 2pt; margin-left: 0in; text-align: center;"><strong>Area</strong></p>
            </td>



Notice the stuff in the style attribute for the <td>


So my question is:
a) Can this be fixed at the time of pasting?
b) If not, can there be some call back mechanism that I can use to strip the style tags manually?

Let me know if you want me to attach the original file as well.

Syed
Dobromir
Telerik team
 answered on 08 Sep 2011
1 answer
25 views
Hi,

I have a problem with telerik controls design on one of my page. The telerik controls are not seen on that page only for Mozilla Firefox browser, but can be viewed in IE 8 correctly.

I am using the telerik version of 2010.1.415.35. If I use the 2008 or 2011 telerik controls then this problem does not occur.

Please help me on the issue.

Thanks.
Dobromir
Telerik team
 answered on 08 Sep 2011
1 answer
33 views
Hi,

How can I get the next item index in Firefox. In IE I am able to get the value by this rotator._nextItemIndex. how can acheive the same functionality in FF

TIA
Uday
Niko
Telerik team
 answered on 08 Sep 2011
6 answers
236 views
Hi,

When I try to fille a Notification instance from javascript like:
<script language="javascript">
function limiter(){
var tooltip = $find("<%=RadNotification1.ClientID%>");
tooltip.set_title("title text");
tooltip.set_text("notification text");
tooltip.show();
}
</script>
<a href="#" onclick="limiter();">do it</a>
<telerik:RadNotification ID="RadNotification1" Skin="Sunset" runat="server" Height="100" Width="300" Animation="Fade" EnableRoundedCorners="true"
EnableShadow="true" OffsetX="-20" OffsetY="-20" ContentIcon="none"></telerik:RadNotification>
it is setting the title text but NOT the notifier text.

Is this a bug?

BR,
Marc

Sean
Top achievements
Rank 2
 answered on 08 Sep 2011
Narrow your results
Selected tags
Tags
+124 more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?