Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
87 views
I'm in the process of upgrading from Q1 2008 to Q2 2010 and I would prefer to keep the old skin for the tabstrip.  I attached a sample image hoping that you could create a skin for me that matches it. The skin I'm using is Web20.

Thanks,

Don Tompkins
Kamen Bundev
Telerik team
 answered on 30 Jul 2010
1 answer
84 views

What method of Editing do others consider to be the best approach.

Best approach being, ease of development and speed.

FormTemplate
UserControl
Seperate Page opened via RadWinow

I'm just curious what the general consenses is for editing records using the RadGrid. 

Tsvetoslav
Telerik team
 answered on 30 Jul 2010
1 answer
100 views
Hi,

I have a hierarchical radgrid. When in edit mode, I need to expand the hierarchy on the selected index change of a dropdown which is  in one of the columns of that row. Also I need that a roundtrip to the database should happen whenever the selected index of the dropdown changes. Currently I am doing a postback on the selected index change. This works fine only when the user selects a value in the dropdown once. The child gets loaded from the database in the DetailTableDataBind method. But if the user again changes the value in the dropdown of the parent row, the row collapses due to the postback and the DetailTableDataBind method is not called since the hierarchy is in collapsed mode. 
So basically what i need to do is that expand the hierarchy from client side on every selected index change of the dropdown and also fire the DetailTableDataBind method after the expand.

Can anybody suggest any solution for this? 

An early response will be appreciated. 

Thanks & Regards,
Ketaki
Tsvetoslav
Telerik team
 answered on 30 Jul 2010
1 answer
72 views
I am using RadAjaxManager in my master page and RadAjaxManagerProxy in my child page.
The masterpage has a ajax loading panel which i want to  show in the center of the screen.
so I used this example.
http://www.telerik.com/help/aspnet-ajax/ajxcenterloadingpanel.html

In the child page I have a textbox which does postback on text changed.
When I run the page the loading panels shows up in  the center of the textbox instead in the center of page.
I also attached the screen shot of this.

Could any one help me out here.



This is the code for my master page.

<%@ Master Language="VB" CodeFile="SiteMaster.master.vb" Inherits="SiteMaster" %>

<%@ Register TagPrefix="GD" TagName="Footer" Src="App_controls/Footer.ascx" %>
<%@ Register TagPrefix="GD" TagName="TopMenu" Src="App_controls/App_Controls_TopMenu.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>CEMG Property Management System</title>
    <link href="CSS/CEMG.css" rel="stylesheet" type="text/css" />
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body class="BODY">
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="ScriptManager1" runat="server" EnableTheming="True">
    </telerik:RadScriptManager>
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
    </telerik:RadStyleSheetManager>
    <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" Skin="Office2007" />
    <asp:Label ID="lblAlert" runat="server"></asp:Label>
    <div>
        <GD:TopMenu ID="TopMenu1" runat="server"></GD:TopMenu>
        <br />
        <asp:ContentPlaceHolder ID="MainContent" runat="server">
            <!-- Page-specific content will go here... -->
        </asp:ContentPlaceHolder>
        <asp:Label ID="lblPropertyID" runat="server" Visible="False"></asp:Label>
    </div>
    <GD:Footer ID="Footer" runat="server"></GD:Footer>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <ClientEvents OnRequestStart="CenterLoadingPanel"></ClientEvents>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"
        Skin="Outlook">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function CenterLoadingPanel() {
                centerElementOnScreen($get("<%= RadAjaxLoadingPanel1.ClientID %>"));
            }
            function centerElementOnScreen(element) {
                debugger;
                var scrollTop = document.body.scrollTop;
                var scrollLeft = document.body.scrollLeft;
                var viewPortHeight = document.body.clientHeight;
                var viewPortWidth = document.body.clientWidth;
                if (document.compatMode == "CSS1Compat") {
                    viewPortHeight = document.documentElement.clientHeight;
                    viewPortWidth = document.documentElement.clientWidth;
                    if (!$telerik.isSafari) {
                        scrollTop = document.documentElement.scrollTop;
                        scrollLeft = document.documentElement.scrollLeft;
                    }
                }
                var topOffset = Math.ceil(viewPortHeight / 2 - element.offsetHeight / 2);
                var leftOffset = Math.ceil(viewPortWidth / 2 - element.offsetWidth / 2);
                var top = scrollTop + topOffset - 40;
                var left = scrollLeft + leftOffset - 70;
                element.style.position = "absolute";
                element.style.top = top + "px";
                element.style.left = left + "px";
            }
        </script>
    </telerik:RadCodeBlock>
    <asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server">
    </asp:ContentPlaceHolder>
    </form>
</body>
</html>

===================================================
This is the code for my child page

<%@ Page Title="" Language="VB" MasterPageFile="~/SiteMaster.master" AutoEventWireup="false" CodeFile="ManagementDashboard.aspx.vb" Inherits="ManagementDashboard" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
        <Scripts>
            <asp:ScriptReference Path="~/JS/jquery-1.4.2.min.js" />
        </Scripts>
    </asp:ScriptManagerProxy>
    <telerik:RadScriptBlock ID="scbScripts" runat="server">  
        <script type="text/javascript">
            function populateSelectedOwners(sender, args) {
                var textBox;
                textBox = $find("<%= tbOwners.ClientID %>");
                textBox.set_value(args.get_argument());

                return false;
            }
            function populateSelectedInvestors(sender, args) {
                var textBox;
                textBox = $find("<%= tbInvestors.ClientID %>");
                textBox.set_value(args.get_argument());

                return false;
            }
            function populateSelectedPartners(sender, args) {
                var textBox;
                textBox = $find("<%= tbPartners.ClientID %>");
                textBox.set_value(args.get_argument());

                return false;
            }
        </script>
    </telerik:RadScriptBlock>
    <table width="99%" border="0" align="center" cellpadding="0" cellspacing="3"  class="PropertyInfoTable" style="background-color:#ffffff;" >
      <tr>
        <td class="tableBorder" align="center">Custom Filters</td>
      </tr>
      <tr>
        <td align="left" valign="top"><table width="100%" border="0" cellspacing="5" cellpadding="0">
          <tr>
            <td width="150px" nowrap="nowrap" class="SmallTxtBold" valign="middle" >Owner:</td>
            <td align="left" valign="middle" >
                <table border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td valign="middle"><telerik:RadTextBox ID="tbOwners" runat="server"
                                Skin="Office2007" Width="300px" AutoPostBack="True"> </telerik:RadTextBox></td>
                           <td valign="middle"><img id="imgOwners" onclick="window.radopen(null, 'tbOwnersDialog');" src="images/search_icon.gif" align="absbottom" runat="server" /> </td>
                        <td valign="middle" width="300px" nowrap="nowrap"><asp:Label ID="lblOwnerStatus" runat="server"></asp:Label><asp:Label ID="lblOwnerID" runat="server" Visible="false"></asp:Label></td>
              </tr>
            </table>
          </tr>
          <tr>
            <td  nowrap="nowrap" class="SmallTxtBold" valign="middle" >Investor:</td>
            <td align="left" valign="middle"><table border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td valign="middle"><telerik:RadTextBox ID="tbInvestors" runat="server" Skin="Office2007" AutoPostBack="True"
                        Width="300px"> </telerik:RadTextBox></td>
                <td valign="middle"><img id="imgInvestors" onclick="window.radopen(null, 'tbInvestorsDialog');" src="images/search_icon.gif" align="absbottom" runat="server" /> </td>
                <td valign="middle" width="300px" nowrap="nowrap"><asp:Label ID="lblInvestorStatus" runat="server"></asp:Label>
                    <asp:Label ID="lblInvestorID" runat="server" Visible="false"></asp:Label></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td nowrap="nowrap" class="SmallTxtBold" valign="middle" >Partner:</td>
            <td align="left" valign="middle"><table border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td valign="middle"><telerik:RadTextBox ID="tbPartners" runat="server" Skin="Office2007" AutoPostBack="True"
                        Width="300px"> </telerik:RadTextBox></td>
                <td valign="middle"><img id="imgPartners" onclick="window.radopen(null, 'tbPartnersDialog');" src="images/search_icon.gif" align="absbottom" runat="server" /> </td>
                <td valign="middle" width="300px" nowrap="nowrap"><asp:Label ID="lblPartnerStatus" runat="server"></asp:Label>
                    <asp:Label ID="lblPartnerID" runat="server" Visible="false"></asp:Label></td>
              </tr>
            </table></td>
          </tr>         
        </table></td>
      </tr>
      <tr>
        <td height="30" align="right" valign="middle" style="border:1px solid #000000;background-color:#A4C1EC;" ><table width="520" border="0" cellspacing="2" cellpadding="0">
      <tr>
        <td width="110"><asp:Button ID="btnCustomize" runat="server" Width="100" Text="Customize" /></td>
        <td width="110"><asp:Button ID="btnSaveView" runat="server" Width="100" Text="Save New View" /></td>
        <td width="110"><asp:Button ID="btnDeleteView" runat="server" Width="100" Text="Delete View" /></td>
        <td width="80" align="right" nowrap="nowrap" class="SmallTxtBold">Change View:
          </td>
        <td width="110"><asp:DropDownList ID="ddlViewList" ClientIDMode="Static"
                runat="server" Width="110" AutoPostBack="True"> </asp:DropDownList>
        </td>
      </tr>
    </table></td>
      </tr>
      <tr>
        <td align="left">
         <telerik:RadDockLayout ID="RadDockLayout1" runat="server" Skin="Outlook">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td align="left" valign="top">
                        <telerik:RadDockZone ID="RadDockZone1" runat="server" MinHeight="350" Style="margin-right: 2px;overflow:hidden;"
                            Width="98%"  Orientation="Horizontal" >
                        </telerik:RadDockZone>
                    </td>
                    <td width="6"><img src="images/spacer.gif" width="6" height="1" /></td>
                    <td align="left" valign="top" >
                        <telerik:RadDockZone ID="RadDockZone2" runat="server" MinHeight="350" Style="margin-right: 2px;overflow:hidden;"
                            Width="98%" Orientation="Horizontal" >                               
                        </telerik:RadDockZone>
                    </td>
                </tr>
            </table>
         </telerik:RadDockLayout>
         </td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
    </table>
    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="tbInvestors">
                 <UpdatedControls>                  
                     <telerik:AjaxUpdatedControl ControlID="tbInvestors" />   
                     <telerik:AjaxUpdatedControl ControlID="lblInvestorStatus" />
                     <telerik:AjaxUpdatedControl ControlID="lblInvestorID" />                
                 </UpdatedControls>
             </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" VisibleStatusbar="False"
        Behaviors="Default" InitialBehaviors="None" Left=""
        Skin="Outlook" style="display: none;" Top="" >
        <Windows>
            <telerik:RadWindow  id="tbOwnersDialog" Runat="server"
                OnClientClose="populateSelectedOwners" Width="400px" Height="300px"
                Title="Select Owners" NavigateUrl="Windows/SelectOwners.aspx" />
            <telerik:RadWindow  id="tbInvestorsDialog" Runat="server"
                OnClientClose="populateSelectedInvestors" Width="400px" Height="300px"
                Title="Select Investors"    NavigateUrl="Windows/SelectPartners.aspx" />            
            <telerik:RadWindow  id="tbPartnersDialog" Runat="server"
                OnClientClose="populateSelectedPartners" Width="400px" Height="300px"
                Title="Select Partners"    NavigateUrl="Windows/SelectPartners.aspx?InvestorTypeID=2" />
        </Windows>
    </telerik:RadWindowManager>
   
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
</asp:Content>

Maria Ilieva
Telerik team
 answered on 30 Jul 2010
5 answers
173 views
Hi,

i am opening a window from my page on click of a hyperlink on its client side event Onclick()  which Flicks the windows first time opening from Hyperlink . Is there any way so that the parent window stop flicking while opening a new Window in existing parent window .

Following is the code i am using to open it .

If there is something missing in my code then please let me know

 <asp:ScriptManager ID="scriptmanager" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="upPanel1" runat="server">
            <ContentTemplate>
                <a href="javascript:void(0)" runat="server"  onclick="javascript:window.radopen('/member/common/dialogvideo.aspx?vd=diary','MainWindow',700,600)">
                    Test</a>
                <radW:RadWindowManager Visible="true" ID="Singleton" runat="server"  VisibleOnPageLoad="false"  VisibleStatusbar="false"
                    VisibleTitlebar="false">
                    <Windows>
                        <radW:RadWindow runat="server" Width="765px" Height="500px" VisibleOnPageLoad="false" Modal="True" Skin="Default"
                            ShowContentDuringLoad="true" Behavior="move,pin" VisibleStatusbar="False" ID="DetailWindow">
                        </radW:RadWindow>
                    </Windows>
                </radW:RadWindowManager>
            </ContentTemplate>
        </asp:UpdatePanel>
       


Thanks
Gaurav Bhardwaj
Georgi Tunev
Telerik team
 answered on 30 Jul 2010
3 answers
147 views
Hi,

I am using the code from the following link for confirming the postback with radconfim. Some how the code sample works fine on the test page but when i integrate it in my existing page the confirmation window shows but will not execute the "PostbackButton1_Click" event from the code behine. My existing page uses Radtabstrip, Radmultipageview and also the RadAjaxManager.  Any clue why it may not be working. I could not upload code from existing file as it is very big.  Any help is appreciated.

 

 

 
http://demos.telerik.com/aspnet-ajax/window/examples/browserdialogboxes/defaultcs.aspx

Code

 

 

<telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">

 

 

 

</telerik:RadWindowManager>

 

 

 

<script type="text/javascript">
            //the following code use radconfirm to mimic the blocking of the execution thread.
            //The approach has the following limitations:
            //1. It works inly for elements that have *click* method, e.g. links and buttons
            //2. It cannot be used in if(!confirm) checks
            window.blockConfirm = function (text, mozEvent, oWidth, oHeight, callerObj, oTitle)
            {
                var ev = mozEvent ? mozEvent : window.event; //Moz support requires passing the event argument manually
                //Cancel the event
                ev.cancelBubble = true;
                ev.returnValue = false;
                if (ev.stopPropagation) ev.stopPropagation();
                if (ev.preventDefault) ev.preventDefault();

                //Determine who is the caller
                var callerObj = ev.srcElement ? ev.srcElement : ev.target;

                //Call the original radconfirm and pass it all necessary parameters
                if (callerObj)
                {
                    //Show the confirm, then when it is closing, if returned value was true, automatically call the caller's click method again.
                    var callBackFn = function (arg)
                    {
                        if (arg)
                        {
                            callerObj["onclick"] = "";
                            if (callerObj.click) callerObj.click(); //Works fine every time in IE, but does not work for links in Moz
                            else if (callerObj.tagName == "A") //We assume it is a link button!
                            {
                                try
                                {
                                    eval(callerObj.href)
                                }
                                catch (e) { }
                            }
                        }
                    }

                    radconfirm(text, callBackFn, oWidth, oHeight, callerObj, oTitle);
                }
                return false;
            }
        </script>

<asp:Button CssClass="PostbackButton" ID="PostbackButton1" runat="server" Style=""
Text="Confirm postback with radconfirm" OnClientClick="return blockConfirm('Are you sure you want to postback?', event, 330, 100,'','Custom title');"
OnClick="PostbackButton1_Click" />

usr9999
Top achievements
Rank 1
 answered on 30 Jul 2010
1 answer
69 views
I upgraded to the latest version 2010.7.713.40 and now I am having all sorts of issues.  When the AjaxFrameworkMode is set to Explicit I get a bunch errors like this

Error: Type is not defined
Source File: http://localhost/fieldvisor/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_RadScriptManager1_TSM&compress=0&_TSM_CombinedScripts_=.....
Line: 3

Error: ASP.NET Ajax client-side framework failed to load.
Source File: http://localhost/fieldvisor/Default/default.aspx
Line: 26

Error: Sys is not defined
Source File: http://localhost/fieldvisor/Default/default.aspx
Line: 120

It also fails in the Disabled mode and if it is i get similar errors.  Lastly, if it is in Enabled mode, most things seem to functions except I have a dashboard with a bunch of small RadGrids on them with scrollbars enabled and some of them are hidden and i get errors that say i need the script manager set to Explicit when using a timer.    I know all of this stems from a timer control i user in conjunction with an RadAjaxPanel for a toolbar refresh, but i do not know how to overcome this issue.  Any ideas?

thanks,
Shawn
Nikolay Rusev
Telerik team
 answered on 30 Jul 2010
1 answer
71 views

When I click the code block button I get this:

Firefox:  XML Parsing Error: no element found
Location: http://www.telerik.com/UserControls/Public/Forums/Telerik.Web.UI.DialogHandler.aspx?DialogName=FormatCodeBlock&UseRSM=true&Skin=Sitefinity&Title=Format%20Code%20Block&doid=5a62aa19-662a-4e05-adbd-0d3df9e74915&dpptn=&dp=Z2ZxXWpVTCkTZAgqaGFmUxxjagUcGnhYFnJqAlp%2Bb0xXdWVVJnY6AmlmST8fFUdPeXcWTFdvYXIVdH82aAViUBwGbTUXL3BHIHNtRHV6QVdgSGEJFFkYC2BlRQMnK3ZcV3YSc1FvfikbdGsvaHB6SidjDTwJB2xcIQl2W3R9dEVgenkIGGE2EGpmSSkmK1xHeVoWRWpvTDMbA2svaFtYTSdsajYncAJBEQZUX1p%2BAFhgel9OGGB3LVJmZDYXK3ZGVgMRRn57TBITAmM5ZVpccyVzfnMLFF5VFXFUBm5Vb0RSZHlhF1sALmJLXXARAURmVncobVZwbiQMdgxxa1sBayNjcT8gCkZ5InBIBWELCU5XdWF%2FFlsYJGIAawEcLVMAVFwBQmZWdh8XAFFxZVhYCxwFYg4TLHhVFARIQGFhUgdhdENhEW0UEmZmRT8WE2pUV3YKQGdWdiwMWWh2ZmFEeiNxCQILCl55IioJBGwIdAZTWQZtJgcmF30Aaz8fA1hiUGc0YH5gYiQWdWA0awQFfyUEQAIULnBfFXFITWFvXXlidENgIHMULH1fYzYcK19CUHR1RGFVBR8XAmw5ZgZmfgtfDR4WL156Di19QHcJbwJSdWVAIFgENmJ2XS0nAQlbVgAGXVd%2FUzYTXn8wUQRhSwt3QCskFlpjGjtyYF1vfE95amVSEXAyd2laWQshKmZ8Y1woXGEKTDQVd3sUUwRyYRNaYiwkc3xDFBdcA1xVVkxiamoOFnJ7L2lmSTUgK3YFVGZ9QGZ%2FcnUgcEEEa2FMQhxnTzEJBkJgGnJyR1txa3hvZQZRGAcUPGV5ezMmAWZMUXYoWVBBTAIYZEE5aGVDTwp1BXs%3D
Line Number 2, Column 1:


Internet Explorer:  Popup that is blank.


Any ideas?
Snejina
Telerik team
 answered on 30 Jul 2010
2 answers
176 views
I'm using same font names for my web pages, but the font names was not changing for decorated controls. How to change it?
Gokul Gokul
Top achievements
Rank 2
 answered on 30 Jul 2010
2 answers
123 views
Hi support,

I was wondering if it's possible to programmatically hide (on the server-side) the links the pager creates by default in the grid.

Could you give me an example of how I would do this and in what event?

Thanks,
Josh
Josh
Top achievements
Rank 1
 answered on 30 Jul 2010
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?