Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
133 views
Hi,
I am using RadControls old version which was working perfectly fine with me until now.
I have hosting on GoDaddy (shared hosting). Recently, I have upgraded to IIS7 for better performance.
After upgrading it, I started getting the below errors on my website (System.Security exception) 
This error occurs during Edit Mod of RadGrid.

I am attaching the error / aspx/ cs / web.config file along with this post.
Request you to look into this asap, please do not tell me to upgrade the Radcontrols version (My client would be reluctant unless I get this issue resolved !)

Server Error in '/' Application.
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
 
Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
 
Source Error:
 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
 
Stack Trace:
 
 
[SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
   System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
   System.Security.CodeAccessPermission.Demand() +58
   System.Reflection.Assembly.VerifyCodeBaseDiscovery(String codeBase) +118
   System.Reflection.Assembly.get_CodeBase() +35
   System.Web.Handlers.ScriptResourceHandler.GetCodeBaseWithAssert(Assembly assembly) +31
   System.Web.Handlers.ScriptResourceHandler.GetLastWriteTime(Assembly assembly) +36
   System.Web.Handlers.ScriptResourceHandler.GetAssemblyInfoInternal(Assembly assembly) +61
   System.Web.Handlers.ScriptResourceHandler.GetAssemblyInfo(Assembly assembly) +62
   System.Web.Handlers.RuntimeScriptResourceHandler.System.Web.Handlers.IScriptResourceHandler.GetScriptResourceUrl(Assembly assembly, String resourceName, CultureInfo culture, Boolean zip, Boolean notifyScriptLoaded) +325
   System.Web.Handlers.ScriptResourceHandler.GetScriptResourceUrl(Assembly assembly, String resourceName, CultureInfo culture, Boolean zip, Boolean notifyScriptLoaded) +33
   System.Web.UI.ScriptManager.GetScriptResourceUrl(String resourceName, Assembly assembly) +89
   System.Web.UI.ScriptRegistrationManager.RegisterClientScriptResource(Control control, Type type, String resourceName) +111
   System.Web.UI.ScriptManager.RegisterClientScriptResource(Control control, Type type, String resourceName) +9
 
 
Version Information: Microsoft .NET Framework Version:2.0.50727.4223; ASP.NET Version:2.0.50727.4223



<%@ Page Language="C#" MasterPageFile="~/SRGAHome/MasterPages/AdminFullMaster.master"
    AutoEventWireup="true" CodeFile="Relay_Past_Satsang.aspx.cs" Inherits="SRGAHome_Admin_Relay_Past_Satsang"
    Title="Relaying Past Satangs" %>
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.QuickStart" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.WebControls" Assembly="RadAjax.NET2" %>
<%@ Register TagPrefix="rad" Namespace="Telerik.WebControls" Assembly="RadGrid.NET2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphBreadCrumb" runat="Server">
    <a id="A1" href="~/SRGAHome/Admin/Dashboard.aspx" runat="server">Dashboard</a><span>›</span>Past Satsang Configuration
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphPageTitle" runat="Server">
    Past Satsang Configuration
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="mainBody" runat="Server">
    <td valign="top">
        <br />
        <table width="925" border="0" align="center" cellpadding="0" cellspacing="0">
           <tr>
                <td class="subDataLarge" style="text-align: left" colspan="2">
                    <br />
                    <ajax:UpdatePanel UpdateMode="Conditional" runat="server" ID="upSubmit">
                        <ContentTemplate>
                            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                <tr>
                                    <td class="subDataLarge" valign="top">
                                        <rad:RadGrid ID="RadGrid1" runat="server" Skin="Windows" GridLines="None" AllowPaging="True"
                                            AllowSorting="True" AutoGenerateColumns="False" Width="97%" OnNeedDataSource="RadGrid1_NeedDataSource"
                                            ShowStatusBar="true" EnableAJAXLoadingTemplate="true" LoadingTemplateTransparency="50"
                                            OnDeleteCommand="RadGrid1_DeleteCommand" OnInsertCommand="RadGrid1_InsertCommand"
                                            OnItemDataBound="RadGrid1_ItemDataBound" OnDataBound="RadGrid1_DataBound" OnUpdateCommand="RadGrid1_UpdateCommand"
                                            EnableAJAX="True">
                                            <PagerStyle Mode="NextPrevAndNumeric" />
                                            <MasterTableView DataKeyNames="PastSatsangId,DisplayonHomePage" GridLines="None" Width="100%" CommandItemDisplay="Top"
                                                ShowFooter="True">
                                                <FooterStyle BackColor="Azure" />
                                                <Columns>
                                                    <rad:GridEditCommandColumn ButtonType="ImageButton" UpdateImageUrl="../../Images/photo-gallery/small-icons/Update.gif"
                                                        EditImageUrl="../../Images/photo-gallery/small-icons/Edit.gif" InsertImageUrl="../../Images/photo-gallery/small-icons/Insert.gif"
                                                        CancelImageUrl="../../Images/photo-gallery/small-icons/Cancel.gif" UniqueName="EditCommandColumn">
                                                        <HeaderStyle Width="30px" />
                                                    </rad:GridEditCommandColumn>
                                                    <rad:GridButtonColumn ConfirmText="Delete this record?" ButtonType="ImageButton"
                                                        ImageUrl="../../Images/photo-gallery/small-icons/Delete.gif" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
                                                        <HeaderStyle Width="20px" />
                                                        <ItemStyle HorizontalAlign="Center" />
                                                    </rad:GridButtonColumn>
                                                    <rad:GridBoundColumn DataField="PastSatsangId" HeaderText="PastSatsangId" UniqueName="PastSatsangId"
                                                        ReadOnly="True" Visible="false">
                                                    </rad:GridBoundColumn>
                                                    <rad:GridTemplateColumn HeaderText="Display Name" SortExpression="DisplayName" UniqueName="DisplayName">
                                                        <ItemTemplate>
                                                            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                                                <tr>
                                                                    <td valign="top">
                                                                        <asp:Label runat="server" ID="lblDisplayName" Text='<%# Eval("DisplayName") %>'></asp:Label>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="left" />
                                                        <EditItemTemplate>
                                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="tbDisplayName"
                                                                ErrorMessage="This field is required!" runat="server">
                                                            </asp:RequiredFieldValidator>
                                                            <br />
                                                            <asp:TextBox runat="server" ID="tbDisplayName" Text='<%# Bind("DisplayName") %>'
                                                                Width="500px"></asp:TextBox><span style="color: Red; font-family: Verdana; font-size: medium">*</span>
                                                        </EditItemTemplate>
                                                    </rad:GridTemplateColumn>
                                                    <rad:GridTemplateColumn HeaderText="URL" SortExpression="URL" UniqueName="URL">
                                                        <ItemTemplate>
                                                            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                                                <tr>
                                                                    <td valign="top">
                                                                        <asp:Label runat="server" ID="lblURL" Text='<%# Eval("URL") %>'></asp:Label>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="left" />
                                                        <EditItemTemplate>
                                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="tbURL"
                                                                ErrorMessage="This field is required!" runat="server">
                                                            </asp:RequiredFieldValidator>
                                                            <br />
                                                            <asp:TextBox runat="server" ID="tbURL" Text='<%# Bind("URL") %>' Width="500px"></asp:TextBox><span
                                                                style="color: Red; font-family: Verdana; font-size: medium">*</span>
                                                        </EditItemTemplate>
                                                    </rad:GridTemplateColumn>
                                                    <rad:GridTemplateColumn HeaderText="Display for Users" SortExpression="DisplayonHomePage"
                                                        UniqueName="DisplayonHomePage">
                                                        <ItemTemplate>
                                                            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                                                <tr>
                                                                    <td valign="top">
                                                                        <asp:Label runat="server" ID="lblDisplayonHomePage" Text='<%# Eval("DisplayonHomePage") %>'></asp:Label>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="left" />
                                                        <EditItemTemplate>
                                                            <br />
                                                            <asp:DropDownList ID="ddlDisplayonHomePage" runat="server" Width="50px">
                                                            </asp:DropDownList>
                                                        </EditItemTemplate>
                                                    </rad:GridTemplateColumn>
                                                </Columns>
                                                <EditFormSettings ColumnNumber="2" CaptionFormatString="Edit properties of Satsang {0}"
                                                    CaptionDataField="DisplayName">
                                                    <FormTableItemStyle Wrap="False"></FormTableItemStyle>
                                                    <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
                                                    <FormMainTableStyle CellSpacing="0" CellPadding="3" Width="100%" />
                                                    <FormTableStyle GridLines="Horizontal" CellSpacing="0" CellPadding="2" CssClass="module"
                                                        Height="110px" Width="100%" />
                                                    <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
                                                    <FormStyle Width="100%" BackColor="#EEF2EA"></FormStyle>
                                                    <EditColumn ButtonType="ImageButton" UpdateImageUrl="../../Images/photo-gallery/small-icons/Update.gif" EditImageUrl="../../Images/photo-gallery/small-icons/Edit.gif"
                                                        InsertImageUrl="../../Images/photo-gallery/small-icons/Insert.gif" CancelImageUrl="../../Images/photo-gallery/small-icons/Cancel.gif"
                                                        InsertText="Insert Satsang Details" UpdateText="Update record" UniqueName="EditCommandColumn1"
                                                        CancelText="Cancel edit">
                                                    </EditColumn>
                                                    <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
                                                </EditFormSettings>
                                                <ExpandCollapseColumn Visible="False">
                                                    <HeaderStyle Width="19px"></HeaderStyle>
                                                </ExpandCollapseColumn>
                                                <RowIndicatorColumn Visible="False">
                                                    <HeaderStyle Width="20px" />
                                                </RowIndicatorColumn>
                                            </MasterTableView>
                                        </rad:RadGrid><br />
                                        <br />
                                    </td>
                                </tr>
                            </table>
                        </ContentTemplate>
                    </ajax:UpdatePanel>
                </td>
            </tr>
            <tr>
                <td class="copy" align="right" colspan="2">
                    <a href="Dashboard.aspx">Back To Dashboard</a><br />
                </td>
            </tr>
            <tr>
                <td style="height: 20px" colspan="2"
                    </td>
            </tr>
        </table>
    </td>
</asp:Content>



#region ====== Includes ======
using System;
using System.Data;
using System.Configuration;
using System.Collections;
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 SRGA.Utilities;
using SRGA.User;
#endregion
 
public partial class SRGAHome_Admin_Relay_Past_Satsang : System.Web.UI.Page
{
    #region ====== Variable Declaration ======
    protected MasterHandler objMaster = new MasterHandler();
    protected SatsangManagementHandler objSatsang = new SatsangManagementHandler();
    #endregion
 
    #region ====== Page Load ======
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["UserId"] == null)
        {
            ClientScript.RegisterClientScriptBlock(typeof(Page), "TimeOut", "<script language=javascript>parent.location.href='TimeOut.aspx';</script>");
            return;
        }
        else if (Session["RoleId"] != null)
        {
            // Checking whether this is a webcast admin. 3 - Webcast Admin, 1 - Super Admin
            string[] roleId = Session["RoleId"].ToString().Split(',');
            bool isAccess = false;
            foreach (string item in roleId)
            {
                if (item.Contains("1") || item.Contains("3"))
                {
                    isAccess = true;
                }
            }
 
            if (!isAccess)
            {
                ClientScript.RegisterClientScriptBlock(typeof(Page), "UnAuthorized Access", "<script language=javascript>parent.location.href='UnAuthorizedAccess.aspx';</script>");
                return;
            }
        }
    }
    #endregion
 
    #region ====== ItemDataBound event ======
    protected void RadGrid1_ItemDataBound(object sender, Telerik.WebControls.GridItemEventArgs e)
    {
        if (e.Item is Telerik.WebControls.GridDataItem)
        {
            // Displaying Label for Yes/No
            Telerik.WebControls.GridDataItem dataItem = e.Item as Telerik.WebControls.GridDataItem;
            Label lblDisplayonHomePage = (Label)(dataItem["DisplayonHomePage"].FindControl("lblDisplayonHomePage"));
            if (bool.Parse(lblDisplayonHomePage.Text.Trim().ToString()))
            {
                lblDisplayonHomePage.Text = "Yes";
            }
            else
            {
                lblDisplayonHomePage.Text = "No";
            }
        }
 
        if (e.Item is Telerik.WebControls.GridEditableItem && e.Item.IsInEditMode)
        {
            // Displaying Dropdownlist for Yes/No
            DropDownList ddlDisplayonHomePage = (DropDownList)e.Item.FindControl("ddlDisplayonHomePage");
            ddlDisplayonHomePage.Items.Add(new ListItem("Yes", "True"));
            ddlDisplayonHomePage.Items.Add(new ListItem("No", "False"));
            if (e.Item.ItemIndex != -1)
            {
                string displayonHomepage = RadGrid1.MasterTableView.DataKeyValues[e.Item.ItemIndex]["DisplayonHomePage"].ToString();
                ddlDisplayonHomePage.SelectedValue = displayonHomepage.ToString();
            }
        }
    }
    #endregion
 
    #region ====== NeedDataSource Event ======
    protected void RadGrid1_NeedDataSource(object source, Telerik.WebControls.GridNeedDataSourceEventArgs e)
    {
        try
        {
            // Handling Time Out.
            if (Session["UserId"] == null)
            {
                Page.RegisterClientScriptBlock("TimeOut", "<script language=javascript>parent.location.href='../../TimeOut.aspx';</script>");
                return;
            }
 
            if (!e.IsFromDetailTable)
            {
                RadGrid1.DataSource = objSatsang.GetPastSatsangList(true);
            }
 
        }
        catch (Exception ex)
        {
            LogHandler.LogError(long.Parse(Session["UserId"].ToString()), LogHandler.APPLICATION_ERROR, ex.StackTrace.ToString(), ex.Message.ToString());
            Response.Redirect("Error.aspx?errmsg=" + HttpUtility.UrlEncode(ex.Message.ToString()));
        }
    }
    #endregion
 
    #region ====== UpdateCommand Event ======
    protected void RadGrid1_UpdateCommand(object source, Telerik.WebControls.GridCommandEventArgs e)
    {
        Telerik.WebControls.GridEditableItem editedItem = e.Item as Telerik.WebControls.GridEditableItem;
        string pastSatsangId = editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["PastSatsangId"].ToString();
        string displayName = (editedItem["DisplayName"].Controls[3] as TextBox).Text;
        string url = (editedItem["URL"].Controls[3] as TextBox).Text;
        bool displayonHomepage = bool.Parse((editedItem["DisplayonHomePage"].Controls[1] as DropDownList).SelectedValue);
 
        try
        {
            // Code for Updating Past Satsang Details
            objSatsang.UpdatePastSatsang(int.Parse(pastSatsangId), displayName, url, displayonHomepage, int.Parse(Session["UserId"].ToString()));
            SetMessage("Satsang '" + displayName + "' updated.");
        }
        catch (Exception ex)
        {
            RadGrid1.Controls.Add(new LiteralControl("Unable to Update Satsang Details. Reason: " + ex.Message));
            e.Canceled = true;
        }
    }
    #endregion
 
    #region ====== InsertCommand Event ======
    protected void RadGrid1_InsertCommand(object source, Telerik.WebControls.GridCommandEventArgs e)
    {
 
        Telerik.WebControls.GridEditFormInsertItem insertedItem = (Telerik.WebControls.GridEditFormInsertItem)e.Item;
 
        string displayName = (insertedItem["DisplayName"].Controls[3] as TextBox).Text;
        string url = (insertedItem["URL"].Controls[3] as TextBox).Text;
        bool displayonHomepage = bool.Parse((insertedItem["DisplayonHomePage"].Controls[1] as DropDownList).SelectedValue);
 
        try
        {
            // Code for Inserting Past Satsang Details
            objSatsang.AddPastSatsang(displayName, url, displayonHomepage, int.Parse(Session["UserId"].ToString()));
            SetMessage("Satsang Details Inserted.");
        }
        catch (Exception ex)
        {
            RadGrid1.Controls.Add(new LiteralControl("Unable to Insert Satsang Details. Reason: " + ex.Message));
            e.Canceled = true;
        }
    }
    #endregion
 
    #region ====== DeleteCommand Event ======
    protected void RadGrid1_DeleteCommand(object source, Telerik.WebControls.GridCommandEventArgs e)
    {
        Telerik.WebControls.GridDataItem item = (Telerik.WebControls.GridDataItem)e.Item;
        string pastSatsangId = item.OwnerTableView.DataKeyValues[item.ItemIndex]["PastSatsangId"].ToString();
        string displayName = (item["DisplayName"].Controls[1] as Label).Text;
        try
        {
            // Code for Deleting Past Satsang Details
            int result = objSatsang.DeletePastSatsang(int.Parse(pastSatsangId), int.Parse(Session["UserId"].ToString()));
            if (result == 1)
            {
                SetMessage("Details for Satsang '" + displayName + "' deleted.");
            }
        }
        catch (Exception ex)
        {
            RadGrid1.Controls.Add(new LiteralControl("Unable to delete Satsang Details. Reason: " + ex.Message));
            e.Canceled = true;
        }
    }
    #endregion
 
    #region ====== SetMessage ======
    private void SetMessage(string message)
    {
        gridMessage = message;
    }
    #endregion
 
    #region ====== DataBound Event ======
    private string gridMessage = null;
    protected void RadGrid1_DataBound(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(gridMessage))
        {
            DisplayMessage(gridMessage);
        }
    }
    #endregion
 
    #region ====== DisplayMessage ======
    private void DisplayMessage(string text)
    {
        RadGrid1.Controls.Add(new LiteralControl(string.Format("<span style='color:red'>{0}</span>", text)));
    }
    #endregion
}



<?xml version="1.0"?>
<!--
    Note: As an alternative to hand editing this file you can use the
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in
    machine.config.comments usually located in
    \Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
    <!-- Added for Yet Another Forum  -->
    <configSections>
        <section name="yafnet" type="yaf.SectionHandler,yaf"/>
        <section name="rewriter" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter"/>
    </configSections>
    <yafnet configSource="yafnet.config"/>
    <!--<rewriter configSource="urlrewriter.config"/>-->
    <!-- Added for Yet Another Forum  -->
    <appSettings>
        <add key="WebServerUrl" value="http://localhost:57528/PappajiWebsite/"/>
    </appSettings>
    <connectionStrings>
        <clear/>
        <!--<add name="connString" connectionString="user id=**;password=**;database=****;data source=(local);" providerName="System.Data.SqlClient"/>-->
        </connectionStrings>
    <system.web>
        <!-- Added from Yet Another Forum Begins here -->
        <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
        <!-- Added from Yet Another Forum Ends here -->
        <!--
            Set compilation debug="true" to insert debugging
            symbols into the compiled page. Because this
            affects performance, set this value to true only
            during development.
        -->
        <compilation debug="true">
            <assemblies>
                <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                <add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
            </assemblies>
        </compilation>
        <!--
            The <authentication> section enables configuration
            of the security authentication mode used by
            ASP.NET to identify an incoming user.
    <authentication mode="Windows"/>
        -->
        <authentication mode="Forms">
            <forms name=".YAFNET_Authentication" timeout="525600"/>
        </authentication>
        <!--
            The <customErrors> section enables configuration
            of what to do if/when an unhandled error occurs
            during the execution of a request. Specifically,
            it enables developers to configure html error pages
            to be displayed in place of a error stack trace.
        -->
        <customErrors mode="Off">
            <!--<error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" /> -->
        </customErrors>
 
        <sessionState timeout="600" />
 
        <!-- Settings for Implementing Ajax Starts here-->
        <pages buffer="true" enableEventValidation="false" validateRequest="false" viewStateEncryptionMode="Never" enableViewStateMac="false">
            <controls>
                <add tagPrefix="ajax" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
                <add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajaxToolkit"/>
            </controls>
        </pages>
        <httpModules>
            <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
            <!-- Cross Side Scripting HTTP Module -->
            <!-- Added from Yet Another Forum Begins here -->
            <!--<add type="Intelligencia.UrlRewriter.RewriterHttpModule,Intelligencia.UrlRewriter" name="UrlRewriter"/>-->
            <!-- Added from Yet Another Forum End here -->
        </httpModules>
        <httpHandlers>
            <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
        </httpHandlers>
        <httpRuntime maxRequestLength="1024000" executionTimeout="36000"/>
        <!-- Settings for Implementing Ajax Ends here-->
        <!-- Added from Yet Another Forum Begins here -->
        <!--trace enabled="true" pageOutput="true"/-->
        <!--  <xhtmlConformance mode="Legacy"/> -->
        <!-- Added from Yet Another Forum End here -->
 
    </system.web>
</configuration>



Manish
Top achievements
Rank 1
 asked on 19 Sep 2012
1 answer
114 views
Hello,

I have a data table which has 4 columns. They are Names,Date,Convey,NonConvey.
I have used

RadChart1.DataGroupColumn =

 

"name"

 

RadChart1.DataManager.ValuesYColumns =

 

New String() {"convey"}
RadChart1.PlotArea.XAxis.DataLabelsColumn = "Grouping_Name"
This works fine.
I would like to add NonConvey column to the chart  also as as Secondary Y axis but the same grouping as 'name'. Is this possible?

My Data table is attached with this.
Many Thanks for your help.

Kind Regards
Sunitha

 

Evgenia
Telerik team
 answered on 19 Sep 2012
1 answer
462 views
Hi,

I have a requirement to load the grid data partially and load more data when user chooses to scroll down without pagination.

( Something like we have in facebook)

Not sure if this is technically called as lazy loading or loading on demand. Is it possible to have this feature enabled using radgrid?

Regards,
Jay
Eyup
Telerik team
 answered on 19 Sep 2012
1 answer
147 views
Hi all,
i am working on telerik radeditor, i want to make copy paste event with strip formatting,
i implement webpart of telerik rad editor, use StripFormattingOnPaste event to format the copy text, i use
<telerik:RadEditor runat="server" ID="RadEditor1" Height="515" StripFormattingOnPaste="MsWord,Font,Span,Css,ConvertWordLists" ToolsFile="/_wpresources/RadEditorSharePoint/ToolMenu.xml">
 </telerik:RadEditor>

using this it edit all the text with css, fonts,scripts, ms word tags, also span....but it not remove all span from copy contain.

following is HTML format after Paste Text in editor but still one span is reaming..

<h1><a name="_Toc335312925">1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Heading&nbsp; 1</a></h1>
<h2><a name="_Toc335312926">1.1&nbsp;&nbsp; Heading 2</a> </h2>
<p><b>Bold</b><b> </b></p>
<p><i>Italic</i></p>
<p><span style="text-decoration: underline;">Underline</span></p>
<p><sub>Sub</sub>script </p>
<p><sup>Super</sup>script</p>
<ol>
    <li>Ordered List 1</li>
    <li>Ordered List 2</li>
    <li>Ordered List 3</li>
</ol>
<p>&nbsp;</p>
<ul>
    <li>Unordered List 1</li>
    <li>Unordered List 2</li>
</ul>
Unordered List 3
Rumen
Telerik team
 answered on 19 Sep 2012
5 answers
108 views
I create a custom RadFilterDataFieldEditor. I know if the type is string, the expression will auto add two qutoe such as [Filed] = 'aaaa'. Is there a way to remove qutoe in expression such as [Filed] = aaaa?
Andrey
Telerik team
 answered on 19 Sep 2012
4 answers
147 views
I have a treeview with data that can become quite long.  also if you double click a node I am opening a radwindow with additional data for the node.  Is there a way to open the radwindow over the location in the treeview?  Currently it is always at the top.
thanks.
regina
Top achievements
Rank 1
 answered on 19 Sep 2012
5 answers
533 views
Hi,

I am looking for help to display context menu at my grid button (left mouse click). I have created a grid and added a GridButtonColumn as below

<

telerik:GridButtonColumn ImageUrl="../img/gearsbluebtn.png" ButtonCssClass="selectbtn" ButtonType="ImageButton" CommandName="Select" CommandArgument="event" HeaderText="Select" UniqueName="Select" >

 

Then i have added following java script codes to display context menu at grid button click. This java script codes are being called at OnRowContextMenu="RowContextMenu" . Context menu is being displayed but on right mouse click at grid button. i want to display it at left mouse click . If i call context menu at any other event then eventArgs.get_domEvent(); is not available to display grid.

 

 function RowContextMenu(sender, eventArgs) {

var menu = $find("<%=RadMenu1.ClientID %>");

 var evt = eventArgs.get_domEvent();

 

if (evt.target.tagName == "INPUT" || evt.target.tagName == "A") {

 menu.show(evt);

evt.cancelBubble = true;

 evt.returnValue = false;

  

if (evt.stopPropagation) {

 evt.stopPropagation();

evt.preventDefault();

}

}

}

Any one please help???

john81
Top achievements
Rank 1
 answered on 19 Sep 2012
4 answers
82 views
Im trying to replicate this demo into my application: DEMO. I succeeded at creating a RadWindow popping up when double-click on a hierarchical RadGrid row. The problem is all RadWindow properties im defining into the <telerik:RadWindow> tag seem to be ignored. In fact, im getting the exact same results with the two following alternate declaration of my RadWindow (the second is same than first..and none of the OnClientX methods are fired):
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
                            <Windows>
                                <telerik:RadWindow ID="RadWindow1" runat="server"
                                      Width="310px" Left="150px" />
                            </Windows>
</telerik:RadWindowManager>
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
                            <Windows>
                                <telerik:RadWindow ID="RadWindow1" runat="server" Title="Reply" Height="320px"
                                    Width="910px" Left="150px" ReloadOnShow="true" ShowContentDuringLoad="false"
                                    Modal="true" OnClientBeforeClose="OnClientBeforeClose" OnClientClose="OnClientClose"/>
                            </Windows>
</telerik:RadWindowManager>


here's the rest of the related code:
                        <telerik:RadGrid ID="RadGrid5" runat="server" Width="99.7%" PageSize="20" AllowPaging="false"
                            AllowSorting="True" AllowFilteringByColumn="false" AllowMultiRowSelection="false"
                            ShowGroupPanel="false" GridLines="None" ShowFooter="false" ShowHeader="true" GroupingEnabled="false"
                            Skin="WebBlue" EnableHeaderContextAggregatesMenu="false" EnableHeaderContextMenu ="false"
                            AutoGenerateColumns="false" EnableViewState="True"
                            OnItemCommand="RadGrid5_OnItemCommand" OnDetailTableDataBind="RadGrid5_DetailTableDataBind" OnNeedDataSource="RadGrid5_NeedDataSource"
                            OnGroupsChanging="RadGrid5_OnGroupsChanging" OnColumnsReorder="RadGrid5_OnColumnsReorder" OnItemDataBound="RadGrid5_OnItemDataBound"
                            OnPreRender="RadGrid5_PreRender">
                             
                            <MasterTableView HierarchyLoadMode="ServerBind" Name="Master"
                             CommandItemDisplay="Top" CommandItemSettings-ShowAddNewRecordButton="false"
                             CommandItemSettings-ShowExportToExcelButton="true" CommandItemSettings-ShowExportToWordButton="true"
                             CommandItemSettings-ShowExportToPdfButton="true" CommandItemSettings-ShowExportToCsvButton="true" AllowMultiColumnSorting="true"
                             Caption="" ClientDataKeyNames="intEnterpriseSiteCommentID">
                             
 
                                 <Columns>
                                        <telerik:GridBoundColumn Visible="false" DataField="intEnterpriseSiteCommentID" UniqueName="intEnterpriseSiteCommentID">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridTemplateColumn Visible="false" HeaderText="PSG" meta:resourcekey="labPSG" UniqueName="blnIsInternalOnly" HeaderStyle-Width="4%" Resizable="true" Reorderable="true" SortExpression="blnIsInternalOnly">
                                            <ItemTemplate>
                                                <asp:Image runat="server" ID="ImageLogo" ToolTip="PSG Only" meta:resourcekey="labPSGOnly" AlternateText="" ImageUrl="~/Images/Icons/logo small.PNG" Height="20px" Width="20px" BorderWidth="0"></asp:Image>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                         
                                        <telerik:GridDateTimeColumn DataField="dtCreationDate" HeaderText="Date" meta:resourcekey="labDate" UniqueName="dtCreationDate" HeaderStyle-Width="12%" Resizable="true" Reorderable="true" SortExpression="dtCreationDate" DataFormatString="{0:yyyy-MM-dd HH:mm}">
                                        </telerik:GridDateTimeColumn>
                                        <telerik:GridBoundColumn DataField="strUserDisplayName" HeaderText="By" meta:resourcekey="labBy" UniqueName="strUserDisplayName" HeaderStyle-Width="16%" Resizable="true" Reorderable="true" SortExpression="strUserDisplayName">
                                            
                                        </telerik:GridBoundColumn>
 
                                        <telerik:GridBoundColumn DataField="strComment" HeaderText="Comment" meta:resourcekey="labComment" UniqueName="strComment" HeaderStyle-Width="51%" Resizable="true" Reorderable="true" SortExpression="strComment">
                                          
                                        </telerik:GridBoundColumn>
 
                                        <telerik:GridTemplateColumn HeaderText="Status" meta:resourcekey="labStatus" UniqueName="colStatus" HeaderStyle-Width="5%" Resizable="true" Reorderable="true" SortExpression="blnIsSomeoneNeedingAttention">
                                            <ItemTemplate>
                                                <asp:Image runat="server" ID="ImageAttention" Visible="false" ToolTip="Needs Attention" meta:resourcekey="imgNeedsAttention" AlternateText="" ImageUrl="~/Images/Icons/important.png" Height="20px" Width="20px" BorderWidth="0" CssClass="CommentStatusImage"></asp:Image>
                                                <asp:Image runat="server" ID="ImageTreated" Visible="false" ToolTip="Treated" meta:resourcekey="imgTreated" AlternateText="" ImageUrl="~/Images/Icons/treated.png" Height="20px" Width="20px" BorderWidth="0" CssClass="CommentStatusImage"></asp:Image>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
 
                                        <telerik:GridDateTimeColumn DataField="dtLastReplyDate" HeaderText="Last Reply" meta:resourcekey="labLastReply" UniqueName="dtLastReplyDate" HeaderStyle-Width="12%" Resizable="true" Reorderable="true" SortExpression="dtLastReplyDate" DataFormatString="{0:yyyy-MM-dd HH:mm}">
                                        </telerik:GridDateTimeColumn>
 
                                         
                                  </Columns
 
                                        <DetailTables>
                                            <telerik:GridTableView ShowHeader="true" Name="Detail" AllowSorting="false" ClientDataKeyNames="intEnterpriseSiteCommentID"> <%--HeaderStyle-CssClass="NestedGridHeader"--%>
                                              
                                                <Columns>
                                                    <telerik:GridBoundColumn Visible="false" DataField="intEnterpriseSiteCommentID" UniqueName="intEnterpriseSiteCommentID">
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridTemplateColumn Visible="false" HeaderText="PSG" meta:resourcekey="labPSG" UniqueName="blnIsInternalOnly" HeaderStyle-Width="4%" Resizable="true" Reorderable="true" SortExpression="blnIsInternalOnly">
                                                        <ItemTemplate>
                                                            <asp:Image runat="server" ID="ImageLogo" ToolTip="PSG Only" meta:resourcekey="labPSGOnly" AlternateText="" ImageUrl="~/Images/Icons/logo small.PNG" Height="20px" Width="20px" BorderWidth="0"></asp:Image>
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>
 
                                                    <telerik:GridDateTimeColumn DataField="dtCreationDate" HeaderText="Date" meta:resourcekey="labDate" UniqueName="dtCreationDate" HeaderStyle-Width="12%" Resizable="true" Reorderable="true" SortExpression="dtCreationDate" DataFormatString="{0:yyyy-MM-dd HH:mm}">
                                                    </telerik:GridDateTimeColumn>
 
                                                    <telerik:GridBoundColumn DataField="strUserDisplayName" HeaderText="By" meta:resourcekey="labBy" UniqueName="strUserDisplayName" HeaderStyle-Width="16%" Resizable="true" Reorderable="true" SortExpression="strUserDisplayName">
                                                       
                                                    </telerik:GridBoundColumn>
 
                                                    <telerik:GridBoundColumn DataField="strComment" HeaderText="Reply" meta:resourcekey="labHTReply" UniqueName="strComment" HeaderStyle-Width="63%" Resizable="true" Reorderable="true" SortExpression="strComment">
                                                   
                                                    </telerik:GridBoundColumn>
 
                                                    <telerik:GridTemplateColumn HeaderText="Status" meta:resourcekey="labStatus" UniqueName="colStatus" HeaderStyle-Width="5%" Resizable="true" Reorderable="true" SortExpression="blnIsSomeoneNeedingAttention">
                                                        <ItemTemplate>
                                                            <asp:Image runat="server" ID="ImageAttention" Visible="false" ToolTip="Needs Attention" meta:resourcekey="imgNeedsAttention" AlternateText="" ImageUrl="~/Images/Icons/important.png" Height="20px" Width="20px" BorderWidth="0" CssClass="CommentStatusImage"></asp:Image>
                                                            <asp:Image runat="server" ID="ImageTreated" Visible="false" ToolTip="Treated" meta:resourcekey="imgTreated" AlternateText="" ImageUrl="~/Images/Icons/treated.png" Height="20px" Width="20px" BorderWidth="0" CssClass="CommentStatusImage"></asp:Image>
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>
                                                </Columns>  
                                            </telerik:GridTableView>
                                        </DetailTables>
 
                            </MasterTableView>
 
                            <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
 
                                    <ClientSettings EnablePostBackOnRowClick="false" AllowRowsDragDrop="false" AllowDragToGroup="false" AllowColumnsReorder="false" ReorderColumnsOnClient="false" ColumnsReorderMethod="Reorder">
                                        <Resizing AllowRowResize="False" EnableRealTimeResize="True" ResizeGridOnColumnResize="false" AllowColumnResize="true" AllowResizeToFit="true"/>
                                        <Animation AllowColumnReorderAnimation="false" AllowColumnRevertAnimation="true" />
                                        <Selecting AllowRowSelect="true"  />
                                        <ClientEvents  OnRowDblClick="ShowWindow" ></ClientEvents>
                                    </ClientSettings>
                                    <SortingSettings SortedBackColor="Azure" EnableSkinSortStyles="false" />
 
                           <GroupingSettings ShowUnGroupButton="true" />
 
</telerik:RadGrid>

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
 
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
                    <script type="text/javascript">
                        function ShowWindow() {
                            window.radopen("Test.aspx", "RadWindow1");
                        }
                    </script>
      </telerik:RadCodeBlock>

Can someone please spot what is wrong in my code?

TIA
Martin Roussel
Top achievements
Rank 1
 answered on 19 Sep 2012
1 answer
43 views
Hi,

The issue is if the result set is too big & user closes the popup window (which has RadGrid to display result set).
The system hangs. User clicks no longer works anywhere on the parent page.

I tried setting RadScriptManager's  EnablePageMethods to true. But seems it doesnt call the server side web method.

How can I tackle this situation?

Thanks
Andrey
Telerik team
 answered on 19 Sep 2012
1 answer
84 views
I have a page with a RadWindow manager; when  ShowOnTopWhenMaximized is set to true.
I open Page1.aspx in a new radwindow using client-side script.
Then maximize this window with Page1 in it.

On page1, I have a link to open another modal radwindow (using javascript and the same radwindowManager)
When the modal window opens, you can't see it because it is behind the maximized radwindow.


If ShowOnTopWhenMaximized is set to false, the modal window opens in front of the maximized window correctly.

I mean, I understand that "ShowOnTopWhenMaximized" means "Show On Top When Maximized"...and it's true...if property is set to true, the maximized window stays on top no matter what....

But don't you think "modal" should take precedent over "maximized"?


Marin Bratanov
Telerik team
 answered on 19 Sep 2012
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
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
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?