Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
196 views
Hello all,

I have some problem exporting grid content to Excel.
We are using the grid in a SharePoint context, and in SharePoint list columns of type MultiText (enhanced) can be include html formatted content like tables. When I have created a html table in a so defined text field of a list item, and export the grid data to Excel, Excel will show each table row in a new Excel row, and not in the same cell. It looks like the same behavior when <br /> is used in cell content.

What can I do to let Excel render the html table rows in the same Excel cell?

Best regards,
Ralf
Daniel
Telerik team
 answered on 08 Mar 2012
3 answers
134 views
Hello Telerik, I'm using RadWindow popups on several of my pages. When my browser is IE 8 and without the compatibility mode, it seems that all the dropdowns on the page get disabled after I close a RadWindow that has been opened. When I put the browser into compatibility mode, everything works fine...but not in pure IE 8 mode. This happens on any page that the RadWindow is on.

The runtime version of the RadWindow dll is v2.0.50727
and the Version is 1.9.1.0

Please let me know how to fix this.

Thanks.
Marin Bratanov
Telerik team
 answered on 08 Mar 2012
1 answer
90 views
Greetings,

I have a Website running correctly with IE7-Mozilla but i just noticed there is a problem when i turn Internet Explorer compatibility on ( little icon on the IE adress bar ).

The errors occur only when i open a RadWindow

Basically i do it that way :

function openRadWin(idFamille) {
    radopen("Creation_Incident_Details.aspx?id=" + idFamille, "RadWindow1");
 
}

<asp:ImageButton runat="server" ID="IMGBTHextranet" ImageUrl="../Logos/EXTRANET.jpg"
    Width="160" Height="80" OnClientClick="openRadWin(); return false;" />

I don't know if it might help but Inside Creation_Incident_Details.aspx i have this:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Creation_Incident_Details.aspx.cs"
    Inherits="Extranet_Incident.Creation_Incidents.Creation_Incident_Details" %>
 
<%@ 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>
<head>
    <title></title>
    <!-- custom head section -->
    <link href="../Test/styles/Styles.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        function OnRequestStart(target, arguments) {
            if (arguments.get_eventTarget().indexOf("ButtonSend") > -1) {
                arguments.set_enableAjax(false);
            }
        }
    </script>
</head>
<body>
<form runat="server" id="Form1" method="post" enctype="multipart/form-data">
<div id="formulaire">
    <table cellpadding="1">
        <tr>
            <td>
                <asp:label id="lblTitre" runat="server" text="Titre"></asp:label>
            </td>
            <td>
                <telerik:RadTextBox ID="txtTitre" runat="server">
                </telerik:RadTextBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:label id="lblCategorie" runat="server" text="Categorie"></asp:label>
            </td>
            <td>
                <telerik:RadComboBox ID="cbCategorie" runat="server">
                </telerik:RadComboBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:label id="lblSousCategorie" runat="server" text="Sous Categorie"></asp:label>
            </td>
            <td>
                <telerik:RadComboBox ID="cbSousCategorie" runat="server">
                </telerik:RadComboBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:label id="lblProjet" runat="server" text="Projet"></asp:label>
            </td>
            <td>
                <telerik:RadComboBox ID="cbProjet" runat="server" DataTextField="nomProjet" DataValueField="idProjet">
                </telerik:RadComboBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:label id="lblDescription" runat="server" text="Description"></asp:label>
            </td>
            <td>
                <telerik:RadTextBox ID="txtDescription" runat="server" TextMode="MultiLine" Width="300"
                    Height="100">
                </telerik:RadTextBox>
            </td>
        </tr>
    </table>
    <br />
    <asp:button id="Button1" runat="server" text="Soumettre ce ticket" />
    <br />
    <br />
    <asp:hiddenfield runat="server" id="HiddenFieldIdContact" />
</div>
<%--    <telerik:Header runat="server" ID="Header1" NavigationLanguage="C#"></telerik:Header>--%>
<!-- content start -->
<telerik:RadScriptManager ID="RadScriptManager2" runat="server">
</telerik:RadScriptManager>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Style="float: left;" ClientEvents-OnRequestStart="OnRequestStart"
    LoadingPanelID="LoadingPanel1">
    <div class="uploadPanel">
        <div class="leftPanel">
            <%--                <div class="controls first">
                    <asp:Label ID="Label1" runat="server" Text="Nick: "></asp:Label>
                    <asp:TextBox ID="NickTextBox" runat="server"></asp:TextBox>
                </div>--%>
            <div class="controls">
                <asp:label id="Label2" runat="server" text="File(s): "></asp:label>
                <telerik:RadUpload ID="RadUpload1" runat="server" MaxFileInputsCount="2" OverwriteExistingFiles="false"
                    ControlObjectsVisibility="RemoveButtons">
                </telerik:RadUpload>
                <asp:button id="ButtonSend" onclick="ButtonSend_Click" runat="server" text="Save"
                    cssclass="button"></asp:button>
            </div>
        </div>
        <div class="rightPanel">
            <div id="UploadedFileLog" runat="server">
                No uploaded files yet.</div>
        </div>
    </div>
</telerik:RadAjaxPanel>
<telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server" InitialDelayTime="0" />
<!-- content end -->
<%--    <telerik:Footer runat="server" ID="Footer1" AdditionalCodeViewerFiles="~/Ajax/Examples/Common/FileUpload/ExampleFiles/Styles.css"></telerik:Footer>--%>
</form>
 
</body>
</html>

The errors i get are the following ones:

Erreur d'exécution Microsoft JScript: DOM Exception: INVALID_CHARACTER_ERR (5)
On this line ( in ScriptResource.axd)

}}else{var m=($telerik.isIE)?document.createElement("<iframe name='"+a+"'>"):document.createElement("iframe");

Unable to set property "name" value : object null or undefined

line

m.name = a

And various other errors on these lines :

m.style.width="100%";
m.style.height="100%";
m.style.border="0px";
m.frameBorder="0";
if($telerik.isIE8){m.style.display="block";
}this._iframe=m;
this._contentCell.appendChild(this._iframe);




Can anyone know how to fix this ?
Thanks in advance
Shinu
Top achievements
Rank 2
 answered on 08 Mar 2012
4 answers
111 views
Hello,

I have an Intranet web site that I can access either by specifying the web server name, i.e.

http://rsoesndmadba:8089/Default.aspx

or by specifying the web server IP address, i.e.

http://10.3.76.34:8089/Default.aspx

Both addresses are pointing to the same site. But…please see the difference between Rad alerts in both cases (see attached files showing screenshots):

 

Case 1: using http://10.3.76.34:8089/Default.aspx

The RadAlert displays correctly: ‘Ok’ button and the exclamation sign icon are correctly positioned.

 

Case 2: using http://rsoesndmadba:8089/Default.aspx

The RadAlert has now a different size and displays incorrectly: ‘Ok’ button and the exclamation sign icon are incorrectly positioned and cut-off!

Please advise.
Regards,
M.R.

Marin Bratanov
Telerik team
 answered on 08 Mar 2012
1 answer
96 views

My web page has a section containing a RadGrid control and another section containing a RadUpload control.  Initially, the RadProgress area would not display at all when I clicked the RadButton to submit, but it randomly displayed when I clicked edit or delete on the RadGrid.  I resolved this by adding client side script to the RadGrid OnCommand event to hide the progress area, and to the RadProgressManager OnClientSubmitting event to show the progress area (not sure if this was a great idea, but it's all I could make work).

Now that my progress area is displaying consistently, my problem is that none of the values are populated - current file, total progress, file count, etc. are all blank and the progress bar always displays as if 100%.    I've pasted the content of my aspx file below - it is rather lengthy, but I didn't want to omit anything.

Any suggestions would be appreciated. 

 

 

 

 

<form id="form1" runat="server">
  
  
  
  
<telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server"></telerik:RadStyleSheetManager>
  
  
  
<telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
  
  
  
<telerik:RadFormDecorator ID="RadFormDecorator1" Skin="Web20" runat="server" />
  
  
  
<div id="outer">
  
  
  
<div id="middle">
  
  
  
<div id="inner">
  
  
  
<asp:Table ID="Table2" runat="server" CellPadding="0" CellSpacing="0" Width="938px">
  
  
  
<asp:TableRow VerticalAlign="top" Height="3%" Width="100%">
  
  
  
<asp:TableCell>
  
  
  
<table class="AltBody" style="width: 100%;padding:0px;margin:0px;height:100%;font-weight:bold;">
  
  
  
<tr>
  
  
  
<td style="width: 5%; height: 30px;">
  
  
  
<img src="Images/logo2.gif" alt="tenetlogo" height="35px;" />
  
  
  
</td>
  
  
  
<td align="center" valign="middle" class="AppHeaderName" style="width: 80%;">
  
  
  
<asp:Label ID="Label1" runat="server" Width="600px" Height="25px" Text="PDR102 Documentation Editor"></asp:Label>
  
  
  
</td>
  
  
  
<td style="width: 15%; text-align: center;" valign="top">
  
  
  
<asp:LinkButton ID="btnLogout" runat="server" CausesValidation="false" OnClick="btnLogout_Click">
  
  
  
<asp:Image ID="img_logout" ImageUrl="Images/logout.png" runat="server" Width="16"
  
  
  
Height="16" />
  
  
  
Logout</asp:LinkButton>
  
  
  
</td>
  
  
  
</tr>
  
  
  
</table>
  
  
  
</asp:TableCell>
  
  
  
</asp:TableRow>
  
  
  
<asp:TableRow VerticalAlign="top" Width="100%">
  
  
  
<asp:TableCell Width="100%" CssClass="minsize">
  
  
  
<br />
  
  
  
<fieldset style="width:97%; margin-left:10px;">
  
  
  
<asp:Table ID="table3" runat="server" CellPadding="0" CellSpacing="10" Width="100%" >
  
  
  
<asp:TableRow HorizontalAlign="Center">
  
  
  
<asp:TableCell ColumnSpan="3">
  
  
  
<h3><asp:Label ID="lblTitle" runat="server" CssClass="Label" Text="Report Documentation for "></asp:Label></h3>
  
  
  
</asp:TableCell>
  
  
  
</asp:TableRow>
  
  
  
<asp:TableRow Width="100%" HorizontalAlign="Left">
  
  
  
<asp:TableCell ColumnSpan="3">
  
  
  
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false" AllowFilteringByColumn="false"
  
  
  
AllowPaging="false" AllowSorting="false" Skin="Windows7" GridLines="None"
  
  
  
OnItemCreated="RadGrid1_ItemCreated"
  
  
  
OnUpdateCommand="RadGrid1_UpdateCommand" OnNeedDataSource="RadGrid1_NeedDataSource"
  
  
  
OnDeleteCommand="RadGrid1_DeleteCommand" OnItemDataBound="RadGrid1_ItemDataBound" 
  
ShowStatusBar="true" >
  
  
  
<ClientSettings>
  
  
  
<ClientEvents OnCommand="OnCommand" />
  
  
  
</ClientSettings>
  
  
  
<MasterTableView AutoGenerateColumns="False" EditMode="InPlace" AllowFilteringByColumn="false"
  
  
  
ExpandCollapseColumn-Display="false" CommandItemDisplay="None">
  
  
  
  
<Columns>
  
  
  
<telerik:GridBoundColumn DataField="PDRDocumentLinkID" UniqueName="PDRDocumentLinkID" Visible="false">
  
  
  
</telerik:GridBoundColumn>
  
  
  
<telerik:GridTemplateColumn DataField="URL" DataType="System.String" UniqueName="URL" HeaderText="URL">
  
  
  
<EditItemTemplate>
  
  
  
<telerik:RadTextBox ID="URL" runat="server" Text='<%#Bind("URL") %>' MaxLength="250">
  
  
  
</telerik:RadTextBox>
  
  
  
<br />
  
  
  
<asp:RequiredFieldValidator ID="URLRequiredFieldValidator" runat="server" ControlToValidate="URL" 
  
ErrorMessage="URL is required" />
  
  
  
</EditItemTemplate>
  
  
  
<ItemTemplate>
  
  
  
<asp:Label ID="URLLabel" runat="server" Text='<%# Eval("URL") %>'></asp:Label>
  
  
  
</ItemTemplate>
  
  
  
</telerik:GridTemplateColumn>
  
  
  
<telerik:GridTemplateColumn DataField="URLDescription" DataType="System.String" UniqueName="URLDescription" HeaderText="URL Description">
  
  
  
<EditItemTemplate>
  
  
  
<telerik:RadTextBox ID="URLDescription" runat="server" Text='<%#Bind("URLDescription") %>' MaxLength="250">
  
  
  
</telerik:RadTextBox>
  
  
  
<br />
  
  
  
<asp:RequiredFieldValidator ID="URLDescRequiredFieldValidator" runat="server" ControlToValidate="URLDescription" 
  
ErrorMessage="URL Description is required" />
  
  
  
</EditItemTemplate>
  
  
  
<ItemTemplate>
  
  
  
<asp:Label ID="URLDescLabel" runat="server" Text='<%# Eval("URLDescription") %>'></asp:Label>
  
  
  
</ItemTemplate>
  
  
  
</telerik:GridTemplateColumn>
  
  
  
<telerik:GridTemplateColumn DataField="Description" DataType="System.String" UniqueName="Description" HeaderText="Description">
  
  
  
<EditItemTemplate>
  
  
  
<telerik:RadTextBox ID="Description" runat="server" Text='<%#Bind("Description") %>'>
  
  
  
</telerik:RadTextBox>
  
  
  
<br />
  
  
  
<asp:RequiredFieldValidator ID="DescRequiredFieldValidator" runat="server" ControlToValidate="Description" 
  
ErrorMessage="Description is required" />
  
  
  
</EditItemTemplate>
  
  
  
<ItemTemplate>
  
  
  
<asp:Label ID="DescLabel" runat="server" Text='<%# Eval("Description") %>'></asp:Label>
  
  
  
</ItemTemplate>
  
  
  
</telerik:GridTemplateColumn>
  
  
  
<telerik:GridTemplateColumn DataField="EffectiveDate" DataType="System.DateTime"
  
  
  
FilterControlAltText="Filter EffectiveDate column" HeaderText="Effective Date"
  
  
  
UniqueName="EffectiveDate">
  
  
  
<EditItemTemplate>
  
  
  
<telerik:RadDatePicker ID="EffectiveDate" runat="server" DbSelectedDate='<%#Bind("EffectiveDate") %>'>
  
  
  
</telerik:RadDatePicker>
  
  
  
<br />
  
  
  
<asp:RequiredFieldValidator ID="EffDateRequiredFieldValidator" runat="server" ControlToValidate="EffectiveDate" 
  
ErrorMessage="Effective Date is required" />
  
  
  
</EditItemTemplate>
  
  
  
<ItemTemplate>
  
  
  
<asp:Label ID="EffectiveDateLabel" runat="server" Text='<%# Eval("EffectiveDate") %>'></asp:Label>
  
  
  
</ItemTemplate>
  
  
  
</telerik:GridTemplateColumn>
  
  
  
<telerik:GridTemplateColumn DataField="Type" DataType="System.String" UniqueName="Type" HeaderText="Type">
  
  
  
<EditItemTemplate>
  
  
  
<telerik:RadTextBox ID="Type" runat="server" Text='<%#Bind("Type") %>' MaxLength="25">
  
  
  
</telerik:RadTextBox>
  
  
  
<br />
  
  
  
<asp:RequiredFieldValidator ID="TypeRequiredFieldValidator" runat="server" ControlToValidate="Type" 
  
ErrorMessage="Type is required" />
  
  
  
</EditItemTemplate>
  
  
  
<ItemTemplate>
  
  
  
<asp:Label ID="TypeLabel" runat="server" Text='<%# Eval("Type") %>'></asp:Label>
  
  
  
</ItemTemplate>
  
  
  
</telerik:GridTemplateColumn>
  
  
  
<telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
  
  
  
<ItemStyle CssClass="MyImageButton" />
  
  
  
</telerik:GridEditCommandColumn>
  
  
  
<telerik:GridButtonColumn ConfirmText="Delete this document?" ConfirmDialogType="RadWindow"
  
  
  
ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
  
  
  
UniqueName="DeleteColumn">
  
  
  
<ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
  
  
  
</telerik:GridButtonColumn>
  
  
  
</Columns>
  
  
  
<EditFormSettings>
  
  
  
<EditColumn UniqueName="EditCommandColumn1" FilterControlAltText="Filter EditCommandColumn1 column">
  
  
  
</EditColumn>
  
  
  
</EditFormSettings>
  
  
  
</MasterTableView>
  
  
  
<FilterMenu EnableImageSprites="False">
  
  
  
</FilterMenu>
  
  
  
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Windows7">
  
  
  
</HeaderContextMenu>
  
  
  
</telerik:RadGrid>
  
  
  
</asp:TableCell>
  
  
  
</asp:TableRow>
  
  
  
</asp:Table
  
</fieldset
  
</asp:TableCell>
  
  
  
</asp:TableRow>
  
  
  
<asp:TableRow VerticalAlign="top" Width="100%" Height="100%">
  
  
  
<asp:TableCell Width="100%" CssClass="minsize">
  
  
  
<br />
  
  
  
<fieldset style="width:97%; margin-left:10px; height:100%" >
  
  
  
<asp:Table ID="table1" runat="server" CellPadding="0" CellSpacing="10" >
  
  
  
<asp:TableRow HorizontalAlign="Center" Width="100%">
  
  
  
<asp:TableCell Width="20%"></asp:TableCell>
  
  
  
<asp:TableCell ColumnSpan="2" HorizontalAlign="Center">
  
  
  
<h3><asp:Label ID="lblAddDoc" runat="server" CssClass="Label">Add New Document/Link</asp:Label></h3>
  
  
  
<h6><asp:Label ID="lblInstructions" runat="server" ForeColor="#4c607a" 
  
Text="**Select a Document OR leave Document blank and enter the URL for an existing document."></asp:Label></h6>
  
  
  
</asp:TableCell>
  
  
  
</asp:TableRow>
  
  
  
<asp:TableRow Width="100%">
  
  
  
<asp:TableCell Width="20%"></asp:TableCell>
  
  
  
<asp:TableCell Width="20%">
  
  
  
<asp:Label runat="server" ID="lblUpload" Text="Document" CssClass="Label"></asp:Label>
  
  
  
</asp:TableCell>
  
  
  
<asp:TableCell Width="60%">
  
  
  
<telerik:RadProgressManager ID="RadProgressManager1" runat="server" OnClientProgressUpdating="ProgressCheck" 
  
OnClientSubmitting="OnClientSubmitting" />
  
  
  
<telerik:RadUpload ID="RadUpload1" runat="server" MaxFileInputsCount="1" 
  
OverwriteExistingFiles="true" OnClientFileSelected="CheckURL"
  
  
  
AllowedFileExtensions=".doc,.docx,.pdf,.xls,.xlsx,.txt" 
  
ControlObjectsVisibility="ClearButtons" Skin="Web20" 
  
MaxFileSize="60000000" ReadOnlyFileInputs="True" TargetFolder="~/UploadedFiles" >
  
  
  
</telerik:RadUpload>
  
  
  
</asp:TableCell>
  
  
  
</asp:TableRow>
  
  
  
<asp:TableRow Width="100%">
  
  
  
<asp:TableCell></asp:TableCell>
  
  
  
<asp:TableCell>
  
  
  
<asp:Label runat="server" ID="lblURL" Text="URL" CssClass="Label"></asp:Label>
  
  
  
</asp:TableCell>
  
  
  
<asp:TableCell>
  
  
  
<telerik:RadTextBox ID="rtbURL" runat="server" Width="400px" Skin="Web20" >
  
  
  
</telerik:RadTextBox>
  
  
  
<br />
  
  
  
<asp:CustomValidator ID="URLCustomValidator" runat="server" 
  
ClientValidationFunction="ValidateURL" EnableClientScript="true" ValidateEmptyText="true"
  
  
  
ControlToValidate="rtbURL"
  
  
  
ErrorMessage="URL is required if a Document is not selected" ForeColor="Red">
  
  
  
</asp:CustomValidator>
  
  
  
</asp:TableCell>
  
  
  
</asp:TableRow>
  
  
  
<asp:TableRow Width="100%" >
  
  
  
<asp:TableCell></asp:TableCell>
  
  
  
<asp:TableCell>
  
  
  
<asp:Label runat="server" ID="lblURLDescription" Text="URL Description" CssClass="Label"></asp:Label>
  
  
  
</asp:TableCell>
  
  
  
<asp:TableCell>
  
  
  
<telerik:RadTextBox ID="rtbURLDescription" runat="server" MaxLength="250" Width="400px" Skin="Web20" >
  
  
  
</telerik:RadTextBox>
  
  
  
<br />
  
  
  
<asp:RequiredFieldValidator ID="URLDescRequiredFieldValidator" runat="server" ControlToValidate="rtbURLDescription"
  
  
  
SetFocusOnError="true" ForeColor="red" ErrorMessage="URL Description is required"></asp:RequiredFieldValidator>
  
  
  
</asp:TableCell>
  
  
  
</asp:TableRow>
  
  
  
<asp:TableRow Width="100%" >
  
  
  
<asp:TableCell></asp:TableCell>
  
  
  
<asp:TableCell>
  
  
  
<asp:Label runat="server" ID="lblDescription" Text="Description" CssClass="Label"></asp:Label>
  
  
  
</asp:TableCell>
  
  
  
<asp:TableCell>
  
  
  
<telerik:RadTextBox ID="rtbDescription" runat="server" Width="400px" Skin="Web20" TextMode="MultiLine" Rows="2" Wrap="true">
  
  
  
</telerik:RadTextBox>
  
  
  
<br />
  
  
  
<asp:RequiredFieldValidator ID="DescriptionRequiredFieldValidator" runat="server" ControlToValidate="rtbDescription"
  
  
  
SetFocusOnError="true" ForeColor="red" ErrorMessage="Description is required"></asp:RequiredFieldValidator>
  
  
  
</asp:TableCell>
  
  
  
</asp:TableRow>
  
  
  
<asp:TableRow Width="100%" >
  
  
  
<asp:TableCell></asp:TableCell>
  
  
  
<asp:TableCell>
  
  
  
<asp:Label runat="server" ID="lblEffDate" Text="Effective Date" CssClass="Label"></asp:Label>
  
  
  
</asp:TableCell>
  
  
  
<asp:TableCell>
  
  
  
<telerik:RadDatePicker ID="rdpEffectiveDate" runat="server" Skin="Web20">
  
  
  
</telerik:RadDatePicker>
  
  
  
<br />
  
  
  
<asp:RequiredFieldValidator ID="EffDateRequiredFieldValidator" runat="server" ControlToValidate="rdpEffectiveDate" 
  
ForeColor="Red" ErrorMessage="Effective Date is required" />
  
  
  
</asp:TableCell>
  
  
  
</asp:TableRow>
  
  
  
<asp:TableRow Width="100%" >
  
  
  
<asp:TableCell></asp:TableCell>
  
  
  
<asp:TableCell>
  
  
  
<asp:Label runat="server" ID="lblType" Text="Type" CssClass="Label"></asp:Label>
  
  
  
</asp:TableCell>
  
  
  
<asp:TableCell>
  
  
  
<telerik:RadTextBox ID="rtbType" runat="server" MaxLength="25" Width="50px" Skin="Web20">
  
  
  
</telerik:RadTextBox>
  
  
  
<br />
  
  
  
<asp:RequiredFieldValidator ID="TypeRequiredFieldValidator" runat="server" ControlToValidate="rtbType"
  
  
  
SetFocusOnError="true" ForeColor="red" ErrorMessage="Type is required"></asp:RequiredFieldValidator>
  
  
  
</asp:TableCell>
  
  
  
</asp:TableRow>
  
  
  
<asp:TableRow>
  
  
  
<asp:TableCell ColumnSpan="3" HorizontalAlign="Center">
  
  
  
<telerik:RadProgressArea ID="RadProgressArea1" runat="server" 
  
DisplayCancelButton="True" 
  
ProgressIndicators="TotalProgressBar,TotalProgressPercent,RequestSize,TransferSpeed,CurrentFileName,TimeElapsed,TimeEstimated"
  
  
  
Skin="Web20" HeaderText="Upload Progress" >
  
  
  
</telerik:RadProgressArea>
  
  
  
</asp:TableCell>
  
  
  
</asp:TableRow>
  
  
  
<asp:TableRow HorizontalAlign="Center">
  
  
  
<asp:TableCell></asp:TableCell>
  
  
  
<asp:TableCell ColumnSpan="2">
  
  
  
<telerik:RadButton ID="btnSave" runat="server" Width="175px" Font-Size="Small" Skin="Web20"
  
  
  
Text="Save Document" OnClick="btnSave_Click">
  
  
  
</telerik:RadButton>
  
  
  
      
  
  
  
<telerik:RadButton ID="btnReturn" runat="server" Width="175px" Font-Size="Small"
  
  
  
Skin="Web20" Text="Select New Report" OnClick="btnReturn_Click" CausesValidation="false" UseSubmitBehavior="false">
  
  
  
</telerik:RadButton>
  
  
  
</asp:TableCell>
  
  
  
</asp:TableRow>
  
  
  
</asp:Table
  
 
  
</fieldset
  
</asp:TableCell>
  
  
  
</asp:TableRow>
  
  
  
</asp:Table>
  
</div>
  
</div>
  
</div>
  
  
  
<script type="text/javascript">
  
 
  
function OnCommand(sender, eventArgs) {
  
//Hide the RadProgressArea when grid commands are fired.
  
var progressarea = $find("<%=RadProgressArea1.ClientID %>");
  
progressarea.hide();
  
}
  
 
  
function ProgressCheck(progressManager, args) {
  
alert('progress check');
  
}
  
function ValidateURL(sender, args) {
  
//URL is required if a file has not been selected for upload.
  
  
  
var url = $find("<%= rtbURL.ClientID %>");
  
var fileInputs = $find("<%= RadUpload1.ClientID %>").getFileInputs();
  
for (var i = 0; i < fileInputs.length; i++) {
  
if (fileInputs[i].value == "" && url.get_value() == "") {
  
args.IsValid = false;
  
return;
  
}
  
}
  
args.IsValid = true;
  
}
  
 
  
function CheckURL(radUpload, eventArgs) {
  
//If a file is selected for upload, clear out the URL because it will be populated automatically.
  
  
  
var url = $find("<%= rtbURL.ClientID %>");
  
url.set_value("");
  
}
  
function OnClientSubmitting(progressManager, args) {
  
  
  
//This gets called when Save or Select New Report buttons are clicked.
  
  
  
//It clears the files to be uploaded if the Select New Report button is clicked.
  
  
  
var eventTarget = document.getElementById('__EVENTTARGET');
  
if (eventTarget.value == '<%= btnReturn.UniqueID %>') {
  
//Clear the file inputs
  
  
  
var upload = $find("<%= RadUpload1.ClientID %>");
  
var fileInputs = upload.getFileInputs();
  
for (var i = 0; fileInputs.length > i; i++) {
  
upload.clearFileInputAt(i);
  
}
  
}
  
else if (eventTarget.value == '<%= btnSave.UniqueID %>') { 
  
var progressarea = $find("<%=RadProgressArea1.ClientID %>");
  
progressarea.show();
  
}
  
}
  
 
  
</script>
  
</form>
  
  
  
</body>
  
</html>
Bozhidar
Telerik team
 answered on 08 Mar 2012
1 answer
221 views
I have tried endlessly to get my ASP page to open a RadWindow. I have tried all the examples that came with my controls, tried most (if not all) articles found on Google relating to my problem (but it's not quite the same problem), I tried hundreds of examples, walkthroughs, tutorials. Here's the source:

Master Page:

<%@ Master Language="VB" CodeFile="MasterPageAdministration.master.vb" Inherits="MasterPageAdministration" %>
<%@ 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>Site Administration</title>
    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>
 
 
    <link href="CSS/styleAppearance.css" rel="Stylesheet" type="text/css" />
    <link href="CSS/styleDefault.css" rel="Stylesheet" type="text/css" />
    <link href="CSS/styleAppearanceHelper.css" rel="Stylesheet" type="text/css" />
 
 
    <script type="text/javascript" language="JavaScript" src="js/jquery-1.2.6-vsdoc.js"></script>
    <script type="text/javascript" language="JavaScript" src="js/jquery.corners.min.js"></script>
 
 
    <script type="text/javascript">
        $(document).ready(function () {
            $('.ua1_bm1').corners("6px"); $('.ua1_bm1Inner').corners("5px");
            $('.mainct')
            .corners("5px top-left 5px top-right");
 
 
            $('.changePass').click(function () {
                var msg = $('#Pass_content');
 
 
                var height = $(window).height() - 150;
                var width = $(document).width();
                msg.css({ 'z-index': '9000', 'left': width / 2 - (msg.width() / 2), 'top': height / 2 - (msg.height() / 2) });
 
 
                msg.slideToggle("slow");
                $('#modal').css({ opacity: 0.5, 'z-index': '8000' }).slideToggle("fast");
            });
        });
 
 
        function pageLoad() {
            $('.cmdCancel').click(function () {
                $('#Pass_content').slideToggle("fast");
                $('#modal').slideToggle("fast");
                return false;
            });
        }
    </script>
</head>
<body style="background-image: url(Img/imgBackground.png); background-repeat: repeat-x; background-color: #dbffd5">
<form id="form1" runat="server">
<div>
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <%--<telerik:RadScriptManager ID="ScriptManager1" runat="server"></telerik:RadScriptManager>--%>
 
 
    <table style="margin-left: auto; margin-right: auto; background-color: #dbffd5; width: 100%;">
        <tr style="border: solid 1px #166600; background-color: #166600">
            <td>
            <div>
                <div align="center" style="padding-bottom: 15px">
                    <span style="float: left">
                        <img src="Img/imgAdminLogonHeader.png" alt="Text" />
                    </span>
                    <span style="float: right; padding-top: 5px; padding-right: 10px;">
                        <asp:Label ID="lblDomainName" runat="server" Text="" Font-Italic="false" Font-Bold="false" ForeColor="#dbffd5"></asp:Label>
                    </span>
                </div>
            </div>
            </td>
        </tr>
    </table>
    <div id="topFrameNav" class="back_Nav" style="padding-left: 1px; width: 100%">
        <telerik:RadMenu ID="RadMenu1" runat="server" Style="z-index: 1000;" Skin="Hay" EnableShadows="True">
            <Items>
                <telerik:RadMenuItem runat="server" Text="Home" NavigateUrl="SiteControlPanel.aspx"></telerik:RadMenuItem>
            </Items>
            <ExpandAnimation Type="OutElastic" />
            <CollapseAnimation Type="InElastic" />
        </telerik:RadMenu>
    </div>
 
 
    <asp:ContentPlaceHolder ID="ContentPlaceHolderMain" runat="server"></asp:ContentPlaceHolder>
 
 
    <div id="contentFrame" class="back_Content">
         
    </div>
    <div id="rightFrame"></div>
</div>
</form>
</body>
</html>

The Content Page containing the Button and RadWindow I need to use:

<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPageAdministration.master" AutoEventWireup="true" CodeFile="Events-Management.aspx.vb" Inherits="Events_Management" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <link href="CSS/styleAppearanceHelper.css" rel="Stylesheet" type="text/css" />
 
    <script type="text/javascript">
        function OpenNewEventWindow() {
//            var oWnd = $find("radWindowNewEvent");
            //            oWnd.show();
            var oWnd = radopen("Create-New-Event.aspx", "radWindowNewEvent");
        }
    </script>
</asp:Content>
 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderMain" Runat="Server">
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
        <Windows>
            <%--<telerik:RadWindow ID="radWindowNewEvent" runat="server" Height="400px" Width="600px" ReloadOnShow="true" Modal="true" Style="z-index: 9000;" Skin="Hay" NavigateUrl="Create-New-Event.aspx"></telerik:RadWindow>--%>
            <telerik:RadWindow ID="radWindowNewEvent" runat="server" OpenerElementID="btnNewEvent"></telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>
 
    <div id="maincontenttitle" class="mainCTTitle">
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="cboEventsView">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGridEvents" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
 
        <asp:Label ID="lblPageTitle" runat="server" Text="Events Management" Font-Size="Large"></asp:Label><br />
        <asp:Label ID="lblPageSubtitle" runat="server" Text="[stage]" Visible="false"></asp:Label><br /><br />
 
        <div id="mainCB" class="maincb">
            <div style="width: 100%">
                <table cellpadding="0" cellspacing="0" style="table-layout: fixed; width: 100%">
                    <tr>
                        <td style="width: 110px">Events View:</td>
                        <td><telerik:RadComboBox ID="cboEventsView" runat="server" OnSelectedIndexChanged="cboEventsView_SelectedIndexChanged" AllowCustomText="false" AutoPostBack="true" ExpandAnimation-Type="OutElastic" CollapseAnimation-Type="InElastic" Skin="Hay">
                                <Items>
                                    <telerik:RadComboBoxItem Text="Current Events" Value="Current" Selected="true" />
                                    <telerik:RadComboBoxItem Text="Past Events" Value="Past" />
                                </Items>
                            </telerik:RadComboBox></td>
                        <td style="text-align: right"><telerik:RadButton ID="btnNewEvent" runat="server" Text="Create New Event" OnClientClicked="OpenNewEventWindow();return false;" Skin="Hay"></telerik:RadButton>
                                                      <asp:Button ID="btnASPNewEvent" runat="server" Text="Create New Event" OnClientClick="OpenNewEventWindow();return false;" /></td>
                    </tr>
                </table>
            </div>
            <div style="width: 100%; padding-top: 15px; padding-left: 5px; padding-right: 5px;">
                <telerik:RadGrid ID="RadGridEvents" runat="server" DataSourceID="sqlEvents" GridLines="None" OnItemDataBound="RadGridEvents_ItemDataBound" Skin="Hay" OnItemCommand="RadGridEvents_ItemCommand">
                    <ClientSettings EnableRowHoverStyle="true"></ClientSettings>
                    <MasterTableView AutoGenerateColumns="false" CellSpacing="-1" DataKeyNames="dbid, eventname, eventtagline, eventshortdesc, eventfulldesc, eventfeestructure, eventmemo, eventdatetime, eventlocation, contactperson, contactnumber, contactemail" DataSourceID="sqlEvents">
                        <Columns>
                            <telerik:GridBoundColumn DataField="dbid" DataType="System.Int32" HeaderText="dbid" SortExpression="dbid" UniqueName="dbid" Visible="false"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="eventname" HeaderText="Event Name" SortExpression="eventname" UniqueName="eventname"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="eventdatetime" DataType="System.DateTime" HeaderText="Event Date" SortExpression="eventdatetime" UniqueName="eventdatetime">
                                <HeaderStyle Width="90px" />
                                <ItemStyle Width="90px" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="eventlocation" HeaderText="Event Location" SortExpression="eventlocation" UniqueName="eventlocation">
                                <HeaderStyle Width="180px" />
                                <ItemStyle Width="180px" />
                            </telerik:GridBoundColumn>
                            <telerik:GridTemplateColumn HeaderText="Edit">
                                <HeaderStyle Width="20px" />
                                <ItemStyle Width="20px" />
                                <ItemTemplate>
                                    <asp:ImageButton ID="btnEditEvent" runat="server" ImageUrl="~/Img/imgEditIcon.png" />
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="Archive">
                                <HeaderStyle Width="20px" />
                                <ItemStyle Width="20px" />
                                <ItemTemplate>
                                    <asp:ImageButton ID="btnArchiveEvent" runat="server" ImageUrl="~/Img/imgArchiveIcon.png" />
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="Purge">
                                <HeaderStyle Width="20px" />
                                <ItemStyle Width="20px" />
                                <ItemTemplate>
                                    <asp:ImageButton ID="btnPurgeEvent" runat="server" ImageUrl="~/Img/imgDeleteIcon.png" />
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>
                <asp:SqlDataSource ID="sqlEvents" runat="server" ConnectionString="<%$ ConnectionStrings:fluxConnString %>" SelectCommand="SELECT * FROM EventManagement WHERE ([isarchived] = 'False')"></asp:SqlDataSource>
            </div>
        </div>
    </div>
</asp:Content>

No errors are produced when viewing the webpage in Internet Explorer or Chrome, however, when the button is clicked, it seems like a postback and then nothing happens. When setting the 'AutoPostBack' to 'False', nothing is happening. I'm using Telerik Q2 2011 (developing in .NET 4.0).

The RadWindow is not opened in either Internet Explorer 9 nor Google Chrome. Any help would be greatly appreciated.
Marin Bratanov
Telerik team
 answered on 08 Mar 2012
8 answers
86 views
Everyone seems to use the same JavaScript function for getting a handle on a radwindow from within itself:
function GetRadWindow() {
    var oWindow = null;
    if (window.radWindow)
        oWindow = window.RadWindow; //Will work in Moz in all cases, including clasic dialog      
    else if (window.frameElement.radWindow)
        oWindow = window.frameElement.radWindow; //IE (and Moz as well)
    return oWindow;
}

This does not seem to work in IE8.  In IE8, both window.radWindow and window.frameElement are null when this is called from within a RadWindow.

Does anyone know how to get this to work in IE8?

Thanks.
Craig Wallace
Top achievements
Rank 1
 answered on 08 Mar 2012
1 answer
68 views
I have two RadGrid on a page when I select any row of the first RadGrid it shows the details in the second RadGrid where it also carries the product image is everything perfect except that when I have the image of the product I pointed to a directory where he carried a picture product is not available as I make my old code he was working this way:

foreach (DataRow ors in ds.Tables[0].Rows)
       {
           if (ds.Tables[0].Rows[0]["Bytes"].ToString().Trim() != string.Empty)
               myfoto = (byte[])ors[0];
       }
 
       //Caso o produto não tenha foto é atribuído uma imagem
       //com o texto "Foto não disponível"
       if (ds.Tables[0].Rows[0]["Bytes"].ToString() == string.Empty)
       {
 
           //Colocar i caminho da imagem
           string FinalPath = @"C:\Users\Administrador\documents\visual studio 2010\Projects\site uniao\site uniao\imagens\fotonaodisponiel.gif";
 
           FileStream stream = new FileStream(FinalPath, FileMode.Open, FileAccess.Read);
           BinaryReader reader = new BinaryReader(stream);
 
           myfoto = reader.ReadBytes((int)stream.Length);
 
       }
 
       context.Response.ContentType = "Bytes/JPG";
       context.Response.BinaryWrite(myfoto);

this is my main code of the RadGrid :

private void   pesquisar()
 
       {
            
           SqlConnection conn = new SqlConnection(@"Data Source=INFORMATICA005;Initial Catalog=unibanco;Integrated Security=True");
           SqlCommand comm = conn.CreateCommand();
           comm.CommandText = "SELECT * FROM uniao ";
           string[] palavras = RadTextBox2.Text.Split(' ');
           string sep = "where descricao like";
           int cont = 0;
           foreach (string s in palavras)
           {
           
               comm.CommandText += sep + " @palavra" + cont.ToString();
               comm.Parameters.AddWithValue("@palavra" + cont.ToString(), "%" + s + "%");
               sep = " AND descricao like";
               cont++;
 
           }
         
           SqlDataAdapter da = new SqlDataAdapter(comm);
           DataTable  ds = new DataTable ();
           da.Fill(ds);
           Session["gridtable"] = ds;
           RadGrid1.DataSource = Session["gridtable"];
           RadGrid1.Rebind ();
           
 
           
       }
Maria Ilieva
Telerik team
 answered on 08 Mar 2012
1 answer
102 views
I would like to be able to navigate from several spots within my application and open up the edit formtemplate for a particular row in a RadGrid on another page.  I can pass the key thru a session variable.
When the page loads, I would like the edit formtemplate (a popup) to automatically open with the data presented for the row with the passed key.

Any guidance on an approach to accomplish this would be greatly appreciated.

My alternative is to duplicate the rather complex formtemplate on other pages; something I'd rather not do.

Thanks in advance.

Jim
Shinu
Top achievements
Rank 2
 answered on 08 Mar 2012
1 answer
201 views
Hi, I want to upload a file in two target folder. Problem is file is uploaded successfully in first target folder but when it is saved for 2nd target folder I get file not found error. What I learn that RadAsyncUpload keeps files temporarily in App_Data folder and when file is saved then it is deleted from that folder. Any different approach so that I can save file for different target folder in single upload.
Bozhidar
Telerik team
 answered on 08 Mar 2012
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?