Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
398 views

Hi,

I experience rather low quality results on scaling hires JPG image (2900x2900) to a size of 400x400

I can find that InterpolationMode.HighQualityBicubic is used but from my point of view the result should be better then.

Where can I send source photo (3.3MB), just try to scale to 400x400 and you 'll see what I mean.

Something changed in the scale procedure?

Marc

Vessy
Telerik team
 answered on 23 Apr 2019
1 answer
99 views

I have a web-site project that I needed to convert to web-application. After I resolved all the compilation errors I hit a runtime exception in a piece of code I got from Telerik's Website.
In the part where I de-serialize the grid settings data I get an exception

System.ArgumentExceptionHResult=0x80070057Message=The serialized data is invalid.Source=BMS.WebAppInner Exception 1:SerializationException: Unable to find assembly 'App_Code.5gd62bdt, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.

 

public static GridSettingsCollection LoadFromSerializedData(string data)

{

  LosFormatter formatter = new LosFormatter();

  // the line that throws the exception: formatter.Deserialize(data)

  return (GridSettingsCollection)formatter.Deserialize(data);

}

This works no problem when it was a Web-Site project. I am guessing assemblies that start with an App_Code.* usually means that it is compiling at runtime. I tried clearing all the ASP temp folders.

Any help is greatly appreciated. Thanks.

Eyup
Telerik team
 answered on 23 Apr 2019
7 answers
630 views
I want to bind the grid to query results.
A person might appear several times and I want to sort the results using person ID.
Is there a way to hide duplicate values (e.g. ID, First name, Last name etc.) in the grid?

I wish there was a property like 'HideDuplicates'  in MS Access.

Maysam
Top achievements
Rank 1
 answered on 22 Apr 2019
5 answers
424 views
Hello,

When I click on a RadMenuItem of a regular RadMenu (not context menu), the menu is not closed.
I try to add some code in the ItemClicked event :
sender.close();
or even:
setTimeout(function() {sender.close();}
But it doesn't work since the menu is reopened just after the close because of a delayed event.

Does anybody have an idea.

Thanks in advance.

BR, Laurent

<%@ Page Language="C#" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<script runat="server">  
 
</script> 
 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title></title>  
    <script type="text/javascript">  
        function rmMode_ItemClicked(sender, args)  
        {  
            sender.close();  
        }  
    </script> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
        <telerik:RadScriptManager  
                id="RSM" 
                runat="server" 
                > 
        </telerik:RadScriptManager> 
        <telerik:RadMenu  
                id="rmMode" 
                runat="server" 
                Flow="Horizontal" 
                OnClientItemClicked="rmMode_ItemClicked" 
                width="100px" 
                > 
                <Items> 
                    <telerik:RadMenuItem  
                            Text="Menu" 
                            > 
                        <Items> 
                            <telerik:RadMenuItem Text="Item1" Value="1" /> 
                            <telerik:RadMenuItem Text="Item2" Value="1" /> 
                        </Items> 
                    </telerik:RadMenuItem> 
                </Items> 
        </telerik:RadMenu> 
    </div> 
    </form> 
</body> 
</html> 
Ioannis
Top achievements
Rank 1
 answered on 22 Apr 2019
4 answers
284 views
I have an aspx page that contains an asp.net grid created from codebehing and rendered on pageload. This acts as the header for a RadGrid that contains the detail. Both the grids are in separate pannel.
I am using iTextSharp to export both the grids into a pdf. I am using the code below to create a form dynamically and then rerender it into a pdf:

HtmlForm

 

form = new HtmlForm();

 

form.Controls.Add(MyRadGrid1);

 

StringWriter sw = new StringWriter();

 

 

HtmlTextWriter hTextWriter = new HtmlTextWriter(sw);

 

form.Controls[0].RenderControl(hTextWriter);

I am getting several errors during the 'form.Controls[0].RenderControl(hTextWriter)' .
This code is unable to render all the telerik controls in the RadGrid.

Is there any other way that this could be achieved? Should i look into other options that will be better than itextSharp ?

Thanks in advance.

Garry
Top achievements
Rank 1
 answered on 21 Apr 2019
0 answers
64 views

Hello!
I have a grid with frozen columns and grouping. When the grid loads without horizontal scrolling and has hidden columns, I discovered two problems:
1) after displaying hidden columns manually and when horizontal scrolling becomes available - we can scroll the grid data, but the grid headers do not scroll
2) the “colspan” parameter is incorrectly calculated if some columns were hidden when the page was loaded.

it is my .aspx code:

01.<%@ Page Language="VB" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="TelerikWebApp1._Default" %>
02. 
03.<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
04. 
06.<head runat="server">
07.    <title></title>
08.    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
09.</head>
10.<body>
11.    <form id="form1" runat="server">
12.    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
13.        <Scripts>
14.            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
15.            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
16.            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
17.        </Scripts>
18.    </telerik:RadScriptManager>
19.    <telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" runat="server" EnableHeaderContextMenu="true"
20.        ClientSettings-ClientEvents-OnColumnShown="ColumnShown" ClientSettings-ClientEvents-OnColumnHidden="ColumnHidden">
21.        <ClientSettings>
22.            <Scrolling AllowScroll="True" UseStaticHeaders="True" FrozenColumnsCount="4"></Scrolling>
23.        </ClientSettings>
24.        <MasterTableView ></MasterTableView>
25.        <HeaderStyle Width="200px" />
26.    </telerik:RadGrid>
27.    <script type="text/javascript">
28.        //Put your JavaScript code here.
29.        function ColumnHidden(sender, eventArgs) {}
30.        function ColumnShown(sender, eventArgs) {}
31.    </script>
32.    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
33.    </telerik:RadAjaxManager>
34.    <div>
35. 
36.    </div>
37.    </form>
38.</body>
39.</html>

and it is my .vb code

001.Imports Telerik.Web.Data
002.Imports Telerik.Web.UI
003. 
004.Partial Class _Default
005.    Inherits System.Web.UI.Page
006. 
007.    Private Sub _Default_LoadComplete(sender As Object, e As EventArgs) Handles Me.LoadComplete
008.        RadGrid1.MasterTableView.GetColumnSafe("Custom1").Display = False
009.        RadGrid1.MasterTableView.GetColumnSafe("Custom2").Display = False
010.        RadGrid1.MasterTableView.GetColumnSafe("Custom3").Display = False
011.        RadGrid1.MasterTableView.GetColumnSafe("Custom4").Display = False
012.        RadGrid1.MasterTableView.GetColumnSafe("Custom5").Display = False
013.        RadGrid1.MasterTableView.GetColumnSafe("Custom6").Display = False
014.        RadGrid1.MasterTableView.GetColumnSafe("Custom7").Display = False
015.        RadGrid1.MasterTableView.GetColumnSafe("Custom8").Display = False
016.        RadGrid1.MasterTableView.GetColumnSafe("Custom9").Display = False
017.        'RadGrid1.MasterTableView.GetColumnSafe("MainMaterial").Display = False
018.        RadGrid1.MasterTableView.GetColumnSafe("ComponentOrder").Display = False
019.    End Sub
020. 
021.    Private Sub _Default_PreRender(sender As Object, e As EventArgs) Handles Me.PreRender
022. 
023.    End Sub
024. 
025.    Private Sub RadGrid1_NeedDataSource(sender As Object, e As GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource
026.        Dim list As List(Of PersonData) = New List(Of PersonData)
027.        list.Add(New PersonData(1, "Name1", 11, "", "", "", "", "", "", "", "", "", "1", "Test", 1))
028.        list.Add(New PersonData(2, "Name2", 12, "", "", "", "", "", "", "", "", "", "1", "Test", 1))
029.        list.Add(New PersonData(3, "Name3", 13, "", "", "", "", "", "", "", "", "", "1", "Test", 0))
030.        list.Add(New PersonData(4, "Name4", 14, "", "", "", "", "", "", "", "", "", "1", "Test", 0))
031.        RadGrid1.DataSource = list
032. 
033.        RadGrid1.GroupingEnabled = True
034.        RadGrid1.GroupingSettings.ShowUnGroupButton = False
035.        RadGrid1.ShowGroupPanel = False
036.        RadGrid1.GroupingSettings.GroupContinuesFormatString = ""
037. 
038.        RadGrid1.MasterTableView.GroupByExpressions.Clear()
039.        Dim selfield As GridGroupByField = New GridGroupByField()
040.        selfield.FieldName = "MainMaterial"
041.        'Do not use GetsystemText here its defined in Itemdatabound.
042.        selfield.HeaderText = "Main Material"
043.        Dim grpfield As GridGroupByField = New GridGroupByField()
044.        grpfield.FieldName = "MainMaterial"
045.        grpfield.SortOrder = GridSortOrder.Descending
046.        Dim expression3 As GridGroupByExpression = New GridGroupByExpression()
047.        expression3.GroupByFields.Add(grpfield)
048.        expression3.SelectFields.Add(selfield)
049.        RadGrid1.MasterTableView.GroupByExpressions.Add(expression3)
050.        Dim selfield2 As GridGroupByField = New GridGroupByField()
051.        selfield2.FieldName = "ComponentDescription"
052.        selfield2.HeaderText = "Material Type"
053.        Dim grpfield2 As GridGroupByField = New GridGroupByField() With {.FieldName = "ComponentOrder"}
054.        Dim grpfield3 As GridGroupByField = New GridGroupByField() With {.FieldName = "ComponentDescription"}
055.        Dim expression4 As GridGroupByExpression = New GridGroupByExpression()
056.        expression4.GroupByFields.Add(grpfield2)
057.        expression4.GroupByFields.Add(grpfield3)
058.        expression4.SelectFields.Add(selfield2)
059.        RadGrid1.MasterTableView.GroupByExpressions.Add(expression4)
060. 
061.    End Sub
062. 
063.    Public Class PersonData
064.        Private _ID As Int16
065.        Private _Name As String
066.        Private _Age As Int16
067.        Private _Custom1 As String
068.        Private _Custom2 As String
069.        Private _Custom3 As String
070.        Private _Custom4 As String
071.        Private _Custom5 As String
072.        Private _Custom6 As String
073.        Private _Custom7 As String
074.        Private _Custom8 As String
075.        Private _Custom9 As String
076. 
077.        Private _MainMaterial As Int16
078.        Private _ComponentOrder As String
079.        Private _ComponentDescription As String
080. 
081.        Public Sub New(ByVal id As Int16, ByVal name As String, ByVal age As Int16,
082.                       ByVal custom1 As String,
083.                       ByVal custom2 As String,
084.                       ByVal custom3 As String,
085.                       ByVal custom4 As String,
086.                       ByVal custom5 As String,
087.                       ByVal custom6 As String,
088.                       ByVal custom7 As String,
089.                       ByVal custom8 As String,
090.                       ByVal custom9 As String,
091.                       ByVal componentOrder As String,
092.                       ByVal componentDescription As String,
093.                       ByVal mainMaterial As Int16)
094. 
095.            _ID = id
096.            _Name = name
097.            _Age = age
098. 
099.            _ComponentOrder = componentOrder
100.            _ComponentDescription = componentDescription
101.            _MainMaterial = mainMaterial
102. 
103.        End Sub
104. 
105.        Public Property ID() As Int16
106.            Get
107.                Return _ID
108.            End Get
109.            Set(ByVal Value As Int16)
110.                _ID = Value
111.            End Set
112.        End Property
113. 
114.        Public Property MainMaterial() As Int16
115.            Get
116.                Return _MainMaterial
117.            End Get
118.            Set(ByVal Value As Int16)
119.                _MainMaterial = Value
120.            End Set
121.        End Property
122. 
123.        Public Property ComponentOrder() As String
124.            Get
125.                Return _ComponentOrder
126.            End Get
127.            Set(ByVal Value As String)
128.                _ComponentOrder = Value
129.            End Set
130.        End Property
131. 
132.        Public Property ComponentDescription() As String
133.            Get
134.                Return _ComponentDescription
135.            End Get
136.            Set(ByVal Value As String)
137.                _ComponentDescription = Value
138.            End Set
139.        End Property
140. 
141.        Public Property Name() As String
142.            Get
143.                Return _Name
144.            End Get
145.            Set(ByVal Value As String)
146.                _Name = Value
147.            End Set
148.        End Property
149. 
150.        Public Property Custom1() As String
151.            Get
152.                Return _Custom1
153.            End Get
154.            Set(ByVal Value As String)
155.                _Custom1 = Value
156.            End Set
157.        End Property
158. 
159.        Public Property Custom2() As String
160.            Get
161.                Return _Custom2
162.            End Get
163.            Set(ByVal Value As String)
164.                _Custom2 = Value
165.            End Set
166.        End Property
167. 
168.        Public Property Custom3() As String
169.            Get
170.                Return _Custom3
171.            End Get
172.            Set(ByVal Value As String)
173.                _Custom3 = Value
174.            End Set
175.        End Property
176. 
177.        Public Property Custom4() As String
178.            Get
179.                Return _Custom4
180.            End Get
181.            Set(ByVal Value As String)
182.                _Custom4 = Value
183.            End Set
184.        End Property
185. 
186.        Public Property Custom5() As String
187.            Get
188.                Return _Custom5
189.            End Get
190.            Set(ByVal Value As String)
191.                _Custom5 = Value
192.            End Set
193.        End Property
194. 
195.        Public Property Custom6() As String
196.            Get
197.                Return _Custom6
198.            End Get
199.            Set(ByVal Value As String)
200.                _Custom6 = Value
201.            End Set
202.        End Property
203. 
204.        Public Property Custom7() As String
205.            Get
206.                Return _Custom7
207.            End Get
208.            Set(ByVal Value As String)
209.                _Custom7 = Value
210.            End Set
211.        End Property
212. 
213.        Public Property Custom8() As String
214.            Get
215.                Return _Custom8
216.            End Get
217.            Set(ByVal Value As String)
218.                _Custom8 = Value
219.            End Set
220.        End Property
221. 
222.        Public Property Custom9() As String
223.            Get
224.                Return _Custom9
225.            End Get
226.            Set(ByVal Value As String)
227.                _Custom9 = Value
228.            End Set
229.        End Property
230. 
231.        Public Property Age() As Int16
232.            Get
233.                Return _Age
234.            End Get
235.            Set(ByVal Value As Int16)
236.                _Age = Value
237.            End Set
238.        End Property
239. 
240.    End Class
241. 
242.End Class



And also I have a question about the work of the grouping. In our project we have a lot of grids, and all of them have the same markup(it is example https://prnt.sc/ndptj5), but the two grids have a different markup to grouping the rows(it is different example https://prnt.sc/ndpw3r). I do not know which parameter makes these changes, can you help me?

I am using the latest version of Telerik - 2019.1.215.45

Sasha
Top achievements
Rank 1
 asked on 18 Apr 2019
6 answers
101 views

 

Hi,

Code snippets coming after remove table style from insert table popup in chrome,ie,ff.

I am facing a big problem in editor please give any solution.

Link: https://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx

Steps to reproduce

Step 1

Try to insert table from Insert Table from editor toolbar.

Step 2

Right click on cell then click on Table/cell properties. A table wizard popup will come.

Step 3

Click on Table Layouts tab on the table wizard popup.

Step 4

Select any value from table styles drop down.

Step 5

Now you can see  TABLE>TR>TD>RemoveElement on the bottom of the editor.click on RemoveElement .

After click on RemoveElement you can see STYLE>RemoveElement  again click on RemoveElement.

then you can see like below in the editor.

.telerik-reTable-2 { border-collapse: collapse; border: solid 0px; font-family: Tahoma; } .telerik-reTable-2 tr.telerik-reTableHeaderRow-2 { border-width: 1.0pt 1.0pt 3.0pt 1.0pt...........

 

Rumen
Telerik team
 answered on 18 Apr 2019
7 answers
126 views
I have been using the 2010.1.415 release of the RadFilter for some time now. As I look to upgrade to the latest release (2011.1.413), I've run into a problem where the RadFilter cannot load a previously saved state from the database. It looks to be the same issue as detailed here - that is, as of the Q3 2010 release (2010.3.1109), there is now a new way to save state.

I currently have customer RadFilter settings saved in a database. How can I upgrade this data to be compatible with the latest release?
Rumen
Telerik team
 answered on 18 Apr 2019
5 answers
322 views
Hi there,

Bit of an odd problem here: I have a RadAjaxLoadingPanel that I want to display when I'm doing some client-side declarative data binding (http://demos.telerik.com/aspnet-ajax/grid/examples/client/declarativedatabinding/defaultcs.aspx). According to this http://www.telerik.com/help/aspnet-ajax/ajax-show-hide-loadingpanel.html , I can show and hide it via JavaScript. I've hooked into the RadGrid's client events of OnDataBinding and OnDataBound to show and hide the loading panel respectively.

Here are the two relevant JS functions, which are in a RadScriptBlock:

var currentLoadingPanel = null;
var currentControl = null;

function ShowLoading() {
    currentControl = $find("<%= uxRGC.ClientID %>");
    currentLoadingPanel = $find('<%= RadAjaxLoadingPanel1.ClientID %>');
    currentLoadingPanel.show(currentControl);
}
 
function HideLoading() {
    if (currentLoadingPanel != null) {
        currentLoadingPanel.hide(currentUpdatedControl);
    }
    currentUpdatedControl = null;
    currentLoadingPanel = null;
}

The odd thing is, the $find for RadAjaxLoadingPanel1 does not find the control, i.e. it comes back as null. I get the currentControl, which is the RadGrid, but not the loading panel. If I use document.getElementById, it finds the control but show(xyz) isn't supported.

I'll just mention that the grid, loading panel and script block are in a ASP.Net .ascx control, which gets loaded onto a content page inside a master page.

Thank you,

Mike K.
Vessy
Telerik team
 answered on 18 Apr 2019
1 answer
75 views
How to we prevent someone from entering a value which is not in the dropdown?
Peter Milchev
Telerik team
 answered on 18 Apr 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?