Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
82 views
Hi,
I am using this code on page which includes masterpage for center popup edit but when i click close button on popup edit form it gives me error.

The numeric part ('159.5') of '159.5px' cannot be parsed as a numeric part of a Pixel unit.



<
telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<
script type="text/javascript">
   
var popUp;
   function PopUpShowing(sender, eventArgs)
   {
       popUp = eventArgs.get_popUp();
       var gridWidth = sender.get_element().offsetWidth;
       var gridHeight = sender.get_element().offsetHeight;
       var popUpWidth = popUp.style.width.substr(0,popUp.style.width.indexOf("px"));
       var popUpHeight = popUp.style.height.substr(0,popUp.style.height.indexOf("px"));
       popUp.style.left = ((gridWidth - popUpWidth)/2 + sender.get_element().offsetLeft).toString() + "px";
       popUp.style.top = ((gridHeight - popUpHeight)/2 + sender.get_element().offsetTop).toString() + "px";
   }
</script>
</
telerik:RadCodeBlock>



Teoman
Top achievements
Rank 1
 answered on 12 Oct 2010
4 answers
147 views
Hello Telerik.
I am using RadSiteMap in my application. But I am not able to set the skin of it as shown in the link
http://demos.telerik.com/aspnet-ajax/sitemap/examples/nodelines/defaultcs.aspx
Here is what I did:
<telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" EnableEmbeddedSkins="false" Skin="Custom" />
    <telerik:RadSiteMap ID="RadSiteMap1" runat="server" ShowNodeLines="True" EnableEmbeddedSkins="False"
        Skin="Custom">
        <Nodes>
            <telerik:RadSiteMapNode runat="server" NavigateUrl="~/Administrator/AdminHome.aspx"
                Text="Administrator Home" ToolTip="Administrator Home">
                <Nodes>
                    <telerik:RadSiteMapNode runat="server"
                        NavigateUrl="~/Administrator/DeleteRoutine.aspx" Text="Delete Class Routine"
                        ToolTip="Delete Class Routine">
                    </telerik:RadSiteMapNode>
                    <telerik:RadSiteMapNode runat="server" NavigateUrl="~/Administrator/DeleteUser.aspx"
                        Text="Delete User" ToolTip="Delete User">
                    </telerik:RadSiteMapNode>
                    <telerik:RadSiteMapNode runat="server" NavigateUrl="~/Administrator/RoutineFileUpload.aspx"
                        Text="Upload Class Routine" ToolTip="Upload Class Routine">
                    </telerik:RadSiteMapNode>
                    <telerik:RadSiteMapNode runat="server"
                        NavigateUrl="~/Administrator/UsersProfileEdit.aspx" Text="Edit Profile"
                        ToolTip="Edit Profile">
                    </telerik:RadSiteMapNode>
                    <telerik:RadSiteMapNode runat="server"
                        NavigateUrl="~/Administrator/UsersProfileView.aspx" Text="View Profile"
                        ToolTip="View Profile">
                    </telerik:RadSiteMapNode>
                </Nodes>
            </telerik:RadSiteMapNode>
        </Nodes>
    </telerik:RadSiteMap>
I am using using actually black skin as the machine where I will run my application does not have Telerik installed, so I copy and attach the skin directory to my project and call these as:
 <link href="../CustomSkin/SiteMap.Custom.css" rel="stylesheet" type="text/css" />
<link href="../CustomSkin/FormDecorator.Custom.css" rel="stylesheet" type="text/css" />
Everything is fine except the black background as shown in the above link. What else should I add to get that one.
Thank you.
And lastly Telerik is awesome.
Sebastian
Telerik team
 answered on 12 Oct 2010
13 answers
323 views
We're having an issue with IE6 and menus with a third level in them. You have the top menu, which is clicked, and another menu displays. Some of these items have other items under them which when hover over it, it displays another level of items. When we do this however, we're getting "Object doesn't support this property or method". Has anyone else run across this. It works in IE7 and 8, but not in IE 6. The items never display, we just get a JavaScript error.

Thanks,
Adam
Simon
Telerik team
 answered on 12 Oct 2010
3 answers
310 views
Hello,

I have Two questions (not related):
1) I'm wonder if I can build my radgrid control using two different edit forms and each edit form has its webusercontrol.
2) How can I change the edit form content depending on a column UniqueName , In others words, I have two

GridEditCommandColumn

 

 

's and depending on there UniqueNames I want to display different content in the edit-form. 

my radgid:

<telerik:RadGrid ID="ConcertsRadGrid" runat="server" Skin="WebBlue" AllowFilteringByColumn="false"
                    GridLines="None" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
                    ShowStatusBar="true"  OnPreRender="ConcertsRadGrid_PreRender" 
                    OnNeedDataSource="ConcertsRadGrid_NeedDataSource" 
                    onitemcommand="ConcertsRadGrid_ItemCommand1" >
                    <MasterTableView GridLines="None" Width="100%" Dir="RTL" CommandItemDisplay="None" DataKeyNames="CnsrtID">
                        <Columns>
                            <telerik:GridBoundColumn UniqueName="CType" HeaderText="<%$ Resources:Resource, PagesConcertsRadGridCTypeColumn %>" DataField="CType">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn UniqueName="CnsrtName" HeaderText="<%$ Resources:Resource, PagesConcertsRadGridCnsrtNameColumn %>" DataField="CnsrtName">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn UniqueName="Choirs" HeaderText="<%$ Resources:Resource, PagesConcertsRadGridChoirsColumn %>" DataField="Choirs">
                            </telerik:GridBoundColumn>
                            <telerik:GridEditCommandColumn UniqueName="EditCommandColumn1" EditText="<%$ Resources:Resource, PagesConcertsRadGridViewCnsrtColumn %>">
                            </telerik:GridEditCommandColumn>
                            <telerik:GridEditCommandColumn UniqueName="EditCommandColumn2" EditText="<%$ Resources:Resource, PagesConcertsRadGridViewCnsrtColumn %>">
                            </telerik:GridEditCommandColumn>
                        </Columns>
                        <EditFormSettings UserControlName="~/Pages/Concerts/ConcertsSubUserControl.ascx" EditFormType="WebUserControl">
                            <EditColumn UniqueName="EditCommandColumn1">
                            </EditColumn>
                        </EditFormSettings>
                    </MasterTableView>
                </telerik:RadGrid>

Please, I need your help,
It is apprecited to send me the modified code.

Regards,
Bader
Shinu
Top achievements
Rank 2
 answered on 12 Oct 2010
1 answer
127 views
Let's say I have the RadScheduler showing in week mode with each slot shown in intervals of 2 hours...

How can I (in code-behind) get all of the timeslots visible for the current week so that I can iterate through each slot and enable/disable it based on some business rules I have.

Is there a way to do this?
T. Tsonev
Telerik team
 answered on 12 Oct 2010
4 answers
199 views
I have been developing a web site using the asp.net ajax controls and have finally got as far as deploying it onto a parallels hosted web site.
However when I try and access any pages with a telerik control on I get this error.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Unknown server tag 'telerik:RadTabStrip'.

Source Error:

Line 7:      TagPrefix="uc3" %>
Line 8:  <div style="background-color:#D6E5F3;">
Line 9:      <telerik:RadTabStrip ID="CreateSchoolTabStrip" runat="server" Skin="Office2007" MultiPageID="CreateSchoolMultipage"
Line 10:         SelectedIndex="1" CausesValidation="false">
Line 11:         <Tabs>

I've checked and the telerik.web.dll file is in the bin/debug directory along with the application dlls, but for some reason is failing to be picked up.
I'm sure this is something obvious about the remote server setup, but I can't seem to find a solution to it.
Any chance you could point me in the right direction here?

Thanks
Steve.
Stephen Bough
Top achievements
Rank 1
 answered on 12 Oct 2010
11 answers
345 views
I've run into 2 client requests I've been unable to do in Scheduler either because they are not possible or I don't know how. If these are possible, advice is appreciated.

The first is the request for tooltips for the empty times on the scheduler so that if they are looking at the end of the week and the times are across the screen, or if the dates are off the top of the screen, it will be easier to know the datetime of the  empty block.

The other problem is that I'd like to have a scheduler day view where resources run horizontally and the times are along the top. There are just scenarios where this is more space efficient, such as if there is 20 resources showing and all that is required is the title in a small block.
T. Tsonev
Telerik team
 answered on 12 Oct 2010
17 answers
483 views
What I want to do is pretty simple.. Id like to use Linq2Ent (worse case I can use SP) to create a simple grid..

When you load the page you have a list of catagories... when you click a category it expands and shows the quarter (2009q1, 2009q2, 2009q3,2009q4,2010q1 etc..) on each row with the amount spent for that quarter... I want to be able to edit those rows in the Details table.. so its simple right?

So I imagine I will need to queries... One query for the MasterTable (list of categories) and then when a row from the mastertable is clicked I will need another Linq2Ent query to take the ID for that category and get the list of quarters and show them underneath the categories..

Do I have the concept right? I know you don't have many examples using linq2Ent so I suppose the exact concept applies with store procedures... Do you have any very basic samples? The closest thing I could find is this.. and its more complex than I need.

http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/threelevel/defaultcs.aspx
Princy
Top achievements
Rank 2
 answered on 12 Oct 2010
7 answers
702 views

I have a scenario with multiple RadComboBoxes that don’t seem to fire the Itemsrequested server event  prior to receiving the response from the previous callback.  Here is a page that I wrote to show the problem. When the normal ASP.NET drop down changes indexes, it will make a callback that has a 5 seconds delay in it. If you press the drop down button for either of the RadComboBoxes during this time, it will display loading but never return. You have to click out of the combo box and then back in it to get the items to load.

 

RadComboBox 1 also has an onblur that calls an AJAX callback to a 5 second delay. If you try to drop down RadComboBox 2 during this delay, it will just show loading and not update.

 

Do you have any suggestion as to what might be causing this and how to get around it? Ideally the combo boxes will be able to either load during the callback or queue the request so that it will start when the previous callback is complete.


 

<%@ 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 id="Head1" runat="server">
    <title></title>
    <style type="text/css">
        .RadComboBoxDropDown .rcbItem, 
        .RadComboBoxDropDown .rcbHovered, 
        .RadComboBoxDropDown .rcbDisabled, 
        .RadComboBoxDropDown .rcbLoading
        {
            margin: 0 1px;
            padding: 2px 6px;
            white-space: pre;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <div>
    <asp:Label ID="lblDDL" Text="Drop Down 1" style="float:left;" runat="server"></asp:Label>
    <asp:DropDownList ID="DDLTest1" runat="server" style="float:left;" AutoPostBack="true" OnSelectedIndexChanged="DDLTest1_SelectedIndexChanged" >
        <asp:ListItem Text="apple" >
        </asp:ListItem>
        <asp:ListItem Text="orange" />
    </asp:DropDownList>
    <br />
    <br />
        <asp:Label ID="lblrcb1" Text="RadComboBox 1" runat="server" style="float:left;" />
        <telerik:RadComboBox ID="RadComboBox1" OnItemsRequested="RadComboBox1_ItemsRequested" style="float:left;" EnableLoadOnDemand="true" OnClientBlur="function(){$find('PageAjaxManager').ajaxRequest('RadComboBox1');}" EnableAjaxSkinRendering="true" ItemRequestTimeout="1000" runat="server">
        </telerik:RadComboBox>
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <asp:Label ID="lblrcb2" Text="RadComboBox 2" runat="server" style="float:left;" />
        <telerik:RadComboBox ID="RadComboBox2" OnItemsRequested="RadComboBox2_ItemsRequested" style="float:left;" EnableLoadOnDemand="true" EnableAjaxSkinRendering="true" ItemRequestTimeout="1000" runat="server">
        </telerik:RadComboBox>
    </div>   
    <telerik:RadAjaxManager ID="PageAjaxManager" runat="server" RequestQueueSize="5" >
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID ="DDLTest1" >
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="DDLTest1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
    </telerik:RadAjaxManager>
    </form>
</body>
  
</html>
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.OleDb;
using Telerik.Web.UI;
using System.Threading;
  
public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
  
    protected void RadComboBox1_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
    {
        DataTable dataTable = new DataTable();
        dataTable.Columns.Add(new DataColumn("ID", typeof(string)));
        dataTable.Columns.Add(new DataColumn("Name", typeof(string)));
  
        DataRow dr = dataTable.NewRow();
        dr["ID"] = "1";
        dr["Name"] = Server.HtmlEncode("Name 1         2           3");
        dataTable.Rows.Add(dr);
  
        DataRow dr2 = dataTable.NewRow();
        dr2["ID"] = "2";
        dr2["Name"] = "Name 2    4";
        dataTable.Rows.Add(dr2);
  
        DataRow dr3 = dataTable.NewRow();
        dr3["ID"] = "3";
        dr3["Name"] = "1  Name 3";
        dataTable.Rows.Add(dr3);
  
        if (o is RadComboBox)
        {
  
            (o as RadComboBox).DataSource = dataTable;
            (o as RadComboBox).DataTextField = "Name";
            (o as RadComboBox).DataValueField = "ID";
            (o as RadComboBox).DataBind();
        }
    }
  
  
  
    protected void RadComboBox2_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
    {
        DataTable dataTable = new DataTable();
        dataTable.Columns.Add(new DataColumn("ID", typeof(string)));
        dataTable.Columns.Add(new DataColumn("Name", typeof(string)));
  
        DataRow dr = dataTable.NewRow();
        dr["ID"] = "1";
        dr["Name"] = Server.HtmlEncode("Name 1         2           3");
        dataTable.Rows.Add(dr);
  
        DataRow dr2 = dataTable.NewRow();
        dr2["ID"] = "2";
        dr2["Name"] = "Name 2    4";
        dataTable.Rows.Add(dr2);
  
        DataRow dr3 = dataTable.NewRow();
        dr3["ID"] = "3";
        dr3["Name"] = "1  Name 3";
        dataTable.Rows.Add(dr3);
  
        if (o is RadComboBox)
        {
  
            (o as RadComboBox).DataSource = dataTable;
            (o as RadComboBox).DataTextField = "Name";
            (o as RadComboBox).DataValueField = "ID";
            (o as RadComboBox).DataBind();
        }
    }
  
    protected override void RaisePostBackEvent(IPostBackEventHandler sourceControl, string eventArgument)
    {
        base.RaisePostBackEvent(sourceControl, eventArgument);
  
        if (sourceControl is RadComboBox || eventArgument == RadComboBox1.ClientID)
        {
            Thread.Sleep(5000);
        }
    }
  
    protected void DDLTest1_SelectedIndexChanged(object sender, EventArgs e)
    {
        Thread.Sleep(5000);
    }
  
}

 

 

Simon
Telerik team
 answered on 12 Oct 2010
5 answers
249 views
Hello,
I am developing a web application with ASP.NET 3.5 with C# and Telerik Ajax Control. I have a iFrame in my master page. Application load other pages in iFrame dynamically and iFrame height adjust the dynamically when page load. I uses RadScriptManager , RadAjaxPannel, RadAjaxLoadingPannel in my page. The problem is when "call back" the page, iFrame height not adjust dynamically.


<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="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 id="Head" runat="server">
    <title></title>
   
   <script type="text/javascript" language="JavaScript">
 
        
       function setSize(elem) {
           var the_height;
 
           the_height = elem.contentWindow.document.body.scrollHeight;
           elem.height = the_height; // Its works fine in IE, Chrome, Safari but not work in FF and opera
 
 
       }
       
        
 
</script>
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
     
</head>
<body  id="Page_Master"  runat="server"  >
 
    <form id="formMasterPage" method="post" runat="server">
      
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"  AsyncPostBackTimeout="500">
    </telerik:RadScriptManager>
    
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="100%" Width="100%"   >
            
     
    <div id="MainPage">
       
        <div class="Header">
             
        </div>
         
        <div id="ContentHolder">
            <div id="Content">
                <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
                </asp:ContentPlaceHolder>
                 
                <iframe id="IFrameMaster" name="IFrameMaster"  scrolling="auto" width="998px"  style=" min-height:500px;"  allowtransparency="true"   frameborder="0" runat="server" >
                </iframe>
              
                 
                 
            </div>
        </div>
        <div id="Footer">
             
        </div>
    </div>
     </telerik:RadAjaxPanel>
    
    </form>
 
</body>
</html>


Serverside Code :
// This code used in Page_Load Method and other methods depends on condition.
IFrameMaster.Attributes["src"] = "UIHome.aspx";
// This line used only Page_Load Method
IFrameMaster.Attributes.Add("onload", "javascript:setSize(this)");

How can I set iFrame height dynamic.

Thanks
Dimo
Telerik team
 answered on 12 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?