Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
81 views
Hi there,

Let's imagine, that we have five docked controls in one dock zone and five in second. If I move the top docked control from one zone into another I get 10 dockpositionchanged handler executions. Because I have some custom logic after each execution, handled agains database, this cause 10 executions of stored procedure behind, instead of one. Is there any way to allow this handler to be executed only for docked control currently dragged or may be any property, that might help to determine the dragged control and skip others. Thanks.

With best regards,
Stanislav
Stanislav
Top achievements
Rank 1
 answered on 05 Jul 2011
2 answers
59 views
Hi,
I am developing application in Dot Net 4.0. I am using Telerik RadControls for ASP.NET Ajax version 2010.3.1317.40 and AjaxControlToolkit version 4.1.40412.2
I  have used RadAjaxManager in my page. But it gives script error. Earlier with AjaxControlToolkit version 1.0.10301.0 it was working fine.

I tried the fix provided by telerik admin
<telerik:RadScriptManager runat="server" EnableScriptCombine="false" />  but still error is comming.

Guide me to resolve this issue asap.
Anil
Top achievements
Rank 1
 answered on 05 Jul 2011
9 answers
710 views

how to store the attachment file in stored to database

Thanks,
Mohamed.
Kevin
Top achievements
Rank 2
 answered on 05 Jul 2011
1 answer
107 views
Hi,

Following on from this old thread http://www.telerik.com/community/forums/aspnet-ajax/combobox/databinding-an-image-inside-of-a-radcombobox.aspx

There are a couple of methods for having images inside a combo box including using ImageURL in the ItemDataBound event and using templates.  The user was asking if there will be a way to add an DataImageURLField tag to the RadComboBox.  If there are tags for a DataTextField and a DataValueField then why not the ImageURL as well given that it is available in the item data bound event.

Please could this be raised as a request for addition.  It must be fairly simple to add and will save us having extra code in the itemdatabound event.

Regards,

Jon
Dimitar Terziev
Telerik team
 answered on 05 Jul 2011
3 answers
105 views
i have a radgrid ,inside the the grid i am adding a commanditem template .Inside that commanditemtemplate i am adding three labels above the header .But when i am exporting the grid to pdf ,csv and excel  the commanditemtemplate is appearing in exported excel file only ,but not in pdf and csv.Below is the code i am using:

 <telerik:RadGrid ID="ModifiedContentsReportGrid" runat="server" AutoGenerateColumns="false"
                AllowSorting="true" AllowPaging="true" EnableOutsideScripts="true" PagerStyle-Mode="NextPrevAndNumeric"
                ShowFooter="true"  OnItemCreated="ModifiedContentsReportsGrid_OnItemCreated" Title="Modified Content Report">
                <ExportSettings OpenInNewWindow="true" FileName="Modified Content Report" ExportOnlyData="false">
                    <Pdf PaperSize="A4" AllowPrinting="true" PageBottomMargin="10px" PageTopMargin="25px"
                        PageHeaderMargin="0px" PageLeftMargin="10px" PageRightMargin="10px" PageTitle="Modified Content Report" />
                </ExportSettings>
                <HeaderStyle HorizontalAlign="Center" />
                <ClientSettings>
                    <Scrolling UseStaticHeaders="true" />
                </ClientSettings>
                <MasterTableView Width="100%" CommandItemDisplay="Top"  CommandItemStyle-HorizontalAlign="Right" >
                    <CommandItemTemplate>
                        <table width="100%">
                            <tr align="right">
                                <td>
                                    <asp:Label ID="lblClientName" runat="server" Text="" />
                                </td>
                            </tr>
                            <tr align="right">
                                <td>
                                    <asp:Label ID="lblGenerateDate" runat="server" Text="" />
                                </td>
                            </tr>
                            <tr align="right">
                                <td>
                                    <asp:Label ID="lblDateRange" runat="server" Text="" />
                                </td>
                            </tr>
                        </table>
                    </CommandItemTemplate>


Could anyone provide some solution to this problem??
Princy
Top achievements
Rank 2
 answered on 05 Jul 2011
1 answer
215 views
Hi,

I am trying to fix the widht and height of the image chosen in telerik RadEditior, i have tried with both Javascript and C# code saperately which i found in forums, but could not resolve.
I am using V.S 2010 and telerik product version 2009.3.1103.35.

Javascript used:

 

 

<script type="text/javascript">  

 

function OnClientLoad(editor, args) {  

editor.attachEventHandler( 

"oncontrolselect", function () {  

//Check if image  

window.setTimeout(

function () {  

var selElem = editor.getSelection().getParentElement();  

alert(selElem.tagName); 

if (selElem.tagName == "IMG") {  

//Store current width and height  

curWidth = selElem.offsetWidth;

curHeight = selElem.offsetHeight; 

//Possible to resize, so attach eventhandler  

selElem.onresizeend = 

function (e) {  

alert("I was resized");  

selElem.style.width = "150";  

selElem.style.height ="150"

selElem.onresizeend = null; //remove handler  

 

//Make calculations about skaling, then re-size image  

};

}

}, 0);

});

}
Code used in C#

The one which i have found in these attachements,
In page_load
{ string [] paths = new string[] { "~/Images/editor" };

 

RadEditor1.ImageManager.ViewPaths = paths;

RadEditor1.ImageManager.UploadPaths = paths;

RadEditor1.ImageManager.DeletePaths = paths;

RadEditor1.ImageManager.ContentProviderTypeName =

 

typeof(ChangeImageSizeProvider).AssemblyQualifiedName;
}

 public class ChangeImageSizeProvider : Telerik.Web.UI.Widgets.FileSystemContentProvider 

public ChangeImageSizeProvider(HttpContext context, string[] searchPatterns, string[] viewPaths, string[] uploadPaths, string[] deletePaths, string selectedUrl, string selectedItemTag) 

base(context, searchPatterns, viewPaths, uploadPaths, deletePaths, selectedUrl, selectedItemTag)  

{  

public override string StoreFile(UploadedFile file, string path, string name, params string[] arguments)

 {
System.Drawing.Image image = System.Drawing.Image.FromStream(file.InputStream);  

string physicalPath = Context.Server.MapPath(path); 
 int newWidth = 100;// Fixed width 
 int newHeight = 100;// Fixed height  

System.Drawing.Image resultImage = ResizeImage(image, new Size(newWidth, newHeight));

 resultImage.Save(physicalPath + name); 

string result = path + name; 
 return result;  

}

 

private System.Drawing.Image ResizeImage(System.Drawing.Image sourceImage, Size newSize)  

Bitmap bitmap = new Bitmap(newSize.Width, newSize.Height); 
 Graphics g = Graphics.FromImage((System.Drawing.Image)bitmap);

g.InterpolationMode = InterpolationMode.HighQualityBicubic;  

g.DrawImage(sourceImage, 0, 0, newSize.Width, newSize.Height);

g.Dispose();

 return (System.Drawing.Image)bitmap;  

}

}

 

 I have a save option with which i am saving 

 

 asdf.Content = this.RadEditor1.Content;

 asdf.save();

Please let me know, if I need to do anything else.

Thanks
G Krishna

Rumen
Telerik team
 answered on 05 Jul 2011
1 answer
48 views
I have a simple page with a toolbar on the masterpage and a treeview in the content page

I'm getting this error in firebug when paging, and doing random things like sorting

<%@ Page Title="" Language="C#" MasterPageFile="~/App_Master/Medportal.master" AutoEventWireup="true" CodeBehind="TreeList.aspx.cs" Inherits="Medportal.Skins.Medportal.Controls.TreeList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeaderContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="BodyContent" runat="server">
    <telerik:RadTreeList runat="server" DataKeyNames="locationID"
        DataSourceID="locationsDS" ParentDataKeyNames="parentID"
        AllowMultiColumnSorting="True" AllowPaging="True" AllowSorting="True"
        PageSize="15" ShowFooter="True" >
        <PagerStyle Mode="NextPrevNumericAndAdvanced" />
    </telerik:RadTreeList>
 
    <asp:SqlDataSource ID="locationsDS" runat="server"
        ConnectionString="<%$ ConnectionStrings:authdbConnectionString %>"
        SelectCommand="SELECT [locationID], [locationName], [parentID], [shortcode], [isTest], [addressID] FROM [common_location] ORDER BY [locationName]" />
</asp:Content>

Any idea?
Mira
Telerik team
 answered on 05 Jul 2011
3 answers
136 views
i want to increase the weight of telerik menu , i wan to make its heights similar as telerik offical website's menu 
but i am unable to do so .
if height increase by increasing items height or generally increasing the height of menu bar from properties , the rollover gets distorted ,and also the looks ,last i was trying the below 
<div style="width: 1130px; height:auto; position: relative; richness:100; top: 0px; left: 95px; color: #EEF1CD; background-color: #F7FAFE">
            <telerik:RadMenu ID="RadMenu1" runat="server" Skin="Vista" Width="1130px"
                EnableRoundedCorners="True" style="top: 0px; left: 0px; "
                Font-Size="Large" Height="50px" BackColor="White"
                  >
                <Items>
                    <telerik:RadMenuItem runat="server" Text="Root RadMenuItem1" width ="200" >
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem runat="server" Text="Root RadMenuItem2" width ="200"  >
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem runat="server" Text="Root RadMenuItem3" width ="200"  >
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem runat="server" Text="Root RadMenuItem4" width ="200"  >
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem runat="server" Text="Root RadMenuItem5" width ="200"  >
                    </telerik:RadMenuItem>
                </Items>
                 
            </telerik:RadMenu>
        </div>
Kate
Telerik team
 answered on 05 Jul 2011
2 answers
123 views
We have a window with a RadGrid with a footer.  When the window opens, the footer displays correctly at the bottom of the grid.  The window contains several buttons that cause a script to be registered that executes window.showModalDialog() to display a popup window.  When the popup opens, the footer disappears (although it is still in the rendered html).  When the user closes the popup, the footer reappears.

Looking at the html, I see that the grid is rendered as a div with a height of 190px.  This div contains a div for the header, a div for the main area of the grid, and a grid for the footer.  The header and footer divs do not specify a height but the middle div specifies a height of 300px.  Somewhere this is being converted to 122px, leaving room for the header and footer.  Apparently whatever adjusts the height is not being called when the window is refreshed after the user clicks on one of the buttons.  As a result, the middle div retains a height of 300px and the footer does not appear.

Is there a workaround for this?

Thanks,
Stephen
Pavlina
Telerik team
 answered on 05 Jul 2011
1 answer
326 views
Dear Telerik team -- We recently purchased Telerik controls to use it in SharePoint 2010 application page. I tried to register Telerik.Web.UI as a safe control in the web.config:
------------------------------------------------------------------------------
    <SafeControls>
      <SafeControl Assembly="System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI.WebControls" TypeName="*" Safe="True" AllowRemoteDesigner="True" SafeAgainstScript="False" />
      <SafeControl Assembly="System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI.HtmlControls" TypeName="*" Safe="True" AllowRemoteDesigner="True" SafeAgainstScript="False" />
.
.
.
.
      <SafeControl Assembly="Telerik.Web.UI, Version=2011.1.519.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.UI" Typename="*" />
    </SafeControls>
------------------------------------------------------------------------------

and got this error:


Server Error in '/' Application.

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: This page has encountered a critical error. Contact your system administrator if this problem persists.

Source Error:

Line 3:  <%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
Line 4:  <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
Line 5:  <%@ Register TagPrefix="wssuc" TagName="Welcome" src="~/_controltemplates/Welcome.ascx" %>
Line 6:  <%@ Register TagPrefix="wssuc" TagName="MUISelector" src="~/_controltemplates/MUISelector.ascx" %>
Line 7:  <%@ Register TagPrefix="wssuc" TagName="DesignModeConsole" src="~/_controltemplates/DesignModeConsole.ascx" %>

Source File: /my/personal/CSharpBooks/_catalogs/masterpage/v4.master    Line: 5


Version Information: Microsoft .NET Framework Version:2.0.50727.4952; ASP.NET Version:2.0.50727.4955


Please, advise!

Sincerely. Vladimir Pavlov.
Rumen
Telerik team
 answered on 05 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
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
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?