Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
58 views
Hi,

The response from the Telerik on the Ticket Id = 457125 is not resolved our Overlapping and Bold issues on the RadGrid.
Please provide any other solution to resolve this issues.

Thanks,
Ramalingaiah
Tsvetina
Telerik team
 answered on 12 Oct 2011
1 answer
78 views
i have rad combo box inside telerik rad window and i can not see combo box choices if the page direction is (right to left)
Princy
Top achievements
Rank 2
 answered on 12 Oct 2011
1 answer
281 views
Hello:   
   I am trying to create a hierarchical view using a tree view such that
the parent nodes are the region names and the child nodes are the country names
I have the below set up and SQL query.
 I am not getting the desired behavour, what is wrong with the below set up?

<
asp:Panel runat="server" ID="Panel1" Style="float: left; width: 373px; border-right: 1px solid #B1D8EB;">
        <telerik:RadTreeView ID="RadTreeView1" runat="server" CheckBoxes="True"
            TriStateCheckBoxes="true" CheckChildNodes="true" DataFieldID="CountryID"
            DataSourceID="SqlDataSource1"
            DataTextField="Country" DataValueField="Country"
            DataFieldParentID="RegionID" >
        </telerik:RadTreeView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server"
            ConnectionString="<%$ ConnectionStrings:xxxxxx %>" SelectCommand="SELECT CC.cty_name_formal as Country,CR.CountryID AS CountryID,Region as Region,RR.RegionID as RegionID
                         FROM COUNTRYDB.countrydb.dbo.vw_iso_cty AS CC
                         INNER JOIN dbo.OMBC_CountryRegion AS CR
                         ON CC.ISO_code = CR.ISOCODE
                         INNER JOIN dbo.OMBC_Region RR
                         ON CR.RegionID=RR.RegionID
                         ORDER BY RR.RegionID">
        </asp:SqlDataSource>
        </asp:Panel>

Thanks

Shinu
Top achievements
Rank 2
 answered on 12 Oct 2011
1 answer
72 views
HI ALL DEVELOPERS..!!

My QUESTION: I am dragging  nodes from rad treeview  and i am able to place it into the radgrid as a column and in rad grid group panel also...! 
But my Requirment is when i place the dragged node to Radgrid Group panel the node should be placed in radgrid group panel only and grouped accordingly.. ...AND If i drag the node to radgrid the node should be added a s a column to radgrid..
WHAT i am trying to say, how can we diffrentiate drag to "radgrid group panel" and "drag to radgrid"..??

any simple code regarding this will be appreciated..

Thanks Telerik Team.
Kiran
KIRAN RAJ
Top achievements
Rank 1
 answered on 12 Oct 2011
3 answers
101 views
Hi, I want to export my radgrid content to excel ,and I'm using function : ExportToExcel() ,
the problem is: I have some field which is type of bit. After export the place where should be bit value I see blank space. How can i repair it ?

and the 2nd question , how to set good size of column in excel (something like autoGrow).

regards
Shinu
Top achievements
Rank 2
 answered on 12 Oct 2011
3 answers
754 views
Hi,

I am new to RAD controls. I have VS 2008, .NET 3.5 and installed the trial version of Telerik RAD controls for ASPNET AJAX Q1 2009. Per the Help documents I created a new .NET/C# Web project, added Script Manager to the default web page and trying to add RAD Tree View control. I am getting this error message:

Error Creating Control - RadTreeView1

Failed to create designer 'Telerik.Web.UI.RadTreeView, Telerik.Web.UI, Version=2009.1.402.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4'

I have added references to Telerik.Web.UI.dll and Telerik.Web.Design.dll

Am I missing something? Please help. Thanx.

Biplab
Top achievements
Rank 1
 answered on 12 Oct 2011
6 answers
184 views

Geting the error: "The selected folder could not be created because the application did not have enough permissions. Please contact the administrator"

This happens when I call createNewDirectory. I have looked around the forums for a soultion but nothing seems to work. How can I troubleshoot this. It doesn't seem to be permissions from what I have checked.

I tried this and it worked fine, meaning the code Fiko asks to run works fone:

http://www.telerik.com/community/forums/aspnet-ajax/file-explorer/cannot-create-folder-can-do-everything-else.aspx

Here is my simple test code, and I have full access on the server and the account used also has full permissions. I have used sysinternals procmon anbd I do not even see a denial of access, how can I trouble shoot this:

<%@ 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>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
 
</head>
 
 
<body>
 
<telerik:RadScriptBlock ID="RadScriptBlock" runat="server">
 
 
</telerik:RadScriptBlock>
    <form id="form1" runat="server">
   
    <div>
            <script type="text/javascript" language="javascript">
             
                function GetName() {
                    var MyFM = $find('<%= RadFileExplorer1.ClientID %>');
                    MyFM.createNewDirectory("/Test", "556477");
                    alert("test");
                }
</script>
        <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
        </telerik:RadScriptManager>
 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        </telerik:RadAjaxManager>
        <telerik:RadFileExplorer ID="RadFileExplorer1" Runat="server"
            InitialPath="~/Test/" EnableCreateNewFolder="true" OnClientItemSelected="GetName"  >
<Configuration SearchPatterns="*.*" ViewPaths="~/Test/" UploadPaths="~/Test/" DeletePaths="~/Test/" ></Configuration>
        </telerik:RadFileExplorer>
 
<asp:Button runat="server" ID="btnClick" onclientclick="GetName" Width="94px"></asp:Button>
    </div>
 
    </form>
</body>
</html>


James Campbell
Top achievements
Rank 1
 answered on 12 Oct 2011
1 answer
68 views
Hi,

I have a problem in ie where after maximizing the window and the trying to close it, the window returns to its original size and poistion and loses the close and maximize buttons?

The window loads a web page after selecting an option from a context menu, no issue in Firefox or Chrome.

Error below
Line: 2359
Error: 'sender._popupBehavior' is null or not an object

Thanks
Darren

 

<telerik:RadWindowManager ID="RadWindowManager" runat="server" OnClientClose="RadWindowManager_RadWindowClosing" 
  OnClientBeforeClose="RadWindowManager_BeforeClose" OnClientCommand="OnClientCommand" 
  OnClientResizeStart="OnClientStart" OnClientDragStart="OnClientStart" OnClientResizeEnd="OnClientEnd" 
  OnClientDragEnd="OnClientEnd" >
  <Windows>
     <telerik:RadWindow ID="LornRadWindow" runat="server"  Title="LORN" ShowContentDuringLoad="false"/>
     <telerik:RadWindow ID="ToolboxesRadWindow" runat="server" Title="Toolboxes" ShowContentDuringLoad="false"/>
     <telerik:RadWindow ID="WestOnePcRadWindow" runat="server" Title="WestOne Product Catalog" ShowContentDuringLoad="false"/>
  </telerik:RadWindowManager>

<telerik:RadScriptBlock ID="RadScriptBlock" runat="server">
        <script type="text/javascript">
            Telerik.Web.UI.RadWindowManager.prototype.cascade = function () {
                var radWindowArray = this._getWindowsSortedByZindex();
                var first = true;
                var top = 0;
                var left = 0;
  
                for (var i = 0; i < radWindowArray.length; i++) {
                    var radWindow = radWindowArray[i];
  
                    if (radWindow.isVisible() && !radWindow.isClosed()) {
                        if (first) {
                            //-- Store the location of the first window (all child windows will be cascaded from this location).
                            var bounds = radWindow.getWindowBounds();
                            left = bounds.x;
                            top = bounds.y;
                            first = false;
                        }
                        else {
                            //-- Offset the child window.
                            top += 30;
                            left += 30;
                            radWindow.moveTo(left, top);
                        }
                    }
                }
            };
  
            var lastOpenWindow;
            function RadWindowManager_RadWindowClosing() {
                // IE issue with auto focus on windows - only occurs with ASRI windows - set focus to student text box.
                // Limit other unknown issues by just fixing windows with issue.
                // for more information. - relates to system incident 38832
                if($telerik.isIE8 || $telerik.isIE7) {
                    if (lastOpenWindow == "MaintainAppointmentsRadWindow" || lastOpenWindow == "TrainingContractAppointmentsRadWindow" || lastOpenWindow == "ShowAppointmentsRadWindow" || lastOpenWindow == "ShowPAMeetingsRadWindow" || lastOpenWindow == "StudentResultsRadWindow") {
                        var oManager = GetRadWindowManager();
                        if (oManager) {
                            var oWindow = oManager.GetActiveWindow();
                            if (!oWindow) {
                                var textBoxes = document.getElementsByTagName("input");
                                if (textBoxes) {
                                    for (var tb = 0; tb < textBoxes.length; tb++) {
                                        try {
                                            textBoxes(tb).focus();
                                            break;
                                        }
                                        catch(er)
                                        {
                                            continue;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
  
            function RadWindowManager_BeforeClose() {
                if ($telerik.isIE8 || $telerik.isIE7) {
                    var oManager = GetRadWindowManager();
                    if (oManager) {
                        var oWindow = oManager.GetActiveWindow();
                        if (oWindow) {
                            lastOpenWindow = oWindow.get_name();
                        }
                    }
                }
            }
  
            // IMPORTANT - DO NOT REMOVE OR CHANGE THE FUNCTIONS BELOW
            //             THE FUNCTIONS ARE USED AS A WORKAROUND FOR RADWINDOWS THAT CONTAIN <OBJECT> TAGS E.G. SILVERLIGHT APPS
            //             IT STOPS THE SILVERLIGHT APP FROM RELOADING WHEN THE PAGE IS MOVED OR RESIZED. 
            ///            THIS WORKAROUND WAS PROVIDED BY TELERIK IN RESPONSE TO A SUPPORT REQUEST
  
            function OnClientCommand(sender, args) {
                args.set_cancel(true);
                sender._popupBehavior._manageVisibility = false;
  
                args.set_cancel(false);
                setTimeout(function () {
                    sender._popupBehavior._manageVisibility = true;
                }, 200);
            }
            function OnClientStart(sender, args) {
                sender._popupBehavior._manageVisibility = false;
            }
            function OnClientEnd(sender, args) {
                setTimeout(function () {
                    sender._popupBehavior._manageVisibility = true;
                }, 200);
            }
  
            Telerik.Web.UI.RadWindow.prototype._enablePageScrolling = function () {
            }
        </script>
    </telerik:RadScriptBlock>

Darren
Top achievements
Rank 1
 answered on 12 Oct 2011
2 answers
256 views
Hi,
I want to change the layout of the fieldset of a Listview during the ItemDataBound event.
In particular, my need is to have different back colours for each item i have, based on the text of a specific label in the fieldset.

I.e. If the text of the label is "Red" i will setthe backcolor of the Fieldset red.

Here my ListView.

Thanks in advance
Matteo


            <telerik:RadListView ID="RADLIST_Calendario" runat="server"   
                DataSourceID="SDS_DettaglioCalendario" AllowPaging="True"  
                DataKeyNames="ChampionshipMatchID"
                <LayoutTemplate> 
                    <div> 
                        <div ID="itemPlaceholder" runat="server"></div> 
                        <telerik:RadDataPager ID="RadDataPager1" runat="server"
                            <Fields> 
                                <telerik:RadDataPagerSliderField /> 
                            </Fields> 
                        </telerik:RadDataPager> 
                    </div> 
                </LayoutTemplate> 
                <ItemTemplate>         
                    <fieldset style="margin: 0px; padding: 0px;">             
                        <legend><%# Eval("Name")%></legend
                            <table cellpadding="0" cellspacing="0" width="800" border="0"
 
                            ...                          
                                   
                            </table>                 
                    </fieldset> 
                </ItemTemplate> 
                <EmptyDataTemplate> 
                    <div class="RadListView RadListView_Default"
                        <div class="rlvEmpty"
                            There are no items to be displayed.</div> 
                    </div> 
                </EmptyDataTemplate> 
                <SelectedItemTemplate> 
                    <div class="rlvISel"
                    </div> 
                </SelectedItemTemplate>                 
            </telerik:RadListView> 
 


prat
Top achievements
Rank 1
 answered on 12 Oct 2011
1 answer
165 views
Hi,

I have a RadGrid with a GridAttachmentColumn. I created a test page and everything is working fine locally.

When I publish to a remote server, everything appears ok (attachments are retrieved, displayed and downloadable) but when I click "Add New Record" and click the file upload browse button, nothing happens. No script or server error, no UI response, nothing.

What can be going wrong?

Here's some code showing what I have. It works fine debugging using VS2010 built-in web server. I've necessarilly had to cut some of the code out.

Master Page
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="SiteMaster.Master.cs" Inherits="MyNamespace.MyMasterPages.SiteMaster" %>
<%@ 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 id="Header" runat="server" lang="en-au">
    <title>Test</title>
    <asp:ContentPlaceHolder ID="HeadContentPlaceHolder" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form id="MainForm" runat="server">
  
        <telerik:RadScriptManager ID="TelerikScriptManager" runat="server">
            <CompositeScript>
                <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
            </CompositeScript>
        </telerik:RadScriptManager>
  
        <asp:ContentPlaceHolder ID="ScriptContentPlaceHolder" runat="server">
        </asp:ContentPlaceHolder>
  
        <telerik:RadAjaxManager ID="TelerikAjaxManager" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="MainUpdatePanel">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="MainUpdatePanel" LoadingPanelID="TelerikAjaxLoadingPanel" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
  
        <telerik:RadWindowManager ID="TelerikWindowManager" runat="server">
        </telerik:RadWindowManager>
  
    <telerik:RadSkinManager ID="TelerikSkinManager" Runat="server" Skin="Telerik">
        </telerik:RadSkinManager>
  
        <telerik:RadFormDecorator ID="TelerikFormDecorator" Runat="server" Skin="Telerik" DecoratedControls="All" />
  
        <telerik:RadAjaxPanel ID="MainUpdatePanel" runat="server">
  
            <asp:ContentPlaceHolder ID="MainContentPlaceHolder" runat="server">
            </asp:ContentPlaceHolder>
  
        </telerik:RadAjaxPanel>
  
        <telerik:RadAjaxLoadingPanel ID="TelerikAjaxLoadingPanel" runat="server">
        </telerik:RadAjaxLoadingPanel>
  
    </form>
</body>
</html>

Content Page
<%@ Page Title="Attachments Test" Language="C#" MasterPageFile="~/MyMasterPages/SiteMaster.Master" AutoEventWireup="true" CodeBehind="Attachments.aspx.cs" Inherits="MyNamespace.Attachments" %>
<%@ MasterType VirtualPath="~/MyMasterPages/SiteMaster.Master" %>
  
<asp:Content ID="ScriptContent" ContentPlaceHolderID="ScriptContentPlaceHolder" runat="server">
  
    <telerik:RadCodeBlock ID="TelerikCodeBlock" runat="server">
    <script type="text/javascript">
    function ConditionalPostback(sender, args)
    {
        var eventTarget = args.get_eventTarget();
  
        if (eventTarget == "<%=this.AttachmentsGrid.UniqueID %>")
        {
            args.set_enableAjax(false);
        }
    }
  
    function GridOnCommand(sender, args)
    {
        if (args.get_commandName() == "DownloadAttachment")
        {
            var manager = $find('<%= RadAjaxManager.GetCurrent(Page).ClientID %>');
  
            manager.set_enableAJAX(false);
  
            setTimeout(function ()
            {
                manager.set_enableAJAX(true);
            }, 0);
        }
    }
    </script>
    </telerik:RadCodeBlock>
  
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
  
    <telerik:RadGrid 
        AutoGenerateColumns="False" 
        AutoGenerateDeleteColumn="True" 
        AutoGenerateEditColumn="True" 
        DataSourceID="AttachmentsDataSource" 
        ID="AttachmentsGrid" 
        OnDeleteCommand="AttachmentsGrid_OnCommand" 
        OnInsertCommand="AttachmentsGrid_OnCommand" 
        OnItemCommand="AttachmentsGrid_OnItemCommand"
        OnUpdateCommand="AttachmentsGrid_OnCommand" 
        runat="server">
        <MasterTableView 
            DataKeyNames="Id" 
            DataSourceID="AttachmentsDataSource">
            <Columns>
                <telerik:GridBoundColumn 
                    DataField="Id" 
                    DataType="System.Int32" 
                    HeaderText="Id" 
                    ReadOnly="True" 
                    UniqueName="Id">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn 
                    DataField="FileName" 
                    HeaderText="FileName" 
                    UniqueName="FileName" 
                    ReadOnly="true" 
                    DataType="System.String">
                </telerik:GridBoundColumn>
                <telerik:GridAttachmentColumn 
                    DataSourceID="AttachmentDataSource"
                    MaxFileSize="1048576" 
                    EditFormHeaderTextFormat="Upload Attachment:"
                    HeaderText="Attachment"
                    HeaderTooltip="Download Attachment"
                    AttachmentDataField="Attachment" 
                    AttachmentKeyFields="Id"
                    FileNameTextField="FileName" 
                    DataTextField="FileName"
                    UniqueName="Attachment">
                </telerik:GridAttachmentColumn>
            </Columns>
        </MasterTableView>
        <ClientSettings>
            <ClientEvents OnCommand="GridOnCommand" />
        </ClientSettings>
    </telerik:RadGrid>
  
    <asp:EntityDataSource 
        ConnectionString="name=MyEntities" 
        DefaultContainerName="MyEntities" 
        EnableFlattening="False" 
        EntitySetName="Attachments" 
        EntityTypeFilter="Attachment" 
        ID="AttachmentsDataSource" 
        runat="server">
    </asp:EntityDataSource>
  
    <asp:EntityDataSource 
        ConnectionString="name=MyEntities" 
        DefaultContainerName="MyEntities" 
        EnableFlattening="False" 
        EntitySetName="Attachments" 
        EntityTypeFilter="Attachment" 
        ID="AttachmentDataSource" 
        runat="server" 
        Where="it.[Id] = @Id"
        Select="it.[Attachment]">
        <SelectParameters>
            <asp:Parameter Name="Id" Type="Int32" />
        </SelectParameters>
    </asp:EntityDataSource>
  
</asp:Content>

Content Page Code-Behind
namespace MyNamespace
{
    using System;
    using MyMasterPages;
    using Telerik.Web.UI;
  
    public partial class Attachments : Page
    {
        protected void Page_Init(object sender, EventArgs e)
        {
            if (this.Master != null)
            {
                var ajaxManager = (RadAjaxManager)this.Master.FindControl("TelerikAjaxManager");
  
                if (ajaxManager != null)
                {
                    ajaxManager.ClientEvents.OnRequestStart += "ConditionalPostback";
                }
            }
        }
  
        protected void AttachmentsGrid_OnCommand(object sender, GridCommandEventArgs e)
        {
            var editedItem = e.Item as GridEditableItem;
  
            if (editedItem != null)
            {
                switch (e.CommandName)
                {
                    case RadGrid.PerformInsertCommandName:
                    case RadGrid.UpdateCommandName:
  
                        // Insert or Update
  
                        break;
  
                    case RadGrid.DeleteCommandName:
  
                        // Delete
  
                        break;
                }
            }
        }
  
        protected void AttachmentsGrid_OnItemCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == RadGrid.DownloadAttachmentCommandName)
            {
                e.Canceled = true;
  
                var args = e as GridDownloadAttachmentCommandEventArgs;
  
                if (args != null)
                {
                    var attachmentId = (int)args.AttachmentKeyValues["Id"];
  
                    byte[] attachment = GetAttachment();
  
                    if (attachment != null)
                    {
                        Response.Clear();
                        Response.ContentType = "application/octet-stream";
                        Response.AddHeader("content-disposition", "attachment; filename=" + args.FileName);
                        Response.BinaryWrite(attachment);
                        Response.End();
                    }
                }
            }
        }
    }
}

That's all the important stuff. Like I said, works fine locally.

Richard
Richard Weeks
Top achievements
Rank 2
 answered on 11 Oct 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?