Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
117 views
I have a RadGrid that I am building dynamically from the Page_Init event in the code behind and was wondering if it is possible to change the displayed filter items by column?

Say I have two text fields that are bound I may want to have Contains and Does Not Contain displayed with the first column and Starts With for the second column. This will be based on a conditional switch within my code.

I understand how to filter the FilterMenu globally for all columns but need a column specific implementation. I have seen this  ( http://www.telerik.com/forums/radgrid-reducing-the-filter-menu-options-by-column ) example which shows a JavaScript based solution but I don't think this will work for me as I building everything dynamically.

Phil
Eyup
Telerik team
 answered on 16 Sep 2014
1 answer
126 views
Hello,

1.
Image manager doesn't display the correct image width and height in the image editor.

Scenario to reproduce:
1. Add an image to the editor and set it's width and height.
2. Select the image and click in the toolbar on the image manager, click on the Properties tab, you can notice that the width and height are not correct.
 correct width and height.

Image manager doesn't display preview for non English file names

Scenario to reproduce:
1. Add an image to the editor which the image name is not in English.
2. Select the image and click in the toolbar on the image manager, you can notice that the image is not display in the Preview.

Thanks,



Vessy
Telerik team
 answered on 16 Sep 2014
6 answers
196 views
Hi,

I am using the radgrid control, and using an image button to export all data to PDF file displayed in the grid, and one of the columns in the grid contains hyperlinks, though that column is not a hyperlink column, the issue i am facing is while exporting the data, i need all the hyperlinks displayed as a common text like "Download" but in addition this text should be a clickable link when seen in the pdf document.

Any kind of help will be appreciated.

Thanks.

   
Kostadin
Telerik team
 answered on 16 Sep 2014
4 answers
185 views
Hi All,

Using the silk skin on a grid I notice that the page buttons use the grey style of hover.  On radbuttons you can tell them to use the primary style (which ironically seems to be the secondary style as it is not default), which shows a nice blue highlight.  Is there a way to get this blue highlight on the page buttons - it provides a nice uplift to an otherwise grey page.

Regards

Jon
Jon
Top achievements
Rank 1
 answered on 16 Sep 2014
5 answers
226 views
Hi,

In our project we have problems with slow horizontal scrolling in Mozilla Firefox. It can easily be reproduced on your demo site (with Firefox):

http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/scrolling/scrolling/defaultcs.aspx

Steps to reproduce:

1. Turn off "Enable\Disable Frozen Columns"
2. Make sure that Use static headers and footers are turned on
3. Click on horizontal scroll-bar just to the left of the right scroll arrow (just above the 2 in '91 items in 2 pages, when page size is 50)
4. Scroll thumb is heading toward mouse position but it is very slow

This issue doesn't occur on Chrome. Also everything works properly on Firefox when Frozen Columns are enabled or static headers and footers are disabled.

Our customers require to have static headers so it is not possible to turn them off.

Do you have a solution or workaround for this issue?
Kostadin
Telerik team
 answered on 16 Sep 2014
1 answer
63 views
Hi

thus loading CSS file in master page:

<inf:StyleSheetManager runat="server" ID="ssm1" CdnSettings-TelerikCdn="Disabled">
        <StyleSheets >
 
            <inf:StyleSheetReference Assembly="Data.Web" Name="Data.Web.Content.Styles.Style.css" />
 
        </StyleSheets>
    </inf:StyleSheetManager>

web.config:
<appSettings>
 
    <add key="Telerik.Skin" value="newSkin"/>
 
    <add key="Telerik.EnableEmbeddedSkins" value="false" />
     
  </appSettings>

Firefox and Chrome are my everything behaves well. Functional styling.
bug occurs in IE, the page behaves as if no style retrieved.
bug is all version IE.
I need to work in IE 8 or higher, please advice. 
Ivan Zhekov
Telerik team
 answered on 16 Sep 2014
3 answers
183 views
01.<telerik:RadMenu runat="server" Skin="Menu_New" ID="RadMainMenu" Style="z-index: 5" ExpandDelay="1000"
02.    DataSourceID="SqlDataSourceMainMenu" DataFieldID="Id" DataFieldParentID="ParentId" DataTextField="Text"
03.    EnableRoundedCorners="true" EnableEmbeddedSkins="false" EnableShadows="true"
04.    OnItemDataBound="RadMainMenu_ItemDataBound" OnItemClick="RadMainMenu_ItemClick">
05. 
06.    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
07. 
08.    <DefaultGroupSettings RepeatColumns="3" RepeatDirection="Horizontal" />
09. 
10.</telerik:RadMenu>

I added the "DefaultGroupSettings" line and yes, every menu option was now a 3 bar menu. However, I need to be able to apply this to the menu options that actually have more than  "x" items in them.


Any help with this would be greatly appreciated.


Thanks,
Ivan Zhekov
Telerik team
 answered on 16 Sep 2014
2 answers
195 views
Trying to get my Radgrid to perform updates of records but have not been able to. I have been following this article(http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/manual-crud-operations/defaultcs.aspx?#qsf-demo-source) but because I am using content placeholders etc. can't follow it exactly. Below is my code, any suggestions on how to get the update to work would be appreciated. When I run the page, it just displays the data in the grid, the pencil icon does not show up to update. Any ideas?

Attached is the design and code behind.

Code Behind
01.using System;
02.using System.Collections.Generic;
03.using System.Linq;
04.using System.Web;
05.using System.Web.UI;
06.using System.Web.UI.WebControls;
07.using Business.Admin;
08.using Telerik.Web.UI;
09. 
10.namespace XX.Admin
11.{
12.    public partial class AdminLookUp : System.Web.UI.Page
13.    {
14.        protected void Page_Load(object sender, EventArgs e)
15.        {
16.            //if (!IsPostBack)
17.            //{
18.            //    LoadData();
19.            //}
20.        }
21. 
22.        public void LoadData(object source, GridNeedDataSourceEventArgs e)
23.        {
24.            //load data for lookup grid
25.            AdminLookUpBO lookUp = new AdminLookUpBO();
26.            List<AdminLookUpVO> getLookUpData;
27. 
28.            getLookUpData = lookUp.GetLookUpData();
29. 
30.            AdminLookUpGrid.DataSource = getLookUpData;
31.        }
32. 
33.        protected void goBackButton_Click(object sender, EventArgs e)
34.        {
35.            Response.Redirect("~/Admin/AdminMain.aspx");
36.        }
37. 
38. 
39.        protected void UpdateData(object source, GridCommandEventArgs e)
40.        {
41.               //update data for lookup grid
42.            AdminLookUpBO lookup = new AdminLookUpBO();
43. 
44.            var editableItem = ((GridEditableItem)e.Item);
45.            int lookUpId = (int)editableItem.GetDataKeyValue("ID");
46.            bool result = false;
47. 
48.            result = lookup.UpdateData(lookUpId, editableItem);
49.           
50.        }
51. 
52. 
53.    }
54.}


001.<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="AdminLookUp.aspx.cs" Inherits="XX.Admin.AdminLookUp" %>
002.<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
003.<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
004.        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
005.        <script type="text/javascript">
006.            function rowDblClick(sender, eventArgs) {
007.                sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
008.            }
009.        </script>
010.    </telerik:RadCodeBlock>
011.</asp:Content>
012.<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
013.       <div class="centeredContent">
014.        <div class="centeredTable">
015.            <table align="center" width="900">
016.                <tr>
017.                    <td>
018.                        <p align="center" class="mediumHeader">
019.                            <asp:Label ID="adminLookupLabel"
020.                                runat="server"
021.                                Text='<%$ Resources:Resource, AdminLookUpTitle %>'
022.                                CssClass="mediumHeader" />
023.                        </p>
024.                    </td>
025.                </tr>
026.                <tr>
027.                    <td>
028.                        <asp:Label ID="errorMessageLabel" runat="server" CssClass="ErrorLabelTable" Text="" Visible="false" />
029.                    </td>
030.                </tr>
031.            </table>
032. 
033.            <table align="center" width="900">
034.                <tr>
035.                    <td>
036.                        <div style="width: 900px; height: auto">
037. 
038.                            <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
039.                                <AjaxSettings>
040.                                    <telerik:AjaxSetting AjaxControlID="AdminLookUpGrid">
041.                                        <UpdatedControls>
042.                                            <telerik:AjaxUpdatedControl ControlID="AdminLookUpGrid" />
043.                                        </UpdatedControls>
044.                                    </telerik:AjaxSetting>
045.                                </AjaxSettings>
046.                            </telerik:RadAjaxManager>
047.                            <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" />
048. 
049.                            <telerik:RadGrid ID="AdminLookUpGrid" runat="server"
050.                                AllowPaging="True" Skin="Windows7"
051.                                AllowAutomaticUpdates="True"
052.                                AutoGenerateColumns="False"
053.                                CellSpacing="0"
054.                                Height="300px"
055.                                GridLines="None"
056.                                OnNeedDataSource="LoadData" OnUpdateCommand="UpdateData"
057.                                AllowMultiRowSelection="True" Width="900px">
058.                                <ClientSettings>
059.                                    <Selecting AllowRowSelect="True" />
060.                                </ClientSettings>
061.                                <MasterTableView DataKeyNames="ID, User_ID, First_Name, Last_Name, Employee_Number, Role_Function, Is_Active"
062.                                                 ShowHeadersWhenNoRecords="True">
063.                                    <Columns>
064.                                        <telerik:GridBoundColumn DataField="ID" Visible="false">    
065.                                        </telerik:GridBoundColumn>
066.                                        <telerik:GridBoundColumn DataField="User_ID"
067.                                            HeaderText='<%$ Resources:Resource, AdminLookUp_UserID %>'
068.                                            UniqueName="User_ID">
069.                                            <HeaderStyle Width="250px" />
070.                                        </telerik:GridBoundColumn>
071.                                        <telerik:GridBoundColumn DataField="First_Name"
072.                                            HeaderText='<%$ Resources:Resource, AdminLookUp_FirstName %>'
073.                                            UniqueName="First_Name">
074.                                            <HeaderStyle Width="100px" />
075.                                        </telerik:GridBoundColumn>
076.                                        <telerik:GridBoundColumn DataField="Last_Name"
077.                                            HeaderText='<%$ Resources:Resource, AdminLookUp_LastName %>'
078.                                            UniqueName="Last_Name">
079.                                            <HeaderStyle Width="100px" />
080.                                        </telerik:GridBoundColumn>
081.                                        <telerik:GridBoundColumn DataField="Employee_Number"
082.                                            HeaderText='<%$ Resources:Resource, AdminLookUp_EmployeeNumber %>'
083.                                            UniqueName="Employee_Number">
084.                                            <HeaderStyle Width="100px" />
085.                                        </telerik:GridBoundColumn>
086.                                        <telerik:GridBoundColumn DataField="Role_Function"
087.                                            HeaderText='<%$ Resources:Resource, AdminLookUp_RoleFunction %>'
088.                                            UniqueName="Role_Function">
089.                                            <HeaderStyle Width="100px" />
090.                                        </telerik:GridBoundColumn>
091.                                        <telerik:GridBoundColumn DataField="Is_Active"
092.                                            HeaderText='<%$ Resources:Resource, AdminLookUp_IsActive %>'
093.                                            UniqueName="Is_Active">
094.                                            <HeaderStyle Width="100px" />
095.                                        </telerik:GridBoundColumn>
096.                                    </Columns>
097.                                    <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
098.                                </MasterTableView>
099.                                <PagerStyle PageSizeControlType="None"></PagerStyle>
100.                                <FilterMenu EnableImageSprites="False"></FilterMenu>
101.                            </telerik:RadGrid>
102. 
103. 
104.                        </div>
105.                    </td>
106.                </tr>
107.                <tr>
108.                     
109.                    <td align="right">
110.                        <asp:Button ID="saveButton" runat="server" Text="Save" />
111.                        <asp:Button ID="cancelButton" runat="server" Text="Cancel" />
112.                        <asp:Button ID="goBackButton" runat="server" Text="GoBack" OnClick="goBackButton_Click" />
113.                    </td>
114.                </tr>
115.            </table>
116.        </div>
117.   </div>
118.</asp:Content>

Sasha
Top achievements
Rank 1
 answered on 15 Sep 2014
1 answer
278 views
I am attempting to use the Rad Editor for my website and I do NOT want JavaScript to be working, or any type of XSS capabilities.

This is what my declaration looks lik
<telerik:RadEditor ID="txtContent" Height="500" Width="600" runat="server" ToolsFile="~/DesktopModules/Admin/RadEditorProvider/Toolsfile/ToolsFileWithUpload.xml"
                SpellCheckSettings-AllowAddCustom="false" SpellCheckSettings-AjaxUrl="/Telerik.Web.UI.SpellCheckHandler.axd" OnClientLoad="OnClientLoad"
                NewLineMode="P" DialogsCssFile="~/css/TelerikSkin/TelerikSkin.css" AllowScripts="false" ContentFilters="RemoveScripts">
                <Content>
                </Content>
                <CssFiles>
                    <telerik:EditorCssFile Value="~/css/YellowToken.css" />
                </CssFiles>
                <SpellCheckSettings AllowAddCustom="False" AjaxUrl="/Telerik.Web.UI.SpellCheckHandler.axd"></SpellCheckSettings>
</telerik:RadEditor>

As you can see: AllowScripts="false" and ContentFilters="RemoveScripts" are both set.
Unfortunately I can still enter in something like:
<script>alert('This Is Bad');</script>
And it will still do the alert. Every time.

I was then searching around on the telerik site looking for help and ran across the OnClientLoad method of removing items.
function OnClientLoad(editor, args) {
                    editor.get_filtersManager().add(new MyFilter());
                }
                MyFilter = function () {
                    MyFilter.initializeBase(this);
                    this.set_isDom(false);
                    this.set_enabled(true);
                    this.set_name("RadEditor filter");
                    this.set_description("RadEditor filter description");
                }
                MyFilter.prototype =
                {
                    getHtmlContent: function (content) {
                        var dom = document.createElement("DIV");
                        dom.innerHTML = content;
                        var elems = dom.getElementsByTagName("*");
 
                        for (var i = 0; i < elems.length; i++) {
 
                            //Remove all onmouseover, onmouseout, onclick eventhandlers from element
                            var elem = elems[i];
                            if (elem.hasAttribute("onmouseover")) {
                                elem.setAttribute("onmouseover", "");
                            }
                            if (elem.hasAttribute("onerror")) {
                                elem.setAttribute("onerror", "");
                            }
                            if (elem.hasAttribute("onclick")) {
                                elem.setAttribute("onclick", "");
                            }
                            if (elem.hasAttribute("alert")) {
                                elem.setAttribute("alert", "");
                            }
                        }
                        return dom.innerHTML;
                    },
                    getDesignContent: function (content) {
                        var dom = document.createElement("DIV");
                        dom.innerHTML = content;
                        var elems = dom.getElementsByTagName("*");
 
                        for (var i = 0; i < elems.length; i++) {
 
                            //Remove all onmouseover, onmouseout, onclick eventhandlers from element
                            var elem = elems[i];
                            if (elem.hasAttribute("onmouseover")) {
                                elem.setAttribute("onmouseover", "");
                            }
                            if (elem.hasAttribute("onerror")) {
                                elem.setAttribute("onerror", "");
                            }
                            if (elem.hasAttribute("onclick")) {
                                elem.setAttribute("onclick", "");
                            }
                            if (elem.hasAttribute("alert")) {
                                elem.setAttribute("alert", "");
                            }
                        }
                        return dom.innerHTML;
 
                    }
                }
 
                MyFilter.registerClass('MyFilter', Telerik.Web.UI.Editor.Filter);

I attempted this from a forum post a while back. Unfortunately it doesn't actually fix the issue either. It doesn't remove any of the things that it says it does.

And this is where I am stuck at. Nothing is really working for what it says its doing and I am leaving this for next week. I am just hoping someone points out something that I am perhaps doing wrong and can fix, or I don't know what.
Alexander
Top achievements
Rank 1
 answered on 15 Sep 2014
1 answer
114 views
Hi

I have FileExplorer in FormView and when changing from ReadOnly To Edit Mode it seems to loose the configuration that i do in
Page_Load().

Thank you for your help.

Vessy
Telerik team
 answered on 15 Sep 2014
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?