Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
122 views
I have a problem regarding grid item command event .It is not firing  after  a radbutton whose cause validation is true and this rad button is in Modalpopoup which will be visible after  clicking a link in grid item-template .I  used  a required field validator in modalpopup.
This is my .aspx code
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RadGRid.aspx.cs" Inherits="patientportal_RadGRid"  EnableEventValidation="true" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .modalBackground
        {
            background-color: Gray;
            filter: alpha(opacity=70);
            opacity: 0.7;
        }
        .RadGrid th input
        {
            margin-top: 0;
            margin-bottom: 0;
            height: 12px;
        }
        .modal-inner-wrapper
        {
            width: 340px;
            height: 340px;
            background-color: White;
        }
        
        .modal-inner-wrapper .content
        {
            width: 320px;
            height: 320px;
            background-color: White;
            border: solid 1px Gray;
            z-index: 9999;
            float: right;
            margin-top: 10px;
            margin-right: 10px;
        }
        
        .modal-inner-wrapper .content .close
        {
            float: right;
        }
        
        .modal-inner-wrapper .content .body
        {
            margin-top: 20px;
        }
        
        .rounded-corners
        {
            /*FOR OTHER MAJOR BROWSERS*/
            -moz-border-radius: 5px;
            -webkit-border-radius: 5px;
            -khtml-border-radius: 5px;
            border-radius: 5px; /*FOR IE*/
            behavior: url(border-radius.htc);
        }
        
        .rel
        {
            position: relative;
            z-index: inherit;
            zoom: 1; /* For IE6 */
        }
        
        .modal-bg
        {
            background-color: Gray;
            filter: alpha(opacity=50);
            opacity: 0.6;
            z-index: 999;
        }
        
        .modal
        {
            position: absolute;
        }
    </style>
    <script language="javascript" type="text/javascript">
        function ModalreplyDopostback(evt) {

            __doPostBack('LinkButton1', '');

        }


        function delete_click() {
            var result;
            result = confirm('Are you sure you want to delete this record?');
            return result;
        }


    </script>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
    </telerik:RadStyleSheetManager>
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
    <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadScriptManager1">
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadGrid2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid2" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <div>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Office2007" />
        <telerik:RadGrid GridLines="None" ID="RadGrid2" AllowMultiRowSelection="True" Style="border: 0"
            runat="server" AllowPaging="True" PagerStyle-Position="Bottom" AllowSorting="True"
            Skin="Office2007" PageSize="3" Width="865px" ShowGroupPanel="True" ShowFooter="true"
            AllowAutomaticDeletes="True" PagerStyle-AlwaysVisible="true" EnableLinqExpressions="False"
            OnItemDataBound="RadGrid2_ItemDataBound" OnPageIndexChanged="RadGrid2_PageIndexChanged"
            OnPageSizeChanged="RadGrid2_PageSizeChanged" OnItemDeleted="RadGrid2_ItemDeleted"
            OnNeedDataSource="RadGrid2_NeedDataSource" OnItemCommand="RadGrid2_ItemCommand">
            <MasterTableView AutoGenerateColumns="False" DataKeyNames="Id,MailID" AllowMultiColumnSorting="true"
                DataMember="">
                <GroupByExpressions>
                    <telerik:GridGroupByExpression>
                        <SelectFields>
                            <telerik:GridGroupByField FieldAlias="Subject" FieldName="Subject" FormatString=""
                                HeaderValueSeparator=":"></telerik:GridGroupByField>
                        </SelectFields>
                        <GroupByFields>
                            <telerik:GridGroupByField SortOrder="Descending" FieldName="ID" FormatString="" HeaderText="Subject">
                            </telerik:GridGroupByField>
                        </GroupByFields>
                    </telerik:GridGroupByExpression>
                </GroupByExpressions>
                <PagerStyle Visible="true" />
                <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
                <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridClientSelectColumn UniqueName="SelectColumn">
                        <HeaderStyle Width="30px" />
                    </telerik:GridClientSelectColumn>
                    <telerik:GridBoundColumn DataField="Readstatus" SortExpression="Readstatus" UniqueName="Readstatus"
                        HeaderStyle-HorizontalAlign="Center" HeaderImageUrl="~/gridimages/emailMessage.png"
                        ItemStyle-HorizontalAlign="Center">
                        <HeaderStyle HorizontalAlign="Center" Width="30px"></HeaderStyle>
                        <ItemStyle Width="30px" Height="22px" HorizontalAlign="Center" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="FromID" HeaderText="From" SortExpression="FromID"
                        UniqueName="FromID">
                        <HeaderStyle Width="150px" HorizontalAlign="Center" />
                        <ItemStyle Wrap="false" Width="150px" HorizontalAlign="Center" />
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn HeaderText="Received">
                        <HeaderStyle Width="150px" HorizontalAlign="Center" />
                        <ItemStyle Width="150px" HorizontalAlign="Center" />
                        <ItemTemplate>
                            <asp:Label ID="lbldatetime" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"Received") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="TemplateColumn2" GroupByExpression="From Group By From"
                        SortExpression="From" HeaderText="Subject">
                        <ItemStyle Height="35px"></ItemStyle>
                        <ItemTemplate>
                            <%--     Webmail Subject LinkButton --%>
                            <asp:LinkButton ID="lnksub" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"Subject") %>'
                                CommandName="viewmsg" CausesValidation="false" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"Id") %>'>
                            </asp:LinkButton>
                            <%-- modal PopUp panel--%>
                            <asp:Panel ID="Panelmsg" runat="server">
                                <div id="divmsginfo" style="width: 600px; float: left; display: none;" runat="server">
                                    <table style="background-repeat: no-repeat; border-color: White; background-color: White;
                                        color: Black; text-align: left; font-family: Verdana, Geneva, sans-serif;" width="600"
                                        align="center" cellpadding="0" cellspacing="0" border="0">
                                        <tr style="height: 70px; width: 550px;">
                                            <td style="height: 69px; width: 549px;">
                                                <fieldset>
                                                    <%--<legend><%# DataBinder.Eval(Container.DataItem,"Name") %> :--%>
                                                    <asp:Label ID="lblsubject" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"Subject") %>' />
                                                    </legend>
                                                    <%# DataBinder.Eval(Container.DataItem ,"Content")%>
                                                </fieldset>
                                            </td>
                                        </tr>
                                        <tr style="height: 20px; width: 550px;">
                                            <td style="height: 20px; width: 549px;">
                                                <telerik:RadButton ID="lnkok" runat="server" Text="Okay" CausesValidation="False"
                                                    ButtonType="StandardButton" AutoPostBack="true" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"Id") %>'
                                                    CommandName="vwmsg">
                                                </telerik:RadButton>
                                            </td>
                                        </tr>
                                        <tr style="height: 10px; width: 550px;">
                                            <td style="height: 10px; width: 549px;">
                                            </td>
                                        </tr>
                                        <tr style="height: 70px; width: 550px;">
                                            <td style="height: 70px; width: 549px;">
                                                <fieldset>
                                                    <legend>Reply</legend>
                                                    <table cellpadding="0" cellspacing="0" border="0">
                                                        <tr>
                                                            <td>
                                                                <%--<div id="divreply" runat="server" style="vertical-align: text-top;">--%>
                                                                    <asp:TextBox ID="txtreplymsg" runat="server" Height="60px" Width="150px" BackColor="White"
                                                                        TextMode="MultiLine"  AutoPostBack="true"  ValidationGroup="2" />
                                                                    <asp:RequiredFieldValidator ID="rfvreplymsg" runat="server" ValidationGroup="2" ControlToValidate="txtreplymsg"><img src="../image/reqerrorimg.png" alt="error" />Reply field is empty</asp:RequiredFieldValidator>
                                                                <%--</div>--%>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                          
                                                                <asp:Button ID="radbtnreply" runat="server"  Text="Reply"  AutoPostBack="true"  UseSubmitBehavior="true"
                                                                    CommandArgument='<%# DataBinder.Eval(Container.DataItem,"FromId") %>' CausesValidation="true"
                                                                    ValidationGroup="2"  CommandName="replymsg">
                                                                </asp:Button>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </fieldset>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </asp:Panel>
                            <asp:ModalPopupExtender ID="modpopextmsg" runat="server" X="300" Y="200" PopupControlID="divmsginfo"
                                BackgroundCssClass="modalBackground" TargetControlID="lnksub" PopupDragHandleControlID="Panelmsg">
                            </asp:ModalPopupExtender>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn>
                        <HeaderStyle Width="30px" HorizontalAlign="Center" />
                        <ItemStyle Width="30px" HorizontalAlign="Center" />
                        <ItemTemplate>
                            <asp:ImageButton ID="imgbtndelete" runat="server" ImageUrl="../image/DeleteIcon.png"
                                CommandName="virtualdel" CommandArgument='<%#  DataBinder.Eval(Container.DataItem,"Id") %>'
                                OnClientClick="return delete_click();" />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
                <EditFormSettings>
                    <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                    </EditColumn>
                </EditFormSettings>
            </MasterTableView>
            <ClientSettings AllowColumnsReorder="True">
                <Selecting AllowRowSelect="True" />
            </ClientSettings>
            <FilterMenu EnableImageSprites="False">
            </FilterMenu>
            <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
            </HeaderContextMenu>
        </telerik:RadGrid>
      
    </div>
    <div>
    </div>
    </form>
</body>
</html>


And my Itemcommand_event code  is

 protected void RadGrid2_ItemCommand(object sender, GridCommandEventArgs e)
    {

       

        if (e.CommandName == "replymsg")
        {
            // Grid Find control
            GridEditableItem item = (GridEditableItem)e.Item;
            int mailnoId = Convert.ToInt32(item.GetDataKeyValue("Id").ToString());
            int mainmsgid = Convert.ToInt32(item.GetDataKeyValue("MailID").ToString());
            ModalPopupExtender modpopext = (ModalPopupExtender)item.FindControl("modpopextmsg");
            TextBox txtmessage = (TextBox)item.FindControl("txtreplymsg");
            Label msgsubject = (Label)item.FindControl("lblsubject");
            TextBox txtmsgcontent = (TextBox)e.Item.FindControl("txtreplymsg");
            string fromid = Convert.ToString(e.CommandArgument);
            // reply operation with  readstatus flag update

            string receivertoid = "1020";
            string messagesubject = msgsubject.Text.Trim();
            string msgcontent = txtmessage.Text;

            replyMessage(mainmsgid, receivertoid, fromid, msgcontent, messagesubject);
            //sendingMsg(mainmsgid, receivertoid, fromid, txtmessage.Text.Trim());
            modpopext.Hide();
            //changemsgstatus(mailnoId);
            radgridbind2();
        }
    }

  
Iana Tsolova
Telerik team
 answered on 25 Feb 2011
3 answers
104 views
What are the available args/options for the OnClientSubmit FormatStripper (ie: WORD, WORD_NO_FONTS, etc).  I can find no documentation on these.
Rumen
Telerik team
 answered on 25 Feb 2011
5 answers
169 views

Hi,


I'm creating a control dynamically with a lot of child controls (ex dropdownlists).

DropDownListControl ddlControl = (DropDownListControl)this.LoadControl("FormControls/DropDownListControl.ascx");  
ddlControl.ID = "ddlControl_" + groupTable.Rows.Count + "_" + columnIndex;  
RadAjaxManager.GetCurrent(Page).AjaxSettings.AddAjaxSetting(this, ddlControl); 

With that last sentence I thougth the update the dynamic created dropdownlists if the parent usercontrol (this) was changed.

When I run this code and change the parent usercontrol he gives me the following exception:
Microsoft JScript runtime error: Sys.InvalidOperationException: Could not find UpdatePanel with ID 'ctl00_ddlControl_1_0Panel'. If it is being updated dynamically then it must be inside another UpdatePanel.

Can anyone tell me how I have to solve this without losing the creation of the dynamic child controls?

Thanks
Bert

Ade
Top achievements
Rank 1
 answered on 25 Feb 2011
2 answers
89 views
Hey Telerik

I have big problems using my Entity datasource with my TreeView.
Everything is shown just fine, but can't get OnNodeClick event to fire.

Please advise !!

Thanks
Jan

<telerik:RadTreeView runat="Server" ID="BookGroupTreeView" DataFieldID="Hierarchy_id"
    DataFieldParentID="Parent_Hierarchy_id" DataTextField="Name" DataValueField="Hierarchy_id"
    Skin="Vista" EnableTheming="True" RegisterWithScriptManager="true" OnNodeClick="BookGroupTreeView_NodeClick">
</telerik:RadTreeView>

protected void Page_Load(object sender, EventArgs e)
 {
     List<DB.Hierarchy> bookHierarchy = new List<DB.Hierarchy>();
     bookHierarchy = DB.HierarchyService.HierarchyFullListFromParentPath("Root");
 
     BookGroupTreeView.DataSource = bookHierarchy;
     BookGroupTreeView.DataBind();
     BookGroupTreeView.ExpandAllNodes();
 }
Lone
Top achievements
Rank 1
 answered on 25 Feb 2011
3 answers
402 views
I created my page and add a control RadAsyncUpload to post a picture, everythingworks perfectly in development, totally perfect, but when I post on my hosting does not work

select the photo and then fails, all settings are fine, and apply security permissions,and lists web.config settings, I find to do! what configuration should I

In my hosting no found, in localhost yes! 

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!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">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1">
    </telerik:RadScriptManager>
    <asp:UpdatePanel runat="server" ID="UpdatePanel1">
        <ContentTemplate>
            <telerik:RadSplitter runat="server" ID="RadSplitter1">
                <telerik:RadPane runat="server" ID="Pane1">
                    <telerik:RadAsyncUpload ID="radUpload1" runat="server" MaxFileInputsCount="1" InitialFileInputsCount="1"
                        Localization-Select="Browse" Width="300px">
                    </telerik:RadAsyncUpload>
                </telerik:RadPane>
            </telerik:RadSplitter>
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>
</html>

This is web.config

<?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>
    <configSections>
        <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
            <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                    <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
                    <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                </sectionGroup>
            </sectionGroup>
        </sectionGroup>
    </configSections>
  <appSettings>
    <add key="AllowCustomProgress" value="false"/>
  </appSettings>
    <connectionStrings/>
    <system.web>
        <!--
            Set compilation debug="true" to insert debugging
            symbols into the compiled page. Because this
            affects performance, set this value to true only
            during development.
        -->
        <!--
            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.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></assemblies>
        </compilation>
        <!--
            The <authentication> section enables configuration
            of the security authentication mode used by
            ASP.NET to identify an incoming user.
        -->
        <!--
            The <authentication> section enables configuration
            of the security authentication mode used by
            ASP.NET to identify an incoming user.
        -->
        <authentication mode="None"/>
        <!--
            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="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
        <pages>
            <controls>
                <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/>
            </controls>
        </pages>
        <httpRuntime maxRequestLength="1024000" executionTimeout="4800"/>
        <!--
            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="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
 
        <httpHandlers>
            <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
            <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/>
            <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false"/>
        </httpHandlers>
        <httpModules>
            <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <!--<add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule"/>-->
        </httpModules>
    </system.web>
    <system.codedom>
        <compilers>
            <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
                <providerOption name="CompilerVersion" value="v3.5"/>
                <providerOption name="WarnAsError" value="false"/>
            </compiler>
            <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
                <providerOption name="CompilerVersion" value="v3.5"/>
                <providerOption name="OptionInfer" value="true"/>
                <providerOption name="WarnAsError" value="false"/>
            </compiler>
        </compilers>
    </system.codedom>
    <!--
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services 7.0.  It is not necessary for previous version of IIS.
    -->
    <system.webServer>
        <security>
            <requestFiltering>
                <requestLimits maxAllowedContentLength="">
                </requestLimits></requestFiltering>
        </security>
        <validation validateIntegratedModeConfiguration="false"/>
        <modules>
            <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" preCondition="integratedMode"/>
        </modules>
        <handlers>
            <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode"/>
            <add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode"/>
        </handlers>
    </system.webServer>
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
            </dependentAssembly>
        </assemblyBinding>
    </runtime>
 
  <location path="Telerik.Web.UI.WebResource.axd">
    <system.web>
      <authorization>
        <allow users="*" />
      </authorization>
    </system.web>
  </location>
</configuration>


Genady Sergeev
Telerik team
 answered on 25 Feb 2011
2 answers
261 views
Can someone post how to remove all items from a RadListBox?  This below code in the cs file doesn't work.

 

foreach (RadListBoxItem item in RadListBox1.Items)

 

 {

 

    item.Remove();

 

    //RadListBox1.Items.Remove(item);

}

My (hopefully temporary) workaround for this is that I create an empty DataSet and rebind that to the RadListBox.

Mathew
Top achievements
Rank 1
 answered on 25 Feb 2011
2 answers
84 views
We're using the Grid_RowDrop EventHandler to perform a few operations after a row is dropped from one grid to another. The only issue we've run into is that we need to dynamically change some text outside of the two grids after the drop occurs. One possible way to do this would be with some Javascript, but while it's easy to call Javascript before the drop finishes with OnRowDropping and OnRowDropped, I can't find a way to call Javascript after the Grid_RowDrop EventHandler completes. If there's a way to do this, it would be great to know.

On the other hand, if it's better to update this text from within the Grid_RowDrop EventHandler itself by putting the text in a control (RadAjaxPanel maybe?), that would work too. We'd appreciate some advice either way on the best solution to this problem. Thanks.
Mike
Top achievements
Rank 1
 answered on 25 Feb 2011
3 answers
107 views
Hello,

Can you drag and drop values of 1 cell to another cell in the same row using the grid?

Any help appreciated.  Thanks in advance.
Pavlina
Telerik team
 answered on 25 Feb 2011
3 answers
131 views

Hello,

I have a chart that display a series of data across a date range.  There are 24 data points per day.  Sometimes we are displaying 30 days, sometimes we are displaying many more days. Obviously this is to many labels to display.  I would liket there to always be about 30 labels no matter how many days worth of data I am sidplaying.  I understand the only way to do this is by using the LabelStep property. I would like to set the label step property at runtime based on the number of data points that are in the chart.

I add the labels through the PlotArea.XAxis.AddRange method.  The series is bound to the SQL datasource.  In the chart_ItemDataBound event I get the number of datapoints and try to set the LabelStep property as shown below.  However, no matter what I try the labelstep property that I set at runtime is not used and rather is uses the value set as designtime.

 

private void chart_ItemDataBound(object sender, EventArgs e)
{
    //get handles 
    Telerik.Reporting.Processing.Chart ProcessingChart = (Telerik.Reporting.Processing.Chart)sender;
    Telerik.Reporting.Chart ChartDefinition = (Telerik.Reporting.Chart)ProcessingChart.ItemDefinition;
  
    //get the number of datapoints
    int iDataPoints = ChartDefinition.Series[0].Items.Count;
  
    if (iDataPoints > 0)
                      
        //setting the labelstep on chart defination object from the processing chart
        ChartDefinition.PlotArea.XAxis.LabelStep = iDataPoints / 30;
                  
        //also have tried setting setting the labelstep on actual chart object
        chart.PlotArea.XAxis.LabelStep = iDataPoints / 30;
      
}

Why is the chart not using the labelstep property that I set at runtime?

Thanks,

Chris
Giuseppe
Telerik team
 answered on 25 Feb 2011
2 answers
164 views
I searched but couldn't find an answer, so I'm hoping someone can point me in the right direction. 

If I have a grid with 5 columns:

Client Name
Fees 1
Fees 2
Discount
Percentage

Discount is the difference between Fees1 and Fees2 (Fees1 - Fees2). Percentage is Fees1/Fees2. The grid has aggregates for the Fees 1 column, Fees 2 column, and Discount column (these are all Sums). Doing a Sum or Average on the Percentage column will not give me the right number...what I need to do is take the Sum(Fees1)/Sum(Fees2) to get the Average Percentage...

So, is there a way to show an aggregate value for a column (the Average Percentage) that is calculated from the aggregates of other columns? 

Thanks
Tye
Tye
Top achievements
Rank 1
 answered on 25 Feb 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?