Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
82 views
Hi,I have radeditor  with editor drop down which is dynamically filled ..on its click i am showing value on radeditor.Its working fine in chrome .however, its not working as expected in internet explorer.please do needful as my further work is getting postponed.


below is my code

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EmailEditortest.aspx.cs"
    Inherits="RPM.EmailEditortest" %>

<%@ 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>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
        <telerik:RadEditor runat="server" ID="RadEditor1" SkinID="DefaultSetOfTools" Font-Names="Tahoma"
            Font-Size="12px" Height="500px" OnClientLoad="RadEditorLoad" OnClientCommandExecuting="OnClientCommandExecuting">
            <ImageManager ViewPaths="~/Editor/Img/UserDir/Marketing,~/Editor/Img/UserDir/PublicRelations"
                UploadPaths="~/Editor/Img/UserDir/Marketing,~/Editor/Img/UserDir/PublicRelations"
                DeletePaths="~/Editor/Img/UserDir/Marketing,~/Editor/Img/UserDir/PublicRelations">
            </ImageManager>
        </telerik:RadEditor>
    </div>
    </form>
</body>
<script type="text/javascript">

    function RadEditorLoad(editor, eventArgs) {

        // Set the Editor Default Font to Arial

        editor.get_contentArea().style.fontFamily = 'Tahoma'
        editor.get_contentArea().style.fontSize = 12 + 'px';
    }

    function OnClientCommandExecuting(editor, args) {
        debugger;
        var name = args.get_name();
        var val = args.get_value();

        if (name == "emailFields") {
            editor.pasteHtml(val);
            //Cancel the further execution of the command as such a command does not exist in the editor command list
            args.set_cancel(true);
        }
    }
</script>
</html>

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;

namespace RPM
{
    public partial class EmailEditortest : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            EditorToolGroup dynamicToolbar = new EditorToolGroup();
            RadEditor1.Tools.Add(dynamicToolbar);

            EditorTool fndReplace = new EditorTool("FindAndReplace");
            EditorSeparator fSp = new EditorSeparator();
            EditorTool undo = new EditorTool("Undo");
            EditorTool redo = new EditorTool("Redo");
            EditorTool cut = new EditorTool("Cut");
            EditorTool copy = new EditorTool("Copy");
            EditorTool paste = new EditorTool("Paste");
            EditorTool bold = new EditorTool("Bold");
            EditorTool italic = new EditorTool("Italic");
            EditorTool underLine = new EditorTool("Underline");
            EditorTool ajxSplCheck = new EditorTool("AjaxSpellCheck");
            EditorSeparator jSp = new EditorSeparator();
            EditorTool justifyLeft = new EditorTool("JustifyLeft");
            EditorTool justifyCenter = new EditorTool("JustifyCenter");
            EditorTool justifyRight = new EditorTool("JustifyRight");
            EditorSeparator clSp = new EditorSeparator();
            EditorTool foreColor = new EditorTool("ForeColor");
            EditorTool backColor = new EditorTool("BackColor");
            EditorTool imageManager = new EditorTool("ImageManager");
            EditorTool documentManager = new EditorTool("DocumentManager");
            EditorTool linkManager = new EditorTool("LinkManager");
            EditorTool fontFamily = new EditorTool("FontName");
            EditorTool fontSize = new EditorTool("RealFontSize");
            EditorTool insertTable = new EditorTool("InsertTable");



            dynamicToolbar.Tools.Add(fndReplace);
            dynamicToolbar.Tools.Add(fSp);//seperator
            dynamicToolbar.Tools.Add(undo);
            dynamicToolbar.Tools.Add(redo);
            dynamicToolbar.Tools.Add(cut);
            dynamicToolbar.Tools.Add(copy);
            dynamicToolbar.Tools.Add(paste);
            dynamicToolbar.Tools.Add(bold);
            dynamicToolbar.Tools.Add(italic);
            dynamicToolbar.Tools.Add(underLine);
            dynamicToolbar.Tools.Add(ajxSplCheck);
            dynamicToolbar.Tools.Add(jSp);//seperator
            dynamicToolbar.Tools.Add(justifyLeft);
            dynamicToolbar.Tools.Add(justifyCenter);
            dynamicToolbar.Tools.Add(justifyRight);
            dynamicToolbar.Tools.Add(clSp);//seperator
            dynamicToolbar.Tools.Add(foreColor);
            dynamicToolbar.Tools.Add(backColor);
            dynamicToolbar.Tools.Add(imageManager);
            dynamicToolbar.Tools.Add(documentManager);
            dynamicToolbar.Tools.Add(linkManager);
            dynamicToolbar.Tools.Add(insertTable);
            dynamicToolbar.Tools.Add(fontFamily);
            dynamicToolbar.Tools.Add(fontSize);





            EditorDropDown ddn = new EditorDropDown("emailFields");
            ddn.Text = "Place Holder";

            ddn.Items.Add("parimal", "<%Parimal%>");
            ddn.Items.Add("sanjay", "<%sanjay%>");
            ddn.Items.Add("imran", "<%imran%>");
            ddn.Items.Add("parimal", "<%Parimal%>");
            dynamicToolbar.Tools.Add(ddn);
            
        }
    }
}

Rumen
Telerik team
 answered on 06 Feb 2013
15 answers
582 views


Sir,

I want to get a preview on asp:image control of the files selected through rad upload.

i tried the below code,but still it is not working

<

script type="text/javascript">

function

myOnClientFileSelect(radUpload, eventArgs)

{

var img = document.getElementById('<%= Image1.ClientID %>');

img.src=eventArgs.FileInputField.value;}

</

script>


<

asp:Image ID="Image1" runat="server" Height="112px" Style="z-index: 103; left: 472px;

position: absolute; top: 208px"

Width="136px" />

<

telerik:RadUpload ID="RadUpload1" runat="server" Style="z-index: 100; left: 112px;

position: absolute; top: 136px"

OnClientFileSelected="myOnClientFileSelect" AllowedFileExtensions=".bmp,.jpeg,.jpg,.gif" ControlObjectsVisibility="All" InitialFileInputsCount="2" MaxFileInputsCount="1000" MaxFileSize="100000000" TargetFolder="~/File" OnFileExists="RadUpload1_FileExists" />

<telerik:RadProgressArea ID="RadProgressArea1" runat="server" Style="z-index: 101;

left: 120px; position: absolute; top: 232px">

</telerik:RadProgressArea>

<telerik:RadProgressManager ID="RadProgressManager1" runat="server" Style="z-index: 102;

left: 104px; position: absolute; top: 184px"

/>


Thank you

Plamen
Telerik team
 answered on 06 Feb 2013
4 answers
166 views
I have my RadFileExplorer working great, but how can I exclude specifics from the list? 

I use RadFileExplorer.Configuration.SearchPatterns to find jpegs and RadFileExplorer.Configuration.ViewPaths to display the correct folder of jpegs (which I then display in RadImageEditor upon a click from the user), but within the correct folder there is an additional folder that I do not want to be shown in the RadFileExplorer. It's a backup folder, and there's no need for the end-user to see it along with the rest of the jpegs, I only want the user to see the jpegs. Is there a way that I can exclude the folder from showing up? Thanks.
Vessy
Telerik team
 answered on 06 Feb 2013
1 answer
123 views
Good Morning,

I just downloaded the ASP.NET AJAX toolkit so I could start testing the AsyncUpload functionality.  Sorry for the long post but I'm trying to determine if the AsyncUpload control will be better than the control we are currently using.

Currently we have an upload control from another vendor that allows us to do the same functionality as the AsyncUpload but their support is lacking in helping us figure out an issue we're having.  I've chosen to evaluate the AsyncUpload controls to see if it will work better in our environment.

Currently our environment is a mixture of Windows XP and Windows 7 (almost all 32-bit). We have a few IE7 browsers out there but most are at least IE8 and silverlight has been pushed out to as many of our workstations as we could.  Our application is written in ASP.Net with VB.Net as the code-behind that we use and our server is running IIS6.

We have a website that allows our staff to upload multiple images at a single time.  Once they've been uploaded a server-side event fires and imports the files into our EDMS for long term storage.  Our problem is that due to the amount of load on our EDMS sometimes the server-side events take a while (up to 6-7 seconds per file) and eventually we run into an issue with the IE setting for ReceiveTimeout.  Once the client goes past the ReceiveTimeout setting our upload process starts getting errors because the client is now disconnected from the server-side.

In an effort to avoide the ReceiveTimeout related errors, we'd like to send an update from the server-side back to the client letting it know that it has finished processing a file.  We expect that because the client receives a response from the server that it would reset the ReceiveTimeout timer and our app would not have the timing issues we currently are having.

Do you know if the AsyncUpload control works within an UpdatePanel control?  Also, is there a way that the server-side Completed event can send an update back to the client-side so it knows it got a response?  If these can be done, and I can prove that it works, we will consider purchasing the ASP.Net AJAX tools just for the AsyncUpload controls.

Again, sorry for the long post, I'm just trying to determine if this control will work to help us resolve our current issue.

Thanks,

Josh
Plamen
Telerik team
 answered on 06 Feb 2013
1 answer
257 views
I have RadNotification working well with a web service providing the content of the Notificaiton using

     notification.update();

     notification.show();

when I want to show the Notification.

I want to clear the Notificaiton content each time the user clicks on the Notification Close button.

I've had a hard time getting it to clear on both the client and the server without side effects.  I have it sort of working now, but the notification flashes on loading the page.

I'm sure there is a simple, clean way to do this, but I haven't been able to figure it out -- after spending a lot of time and searching both the Telerik website and using Google.

Thanks,

Donald

 

 

Marin Bratanov
Telerik team
 answered on 06 Feb 2013
4 answers
286 views
I would like to use the following example but with datatables. I am customizing an existing app and the way they handle the data is only thru datatables.

Long story short, I can't figure out how to get this to work using DT. Any help would be appreciated.

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/selectedvalue/defaultcs.aspx

Thank you.
Steve
Top achievements
Rank 2
 answered on 06 Feb 2013
6 answers
214 views
Hi Everyone.

VB.net AJAX Q2 2012.

I have a line graph with several data points flowing left to right.  I used the OnCleintSeriesClicked Property and wrote:

function Chart_Line_Count_SeriesClicked(sender,args)

{

if (args.get_seriesName() != "DaysL") $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest(args.get_category());

}

Then through the RadAjaxManager1 configuration I associated the RadAjaxManager1 with the Chart_Line_Count Object.

Then in the code behind file:

Protected Sub RadAjaxManager1_AjaxRequest(sender As Object, e As AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest

  

'test to clear datasource and blank out the chart

 Chart_Line_Count.DataSource = ""

 Chart_Line_Count.DataSourceID = ""

 

End Sub

But it doesn't work.  Can anyone tell me why?  I see the AJAX circular spinning refresh thing fire, but nothing happens.  Please let me know if you need any more information. 

Logan Marshall
Top achievements
Rank 2
Iron
 answered on 06 Feb 2013
2 answers
96 views
I have a situation that I wonder if anyone can suggest or point me to a solution that solves my problem.
I want to display the radcombobox so the user can select a date, which will return a set of records from a database.
The problem is that the grid does have any datasource until then and therefore does not display.
The combobox is in a commanditem template and does not display.  Would it be better to load the grid with dummy records(all zeros and nulls) or is there a better solution.
I just need to display the radcombobox.  Any suggestions will be appreciated.  The HTML is below.
<
telerik:RadGrid ID="TimesheetGrid" runat="server" AutoGenerateColumns="false" EnableLinqExpressions="false" GridLines="None">
        <MasterTableView CommandItemDisplay="Top" AllowPaging="false" PageSize="15">
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
            </EditFormSettings>
            <CommandItemTemplate>
                <table>
                    <tr>
                        <td style="width:10%">                          
                            <telerik:RadComboBox ID="cboPayPeriod" runat="server" AutoPostBack="true" OnSelectedIndexChanged="cboPayPeriod_SelectedIndexChanged"></telerik:RadComboBox>
                        </td>
                        <td style="width:40%">
                            <asp:LinkButton ID="cmdInsert" runat="server" CommandName="InitInsert" Font-Underline="True" ForeColor="White">Insert New Timesheets Record</asp:LinkButton>
                        </td>
                        <td style="width:30%">
                            <asp:LinkButton ID="cmdUpdateAll" runat="server" CommandName="UpdateEdited" Font-Underline="True" ForeColor="White">Update Timesheet</asp:LinkButton>
                        </td>
                    </tr>
                </table>
            </CommandItemTemplate>
            <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
            <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
            <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
            <Columns>
                <telerik:GridDateTimeColumn DataField="WorkDate" HeaderText="Work Date" UniqueName="WorkDate" DataFormatString="{0:MM/dd/yy}"
                    HeaderStyle-Width="100px" HeaderStyle-HorizontalAlign="Center" AllowFiltering="false">
                </telerik:GridDateTimeColumn>
                <telerik:GridBoundColumn DataField="Shift" HeaderText="Shift" ItemStyle-Width="25px" HeaderStyle-Width="25px" AllowFiltering="False"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Reg" HeaderText="Reg" ItemStyle-Width="35px" AllowSorting="True" AllowFiltering="False" DataFormatString="{0:##.0}"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ShftHrs" HeaderText="Shift Hrs" ItemStyle-Width="35px" AllowSorting="True" AllowFiltering="False" DataFormatString="{0:##.0}"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="OT" HeaderText="OT" ItemStyle-Width="35px" AllowFiltering="False" DataFormatString="{0:##.0}"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Vac36" HeaderText="Vac 36 Hrs" ItemStyle-Width="35px" AllowFiltering="False" DataFormatString="{0:##.0}"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Vac40" HeaderText="Vac 40 Hrs" ItemStyle-Width="35px" AllowFiltering="False" DataFormatString="{0:##.0}"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Vac48" HeaderText="Vac 48 Hrs" ItemStyle-Width="35px" AllowFiltering="False" DataFormatString="{0:##.0}"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Sick36" HeaderText="Sick 36 Hrs" ItemStyle-Width="35px" AllowFiltering="False" DataFormatString="{0:##.0}"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Sick40" HeaderText="Sick 40 Hrs" ItemStyle-Width="35px" AllowFiltering="False" DataFormatString="{0:##.0}"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Sick48" HeaderText="Sick 48 Hrs" ItemStyle-Width="35px" AllowFiltering="False" DataFormatString="{0:##.0}"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Exc_Absence" HeaderText="Exc Abs Hrs" ItemStyle-Width="35px" AllowFiltering="False" DataFormatString="{0:##.0}"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Holiday_Worked" HeaderText="Holiday Worked" ItemStyle-Width="35px" AllowFiltering="False" DataFormatString="{0:##.0}"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Holiday_Not_Worked" HeaderText="Holiday Not Worked" ItemStyle-Width="35px" AllowFiltering="False" DataFormatString="{0:##.0}"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Comments" HeaderText="Comment" ItemStyle-Width="135px" AllowFiltering="False"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Additional_Comment" HeaderText="Additional Comment" ItemStyle-Width="135px" AllowFiltering="False"></telerik:GridBoundColumn>
                <telerik:GridTemplateColumn DataField="Five" HeaderText="5%" AllowFiltering="false">
                    <ItemTemplate>
                        <asp:CheckBox ID="chkFive" runat="server" Checked='<%#Bind("Five")%>' />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn DataField="Ten" HeaderText="10%" AllowFiltering="false">
                    <ItemTemplate>
                        <asp:CheckBox ID="chkTen" runat="server" Checked='<%#Bind("Ten")%>' />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
Chuck Harrington
Top achievements
Rank 1
 answered on 06 Feb 2013
2 answers
124 views
Hi have a grid with paging on it. I want it to be resized (including the pager) whenever I resize the form or change the pager size/index.
I have the following code:
<telerik:RadCodeBlock runat="server" ID="MainScriptBlock">
        <script type="text/javascript">
            window.$ = $telerik.$;
 
            jQuery.event.add(window, "load", resize);
            jQuery.event.add(window, "resize", resize);
 
            function resize() {
                var h = $(window).height();
                $(".resizeGrid").css({ 'height': (h - 60) });
            }
        </script>
    </telerik:RadCodeBlock>

1. The grid loads ok the first time it is loaded i.e. the grid + pager are aligned to the footer.
2. When I change the pager size to say 20 from 50. The grid + pager moves up and is no longer aligned to the footer.
3. Same thing happens when I change the page index.
3. If I resize the form, the pager moves down and aligns itself with the footer (which is what I want)

How do I fix the above behavior in step 2 and 3 above so that the grid resizes each time?
Kostadin
Telerik team
 answered on 06 Feb 2013
1 answer
173 views
Hi .
I have a RadGrid in my form that bind to a webservice . I have a radhtmlchart too . I want to update my chart after update my grid ,but radhtmlchart does not have any client side databiding .

how can I do that ? 
Marin Bratanov
Telerik team
 answered on 06 Feb 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?