Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
239 views
I posted to the treeView forum because I cannot find an area to post questions for the FileExplorer control.

I need to be able to remove the Disable, Rename, and New folder options in the FileExplorer control (or hide that menu all together). I pretty much need it read only. My only exception is I need users to be able to download the files. About a month ago, one of your programmers was able to supply me with the script to download the files upon clicking them so that is taken care of. Below is the existing code:

<%

@ Page Title="" Language="C#" MasterPageFile="~/Employee_MasterPage.master" AutoEventWireup="true" CodeFile="Forms.aspx.cs" Inherits="Secure_Employee_Login_Office_Staff_Area_Forms" %>

 

<%

@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

 

<

 

asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

 

</

 

asp:Content>

 

<

 

asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

 

 

 

<tr>

 

 

<td width="730">

 

 

<div align="left">

 

 

<table width="100%" border="0" cellspacing="0" cellpadding="0">

 

 

<tr>

 

 

<td width="20"></td>

 

 

<td width="675px"><font size="3" color="black"><font size="2" face="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif"><b>Note Regarding Change in Insurance Benefits:<br>

 

 

</b>Changes in employee benefits may only be done during Open Enrollment (in November with an effective date of December 1st) <u>or within 30 days of a Qualifying Event</u>. &nbsp;A Qualifying Event is defined as one of the following events:</font></font><ul>

 

 

<li><font size="3" color="black"><font size="2" face="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif">Marriage or divorce;</font></font><li><font size="3" color="black"><font size="2" face="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif">Birth/adoption of a child;</font></font><li><font size="3" color="black"><font size="2" face="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif">Dependent child ineligibility due to overage status;</font></font><li><font size="3" color="black"><font size="2" face="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif">Death of a child or spouse/domestic partner;</font></font><li><font size="3" color="black"><font size="2" face="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif">Loss of coverage through spouse/domestic partner.</font></font></ul>

 

 

<p><font size="2" color="black" face="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif">To make a change in your insurance benefits (health, vision and/or dental), please contact . &nbsp; <br>

 

 

<br>

 

 

</p> </font><script type="text/javascript">

 

 

function OnClientItemClickHandler(sender, eventArgs) {

 

window.open(eventArgs.get_path());

}

</

 

script>

 

 

<telerik:RadFileExplorer ID="RadFileExplorer1" Runat="server" Configuration-ViewPaths="~/secure/employee_login/doctors_area/forms_download" OnClientItemClick="OnClientItemClickHandler" >

 

<

 

Configuration SearchPatterns="*.*" viewpaths="~/secure/employee_login/doctors_area/forms_download"></Configuration>

 

 

</telerik:RadFileExplorer>

 

 

<p>

 

 

</p>

 

 

</td><td width="20"></td></table>

 

 

</asp:Content>

 

Rumen
Telerik team
 answered on 09 Feb 2009
1 answer
103 views
HI,

i am using Hierarchical grid with custum filtering.
the problem i am facing is something like this:

when i filter something in the grid and server returns the results the grid is not re-painted properly with the search results although the results returned are correct. when i use rebind method then in that case it paints the results properly but then the drill down button is throwing problem i.e.
"Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.  "

please tell me how to get out of this hassle. i have seen all the example given on your web site but could not find anything related to my scenrio.

here is the code for the code behind:

 

public partial class BookRunOffBank : ViewPage

 

{

 

public AjaxOptions options = new AjaxOptions();

 

 

protected void Page_Load(object sender, EventArgs e)

 

{

options.UpdateTargetId =

"page";

 

RadGrid1.PagerStyle.Position =

GridPagerPosition.TopAndBottom;

 

RadGrid1.MasterTableView.DataSource = ViewData[

"Companies"];

 

 

 

 

//////
//if i remove this method then drill down works but filter results are not painted...
//////
if
(this.IsPostBack)

 

RadGrid1.Rebind();

 

}

 

 

protected void RadGrid1_DetailTableDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e)

 

{

 

GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;

 

e.DetailTableView.DataSource = ViewData[

"CompanyBookRunOff"];

 

}

 

}

looking for your reply very soon.

thanks.

 

Georgi Krustev
Telerik team
 answered on 09 Feb 2009
3 answers
116 views
hi
in tabstrip by autopostback and clickedtab enabled
when i use radajaxmanager , tab selected not change on click :

    <form id="form1" runat="server">  
    <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">  
    </telerik:RadScriptManager> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"   
        DefaultLoadingPanelID="RadAjaxLoadingPanel1">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadTabStrip1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server"   
        height="75px" width="75px">  
        <img alt="Loading..."   
            src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>'   
            style="border:0px;" /> 
    </telerik:RadAjaxLoadingPanel> 
    <telerik:RadTabStrip ID="RadTabStrip1" runat="server"   
        MultiPageID="RadMultiPage1" AutoPostBack="True" ClickSelectedTab="True">  
        <Tabs> 
            <telerik:RadTab runat="server" Text="Root RadTab1">  
            </telerik:RadTab> 
            <telerik:RadTab runat="server" Text="Root RadTab2">  
            </telerik:RadTab> 
        </Tabs> 
    </telerik:RadTabStrip> 
    <telerik:RadMultiPage ID="RadMultiPage1" runat="server" Width="60%">  
        <telerik:RadPageView ID="RadPageView1" runat="server">  
            <telerik:RadColorPicker ID="RadColorPicker1" Runat="server" Preset="Standard">  
            </telerik:RadColorPicker> 
        </telerik:RadPageView> 
        <telerik:RadPageView ID="RadPageView2" runat="server">  
            <telerik:RadCalendar ID="RadCalendar1" Runat="server"   
                font-names="Arial, Verdana, Tahoma" forecolor="Black"   
                style="border-color:#ececec">  
            </telerik:RadCalendar> 
        </telerik:RadPageView> 
    </telerik:RadMultiPage> 
    </form> 
 
Paul
Telerik team
 answered on 09 Feb 2009
2 answers
132 views

Hi,
Below is my code trying to open google in the contenpane but it opens in new window instead.
what did I do wrong here?

<div id="ParentDivElement" style="height: 100%;">  
        <telerik:radsplitter id="MainSplitter" runat="server" height="100%" width="100%" 
            orientation="Horizontal" skin="Outlook">  
              
            <telerik:RadPane ID="TopPane" runat="server" Height="100" MinHeight="85" MaxHeight="150" 
                Scrolling="none">  
                <!-- Place the content of the pane here --> 
            </telerik:RadPane> 
              
            <telerik:RadSplitBar ID="RadsplitbarTop" runat="server" CollapseMode="Forward" /> 
              
            <telerik:RadPane ID="MainPane" runat="server" Scrolling="none" MinWidth="500">  
                  
                <telerik:RadSplitter ID="NestedSplitter" runat="server" Skin="Web20" LiveResize="true">  
                      
                    <telerik:RadPane ID="LeftPane" runat="server" Width="300" MinWidth="150" MaxWidth="400">  
                        <!-- Place the content of the pane here --> 
                         <href="http://google.com" target="<%= contentPane.ClientID%>">  
                        Open google.com</a> 
                    </telerik:RadPane> 
                      
                    <telerik:RadSplitBar ID="VerticalSplitBar" runat="server" CollapseMode="Forward" /> 
                      
                    <telerik:RadPane ID="ContentPane" runat="server">  
                        <!-- Place the content of the pane here --> 
                    </telerik:RadPane> 
                      
                </telerik:RadSplitter> 
                  
            </telerik:RadPane> 
        </telerik:radsplitter> 
    </div> 
Tsvetie
Telerik team
 answered on 09 Feb 2009
1 answer
145 views
Hi there guys.
I've been trying to put to work the Rad Editor with a custom dictionary. It works pretty well until I fire the spellcheking function.
I mean the page loads, but when I try to start the spellcheck process it shows an alert displaying something about not seting the dictionary path.
I've trying setting the property with the Dictionary tags but still doesn't work.
Here's the code:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="OnData.Telerik.Samples.Web.Default" %> 
 
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" 
    Namespace="System.Web.UI" TagPrefix="asp" %> 
 
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> 
 
<%@ 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>On Data Telerik Samples - Rad Editor</title>     
</head> 
<body> 
    <form id="form1" runat="server"
    <div> 
        <h1>Ejemplo Rad Editor: funcionalidades comunes.</h1> 
        <asp:ScriptManager ID="sprmgrManager" runat="server"
        </asp:ScriptManager> 
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px" Width="300px">         
                <telerik:RadEditor  
                ID="rdEditor"  
                runat="server" 
                EditModes="All" 
                ToolsFile="~/Toolbars/Tools.xml" 
            > 
                <Languages> 
                    <telerik:SpellCheckerLanguage Title="Español" Code="es-ES" /> 
                </Languages>                 
                <ImageManager MaxUploadFileSize="512000" 
                UploadPaths="~/Uploads" DeletePaths="~/Uploads" ViewPaths="~/Uploads" EnableImageEditor="true" 
                /> 
                <Content></Content
                </telerik:RadEditor> 
                <asp:Button runat="server" ID="previsualizar" Text="Previsualizar del Lado del Server" OnClick="previsualizar_Click"/><br /> 
                <input type="button" id="btnPrevisualizarCliente" onclick="ShowPreview();" value="Previsualizar del lado del Cliente"/> 
                <div runat="server" id="divPrevisualizar"
                </div>   
        <input type ="button" id="btnLimpiar" value="Limpiar Div" onclick="CerrarPopDetalle();" /> 
         
        </telerik:RadAjaxPanel> 
        </div> 
        <telerik:RadCodeBlock ID="clientDisplayCode" runat="server" > 
            <script type="text/javascript"
                function CerrarPopDetalle(){ 
                    var divEntryPreview = document.getElementById('<%=divPrevisualizar.ClientID%>');    
                    divEntryPreview.innerHTML=""
                } 
 
                function ShowPreview(){   
                    var rdEditor = $find('<%=rdEditor.ClientID%>'); 
                    var divEntryPreview = document.getElementById('<%=divPrevisualizar.ClientID%>');         
                    divEntryPreview.innerHTML =  rdEditor.get_html();    
                } 
            </script> 
        </telerik:RadCodeBlock>   
    </form> 
</body> 
</html> 
 
Here's the code behind:
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; 
 
namespace OnData.Telerik.Samples.Web 
    public partial class Default : System.Web.UI.Page 
    { 
        protected void Page_Load(object sender, EventArgs e) 
        { 
 
        } 
 
        protected void previsualizar_Click(object sender, EventArgs e) 
        { 
            divPrevisualizar.InnerHtml = rdEditor.Content; 
        } 
    } 
 
The tdf file is in the App_Data/Radspell folder (es-Es.tdf)
Rumen
Telerik team
 answered on 09 Feb 2009
9 answers
138 views
Hi iam trying to find out if grid is in edit mode on a button click which is out side the grid.

The isItemInserted() property is working fine which tells me it he grid is in insert mode but the datagridrow.ItemType always returns an error saying undefined, following the code, Please tell me if iam doing any mistake.

var grid=$find("<%=rgSynonym.ClientID%>");
        var flag = false;

        var rowCount = grid.get_masterTableView().get_dataItems().length;
        var dataItems = grid.get_masterTableView().get_dataItems()
        alert(grid.get_masterTableView().get_isItemInserted());
        if (grid.get_masterTableView().get_isItemInserted()) {
            flag = true;
        }
        for (var i = 0; i < rowCount; i++) {
            var row = dataItems[i].get_element();

            alert(row.ItemType);
            if (row.ItemType == "EditFormItem") {
                var flag = true;
                alert("grid is in edit mode");
                // Cancel the Event so that command edit mode is maintained
                break
                //your code 
            }
        }

        if (!flag) {

            alert("grid is in regular mode");

        }

Regards
Rajani

Nikolay Rusev
Telerik team
 answered on 09 Feb 2009
1 answer
107 views
I have an a user control (.ascx) that contains a default RadChart.  At runtime, based on a user selection, I want to set the properties of the default chart equal to those of a dynamically created chart.  If the code sets each property, this appears to work as expected.  Is there a simple way to assign all properties (e.g. defaultChart = createdChart)?  Or must the properties be looped through and set individually?  Examples would be greatly appreciated.
Ves
Telerik team
 answered on 09 Feb 2009
1 answer
141 views

Hi,

I am trying to set some customised colours to the chart series by using the following code:

 

baseHourSeries.Appearance.FillStyle.MainColor = System.Drawing.Color.Red;

 

baseHourSeries.Appearance.FillStyle.SecondColor = System.Drawing.Color.Red;

 

 

But it seems that the default colour scheme of the skin I am using is overriding my settings. The strange thing is some colours I set are shown, such as red and yellow, while others like blue or green are hidden away. Is there any flag or property I need to set to make my settings effective?

One more bigger question: It seems that a Chart skin is quite different from the skins of other Telerik controls. How can I disable the built-in skins and create my own customised ones?

Thank you very much for your help.

Ves
Telerik team
 answered on 09 Feb 2009
1 answer
106 views
Hi
I'm trying create procesing bar which show if page doesn't load all. Excellent example haves cocacola: http://www.coke.pl/Sklep/glowna.aspx

How do I create it ??
Isn't be complicated, enough will be show if page doesn't load all. Doesn't show currently progress. Enough show gif image.

Any suggestion ??
Sebastian
Telerik team
 answered on 09 Feb 2009
1 answer
88 views
Hi,
I have implemented combobox with autocomplete, load on demand and virtualscrolling using web service. I have also implemented setting of height of dropdown based on number of items (based on the knowledgebase article). But the problem is that everytime i search, i see big dropdown box and then it shrinks into small one. I will appreciate quick response.

Thanks!
Veselin Vasilev
Telerik team
 answered on 09 Feb 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?