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

Does anyone know how I can resize the image proportionally to whatever image is in the editor at the time and then save it?

To Clarify:
What I would like to be able to do is:
When the user clicks my save button (outside the image editor) whatever image is in the editor would be automatically resized proportionally to whatever image is in the editor (just in case it has been cropped or rotated or whatever) to width and/or height that I would specify and then saved with the new dimensions. i.e. if I specify width of 200, the height would be worked out proportionally so that the image would retain the same aspect ratio as it had at the time of saving and save with a width of 200 and a height of ?
All of this, server side (VB)

I am able to save edited images with my save button, but don't know how to do the resizing bit.
Resizing must be proportional so that the image isn't distorted in any way because of my new dimensions

Any help gratefully received :-)
Sauge
Top achievements
Rank 1
 answered on 07 Mar 2013
1 answer
77 views

I am running into an issue with Y-axis scales in combination chart .I have 2 measures as 2 series items represented on Y axis with data ranging from 2 to 3 and x-axis has months, left the measures box field empty. The y-axis scale after the report is run is giving multiple values like 0,0,1,1,2,2,3,3..so on instead of 0,1,2,3,4.. I have tried changing the scale interval number under the properties but it's causing the data skewed

Petar Kirov
Telerik team
 answered on 07 Mar 2013
4 answers
315 views
I have tried to create a Horizontal Rule <hr /> separator and it outputs the text <hr /> or <hr>  instead of a  HR line  -------------------

RadComboBoxItem seperator = new RadComboBoxItem("<hr />""<hr />") { IsSeparator = true };


I figure this has to do with encoding and etc.. Suggestions on how to do this?

Wired_Nerve
Top achievements
Rank 2
 answered on 07 Mar 2013
7 answers
213 views
http://www.telerik.com/registration-

i'm using telerik gridview like here http://demos.telerik.com/aspnet-ajax/grid/examples/overview/defaultcs.aspx but in that demo when filter data it shows a loding with blue background in my case it reloads my page everytime i filter it, maybe because i'm getting the data from different tables into the rad gridview?

i have enabled ajax so why it reloads? is there a way to not refresh the page like that

by the way how to activate pdf export?
choose default id panel is empty , why? i'm using metro skin

also how can i edit some fields only when we are at edit template i dont see the textboxes in designtime...

also filter options are not getting translates nor filter when we set culture why?

Eyup
Telerik team
 answered on 07 Mar 2013
5 answers
84 views
Hello Telerik team,

After we enter text in a RadTextbox, pressing the Enter key is triggering click event of Submit button. In order to avoid this, we included below dummy button logic within the aspx page:

<form id="frm" runat="server" defaultbutton="btnIgnore">
<asp:Button ID="btnIgnore" runat="server" Style="Position:Absolute; Top:-200px" Text="Ignore" Width="90px" EnableViewState="False" OnClientClick="javascript:return false;" />

This change resolved Enter key issue but the side effect has been with AJAX repost like radio button or dropdown click taking the display to the top of the page.

Could you please let us know if you have a workaround for resolving this issue i.e., to keep the display at the same place instead of moving to the top?


Regards,
Sameer
Eyup
Telerik team
 answered on 07 Mar 2013
7 answers
340 views
Hi,

I'm posting this under grid, but it probably applies to other controls as well.

I'm working on a routine which changes labels on ASP.Net pages to configure terminology for various customers. In order to do this I iterate through all controls on screen recursively and change the label text if needed.

I was wondering is it possible to do the same with the elements of a RadGrid such as the header text?

The core of the replacement routine at present is:

Public Sub ReplaceText(ByRef myControls As ControlCollection)
        Dim ReplacementText As String = HttpContext.Current.Session("ReplacementText")
        If String.IsNullOrEmpty(ReplacementText) Then Exit Sub
        Dim ReplacementTextUpper As String = ReplacementText.ToUpper
        For Each myControl As Control In myControls
            If TypeOf myControl Is Label Then
                Dim lbl As Label = CType(myControl, Label)
                Dim labelText As String = String.Format("[{0}", lbl.Text.Trim.ToUpper)
                Dim textPosition As Integer = InStr(ReplacementTextUpper, labelText)
                If labelText <> "[" And textPosition > 0 Then
                    'Parse ReplacementText for = and > sign and get string between
                    Dim Pos1 = ReplacementText.IndexOf("=", textPosition)
                    Dim Pos2 = ReplacementText.IndexOf("]", Pos1)
                    Dim ReplaceWith As String = ReplacementText.Substring(Pos1 + 1, (Pos2 - Pos1) - 1)
                    lbl.Text = ReplaceWith
                End If
            End If
            If myControl.HasControls Then
                ReplaceText(myControl.Controls)
            End If
        Next
    End Sub

I have tried accessing a RadGrid as a control, but it is defined as a Telerik.Web.UI control. Would that mean I need another routine that passes the Rad Controls for parsing? Is what I am trying to do even possible?

David Penny
Kostadin
Telerik team
 answered on 07 Mar 2013
9 answers
118 views
Hi Team,

Here is my Design. I Have a RadDockZone inside a Layout and 4 docks placed inside RadDockZone oriented horizontal and width=100% ,So the Zone occupies whole width of screen.Each RadDock is 25% width so 4 docks perfectly fit in.

Problem goes here ,
On Page Load it looks perfectly fine 4 docks together in one Row of Zone. If i try to move one of the Dock then one of the Dock goes to Next row of Zone which i want to restrict. Can you please help me Resolving this ?

Thanks,
Mady
Slav
Telerik team
 answered on 07 Mar 2013
1 answer
46 views
I am using radlistbox and I set AutoPostBackOnTransfer to false because when it was set to true, it was reloading the page everytime which sent the user to the top of the page. We obviously want the page not to move when clicking one of the transfer buttons. Is there another way to prevent this from happening? We have a submit button that allows the code to submit to the server without the AutoPostBackOnTransfer being set to true. However, there is an error (Index out of range) thrown when it sits too long before the submit button is clicked. Thanks!
Emily
Top achievements
Rank 1
 answered on 07 Mar 2013
7 answers
218 views
I'm not sure if this belongs here, under RadListBox or under Ajax (perhaps all three).  But here it goes.

I came across an interesting error when using two RadListBoxes and RadFilter on the same page when the RadFilter was placed inside of a RadAjaxPanel.  I managed to strip down the code to the very basics and still be able to reliably reproduce the error.

ASPX:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ListBoxErrorTesting2.aspx.cs" Inherits="Testing.ListBoxErrorTesting2" %>
 
<!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>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
         
        <telerik:RadListBox ID="SourceListBox" runat="server" AllowTransfer="true" TransferMode="Move" TransferToID="DestinationListBox" />
        <telerik:RadListBox ID="DestinationListBox" runat="server" />
     
        <br />
     
        <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" />
        <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel1">
            <telerik:RadFilter runat="server" ID="ReportFilter">
                <FieldEditors>
                    <telerik:RadFilterTextFieldEditor FieldName="Title" DisplayName="Title" />
                </FieldEditors>
            </telerik:RadFilter>
        </telerik:RadAjaxPanel>
 
    </div>
    </form>
</body>
</html>

And the code behind:
using System;
 
namespace Testing
{
    public partial class ListBoxErrorTesting2 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack) return;
 
            var data = new[] { "Item1", "Item2", "Item3", "Item4", "Item5" };
            DestinationListBox.DataSource = data;
            DestinationListBox.DataBind();
        }
    }
}

As you can see, this is a very basic setup.  One of the list boxes is data bound from a simple array of strings.  The filter has nothing but a single static editor.  The filter is wrapped in an update panel since we do not want or need to update the list boxes if a filter expression or group is added/modified/removed.  Yet, if the list boxes are interacted with, the filter will eventually throw the following exception:  Index was out of range.
System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.Collections.ArrayList.get_Item(Int32 index)
   at System.Web.UI.StateManagedCollection.System.Collections.IList.get_Item(Int32 index)
   at Telerik.Web.UI.ControlItemCollection.get_Item(Int32 index) in D:\Dev\clientaccessweb\Caw.ClientAccessWeb\trunk\Shared\TelerikSource\Telerik.Web.UI\Common\Navigation\ControlItemCollection.cs:line 30
   at Telerik.Web.UI.ClientStateLogPlayer`1.Remove(ControlItemCollection items, Int32 index) in D:\Dev\clientaccessweb\Caw.ClientAccessWeb\trunk\Shared\TelerikSource\Telerik.Web.UI\Common\Navigation\ClientStateLogPlayer.cs:line 142
   at Telerik.Web.UI.ClientStateLogPlayer`1.Play(ClientStateLogEntry entry) in D:\Dev\clientaccessweb\Caw.ClientAccessWeb\trunk\Shared\TelerikSource\Telerik.Web.UI\Common\Navigation\ClientStateLogPlayer.cs:line 62
   at Telerik.Web.UI.ClientStateLogPlayer`1.Play(IEnumerable`1 clientStateLogEntry) in D:\Dev\clientaccessweb\Caw.ClientAccessWeb\trunk\Shared\TelerikSource\Telerik.Web.UI\Common\Navigation\ClientStateLogPlayer.cs:line 27
   at Telerik.Web.UI.RadListBox.LoadLogEntries(RadListBoxClientState clientState) in D:\Dev\clientaccessweb\Caw.ClientAccessWeb\trunk\Shared\TelerikSource\Telerik.Web.UI\ListBox\RadListBox.cs:line 906
   at Telerik.Web.UI.RadListBox.LoadClientState(RadListBoxClientState clientState) in D:\Dev\clientaccessweb\Caw.ClientAccessWeb\trunk\Shared\TelerikSource\Telerik.Web.UI\ListBox\RadListBox.cs:line 892
   at Telerik.Web.UI.RadListBox.LoadPostData(String postDataKey, NameValueCollection postCollection) in D:\Dev\clientaccessweb\Caw.ClientAccessWeb\trunk\Shared\TelerikSource\Telerik.Web.UI\ListBox\RadListBox.cs:line 800
   at Telerik.Web.UI.RadDataBoundControl.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) in D:\Dev\clientaccessweb\Caw.ClientAccessWeb\trunk\Shared\TelerikSource\Telerik.Web.UI\Common\RadDataBoundControl.cs:line 653
   at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.HandleError(Exception e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at ASP.main_testing_listboxerrortesting2_aspx.ProcessRequest(HttpContext context) in c:\Users\trasmussen\AppData\Local\Temp\Temporary ASP.NET Files\root\e99f54ff\b41660f1\App_Web_listboxerrortesting2.aspx.dc92d279.2k6ikk-w.0.cs:line 0
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

The number of times you can make Ajax callbacks with the filter depends on how you have interacted with the list boxes.  The quickest way was to move all items to the left, then one item back to the right.  The second click of Add Expression throws the error.

This may not be limited to just RadFilter, but any control within a RadAjax panel.  I did not get that far in my testing.

I can bypass the issue by wrapping all the controls in the ajax panel or using an ajax manager, but that's not really the point.
Emily
Top achievements
Rank 1
 answered on 07 Mar 2013
1 answer
59 views
It appears that there has been a change. Prior to this release, aggregate fields were grouped together under the column fields. Now, the column fields are grouped under the aggregate fields. Is there a new setting that is controlling this?

Never mind ... AggregatesPosition
Pavlina
Telerik team
 answered on 07 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?