Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
590 views
Hi,
I have a RadAsyncUpload control on my page in <td> tag of HTML table. Unfortunately, Its width fall outside the HTML table.
I have other elements in the other <td> tag but those elements can not be click as RadAsyncUpload control overlaps the other elements.
How can I control the width of RadAsyncUpload control ?
In the given code demo, If you try clicking Upload button You will still get a file dialogue opened to select file.
Please also note that, the textbox for the description read only. When I replaced RadAsyncUpload control with RadUpload I can enter text in textbox, means It becomes editable.
Here is a HTML:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="TestRadAsyncUpload_Default" %>
 
<!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>
    <style type="text/css">
           .ruBrowse
             {
                background-position: 0 -46px !important;
                width: 122px !important;
             }
  
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadAjaxPanel ID="ajaxPanel" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
         <table width="70%" cellpadding="0" cellspacing="0" border="1">
            <tr>
                <td style="width: 30%">
                    Select Files :
                </td>
                <td style="width: 30%; ">
                     <%--<telerik:RadAsyncUpload  ID="uploadRefAndInstrucs" AllowedFileExtensions="doc,docx,xls,xlsx,pdf,zip,rar,tar,gz" runat="server" >
                     </telerik:RadAsyncUpload>--%>
                      
                     At least one file muct be selected<br /> <br />
                    <telerik:RadAsyncUpload  ID="uploadRefAndInstrucs" runat="server" Width="190px" CssClass="ruBrowse" >
                     </telerik:RadAsyncUpload>
                      
                    <%-- <telerik:RadUpload ID="uploadRefAndInstrucs" runat="server" >
                     </telerik:RadUpload>--%>
                      
                </td>
                <td style="width: 40%">
                      
                </td>
                 <td style="width: 30%">
                    Select Files :
                </td>
                <td valign="top" style="width: 30%; ">
                     <%--<telerik:RadAsyncUpload  ID="uploadRefAndInstrucs" AllowedFileExtensions="doc,docx,xls,xlsx,pdf,zip,rar,tar,gz" runat="server" >
                     </telerik:RadAsyncUpload>--%>
                      
                    <telerik:RadAsyncUpload  ID="RadAsyncUpload1" runat="server" Width="190px" CssClass="ruBrowse" >
                     </telerik:RadAsyncUpload>
                     <asp:Button ID="btnUpload" runat="server" CausesValidation="false" Text="Upload" OnClick="btnUploadAnotherLanguage_Click" />      
                    <%-- <telerik:RadUpload ID="uploadRefAndInstrucs" runat="server" >
                     </telerik:RadUpload>--%>
                </td>
                <td style="width: 40%">
                      
                </td>
            </tr>
            <tr>
                <td style="width: 30%">
                    <asp:Label runat="server" ID="lblContentSource" Text="Content Source Language *"
                        Width="100%"></asp:Label>
                </td>
                <td style="width: 30%">
                    <asp:DropDownList runat="server" ID="ddlCotentSourceLanguage" Width="100%">
                        <asp:ListItem Text="-- Select Language --" Value="0"></asp:ListItem>
                        <asp:ListItem Text="Canada" Value="1"></asp:ListItem>
                        <asp:ListItem Text="USA" Value="2"></asp:ListItem>
                        <asp:ListItem Text="China" Value="3"></asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td style="width: 20%">
                      <asp:RequiredFieldValidator ID="ReqContentSourceLanguage" ValidationGroup="UpdateGroup"
                        ToolTip="Content source language is required." runat="server" ControlToValidate="ddlCotentSourceLanguage"
                        InitialValue="0" Text="*" Display="Dynamic" ErrorMessage="Select content source language."></asp:RequiredFieldValidator>
                </td>
                <td colspan="3" style="width: 20%">
                      
                </td>
            </tr>
            <tr>
                 <td align="right">
                            <asp:Label ID="lblDescription" runat="server" Text="Description*"></asp:Label>
                  </td>
                 <td style="width: 25%">
                        <asp:TextBox ID="txtDescription" runat="server"  TextMode="MultiLine" Width="100%"></asp:TextBox>
                </td>
                <td>
                     <asp:RequiredFieldValidator ID="ReqDescription"
                        runat="server" ValidationGroup="UpdateGroup" ControlToValidate="txtDescription"
                        Display="Dynamic" Text="*" ErrorMessage="Enter description."></asp:RequiredFieldValidator>
                </td>
                 <td colspan="3" style="width: 20%">
                      
                </td>
            </tr>
            <tr>
                <td colspan="6">
                     <asp:Button ID="btnUploadAnotherLanguage" runat="server" ValidationGroup="UpdateGroup" Text="Submit" OnClick="btnUploadAnotherLanguage_Click" />      
                </td>
            </tr>
        </table>
    </telerik:RadAjaxPanel>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>
    </form>
</body>
</html>

Thanks

Tejas
Hristo Valyavicharski
Telerik team
 answered on 28 Mar 2013
3 answers
59 views
Hi,

I am have a radDatepicker on my radwindow. When i first click on the radDatepicker and select a date it cause both the radwindow and the parent page to shift upwards making the headers invisible.

This is happening only in IE7 and in a radwindow.

Thanks & Regards,
Sharanya
Vasil
Telerik team
 answered on 28 Mar 2013
1 answer
115 views
When I click cancel on my custom advanced from, the page load runs and the form creating and created get called again.  It then runs all of my form created code before it dismisses the popup. 

If I can check the commandName on this link button, I could fix this easily. 

<asp:LinkButton runat="server" ID="btnCancel" CssClass="rsAdvEditCancel" CommandName="Cancel" CausesValidation="false">

Ideas?
Boyan Dimitrov
Telerik team
 answered on 28 Mar 2013
4 answers
431 views
I'm having a hard time getting column widths looking nice in a RadGrid Excel export to Biff format.  The grid is fairly simple, binding to a dataset with a few DataBound columns.

With no widths set on any of the GridBoundColumns, the grid looks wonderful in HTML (widths set automatically), but the Excel export appears with very small columns (all have width set to zero).

If I manually set widths on each of my GridBoundColumns, again it looks great in HTML but the resulting Excel export has very, very wide columns that run way off the right side of the page.  It appears this has to do with Excel measuring column widths in characters and the RadGrid of course handling column widths with pixels.  For example, if I set my GridBoundColumn.HeaderStyle.Width = 240, in the resulting Excel file I can see the column width set to 180.  Some conversion must be happening here to convert pixels to characters but it's not working right.

Is there any way I can set the Excel columns width equal to the pixel width settings in my RadGrid?
Kostadin
Telerik team
 answered on 28 Mar 2013
3 answers
350 views
I am trying to get the CustomValidator to work with the RadAsyncUpload, but not having any luck.

I have tried the example from here http://www.telerik.com/community/forums/aspnet-ajax/async-upload/required-validator-and-radasyncupload.aspx but the javascript never fires. What links the 2 controls togther? Normally I would set the ControlToValidate property of the CustomValidator, but that also does not work.

I have simplified the example (Should always fail validataion), but still no luck

   <script type="text/javascript">
      function validateUpload(sender, args) {
            args.IsValid = false;
        }
   </script>
 
 <div>
     <tel:RadAsyncUpload ID="RadAsyncUpload1" runat="server" MultipleFileSelection="Automatic" />
      <asp:CustomValidator runat="server" ID="CustomValidator" ClientValidationFunction="validateUpload" ErrorMessage="Select at least a single file" />
</div>

Hristo Valyavicharski
Telerik team
 answered on 28 Mar 2013
1 answer
110 views
Is it possible to create a Pivot Grid with datafield name as row field.
The data source and the final report format is given below just as an example.
I have attached screen shot in case formatting is lost during the posting.

Date source
firm_ID firm_name PMName Region Market Forum month YEAR valuefield1 valuefield2 valuefield3 valuefield4 valuefield5
48 hello john USA Food Genie 10 2012 0.1 0.9 0.8 0.8 0.8
48 hello john USA Food Genie 11 2012 0.1 0.8 0.3 0.8 0.8
48 hello john USA Food Genie 12 2012 0.1 0.6 0.5 0.8 0.8
Pivot Grid Format
Firm name PM Name Region Market Forum
hello john USA Food Genie 2012
          10      11
valuefield1    
valuefield2    
valuefield3    
valuefield4    
valuefield5    
Daniel
Telerik team
 answered on 28 Mar 2013
3 answers
228 views
Hi everyone,

I am dynamically creating a static radWindow to appear on a RadPageView within a RadMultipage. The code which creates the radWindow is done entirely within the code-behind, and I am using an AJAX manager.

it all works fine and my RadWindow appears and is displayed where I want it (within a div called "RegistrationFileContainer" which is also within an ASP Panel control which I've hooked up to the AJAX Manager). 

However when I click on the other tabs, the radWindow remains in front of the other tabs.

I'm sure there is something simple which I am doing wrong. I've attached my markup code below (the code behind simply creates the window and then adds it to the RegistrationFileContainer Div).

<!-- Pages -->
<telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" CssClass="multiPage">
 
    <!-- Registration Information -->
    <telerik:RadPageView ID="RadPageView1" runat="server">
 
        <asp:Panel runat="server" id="PanelRegistration" CssClass="PagePanel" >
            <div class="RegistrationFileContainer" runat="server" id="RegistrationFileContainer" />
        </asp:Panel>
            
    </telerik:RadPageView>
 
</telerik:RadMultiPage>

Can anybody help?

Thanks!

Mark

Nencho
Telerik team
 answered on 28 Mar 2013
1 answer
155 views
Hi,
 
I am facing a problem regarding RadAjaxLoadingPanel. I have to save different records from Excel or CSV file to my database using Open Access.
When query start on and data in being saved in DB, loading panel is working fine but after some time when certain amount of records are saved(say 350 records) to DB than loading panel hides and does not show any progress while data in saving in DB. I studied about MinDisplayTime property of RadAjaxLoadingPanel but i need to set this property according to my number of records so that loading panel should be displayed until all records are saved to DB. 

For brief description I am attaching working video of my problem
.You will see in the video that loading panel disappears after some time while records are being saved to DB continuously but loading panel disappears.

this is video link.
http://screencast.com/t/oSkjTDheo
  
What should  I do to show the loading panel until all my records are saved to DB ?
Can some one help my ASAP.

Regards:
Kamran
Angel Petrov
Telerik team
 answered on 28 Mar 2013
1 answer
80 views
When the user clicks the arrows on the top left to navigate to the next or previous period, I want to move the calendar a specified number of days.  The default behavior is for it to move the number of days that you show.  Here's what I came up with which isn't working.

What I'd really like to do is add 7 days to the currently visible start date.

function clientNavigationCommandHandler(sender, eventArgs) {
            if (eventArgs.get_command() == Telerik.Web.UI.SchedulerNavigationCommand.NavigateToNextPeriod) {
                    var d = new Date();
                       d.setDate(d.getDate() + 7);
 
                sender.set_selectedDate(d);
            }
        }
Boyan Dimitrov
Telerik team
 answered on 28 Mar 2013
2 answers
219 views
Hello,

I am able to dynamically create and resize the RadEditor within a RadGrid with the code listed below.  Although, if any of the previous RadEditors contain content they will not resize to the specified height of 25px, when dynamically adding a new instance of the RadEditor in the RadGrid.

UI:




Code:
 <script type="text/javascript">
         function OnClientLoad(editor) {
             editor.get_text();

             /* Increase height of Instruction Editor */
             editor.attachEventHandler("onfocus", function (e) {
                 editor.setSize("225", "200");
             });
             /* Reset to default height of Instruction Editor */
             editor.attachEventHandler("blur", function (e) {
                 editor.setSize("225", "25");
                 editor.set_html(editor);
             });
         }
    </script>
    <style type="text/css">
    .reContentArea
    {
        white-space: pre-line !important;
        word-wrap: break-word !important;
        max-width: 200px;
        text-align: left;
    }

 <telerik:GridTemplateColumn HeaderText="Instructions" UniqueName="Instructions" HeaderStyle-HorizontalAlign="Center" ItemStyle-Wrap="false">
                <ItemTemplate>
                    <telerik:RadEditor ID="txtInstruction" runat="server" MaxTextLength="1000" Style="overflow:auto; overflow-x: hidden; overflow-y: scroll;" AutoResizeHeight="true" EditModes="Design" ContentAreaMode="Div" ToolbarMode="Default" OnClientLoad="OnClientLoad" Width="220px" Height="25px" ToolsWidth="130px">
                    <Tools>
                        <telerik:EditorToolGroup>
                            <telerik:EditorTool  Name="ForeColor" />
                            <telerik:EditorTool Name="Bold" />
                            <telerik:EditorTool Name="Italic" />
                            <telerik:EditorTool Name="Underline" />
                        </telerik:EditorToolGroup>
                    </Tools>
                    </telerik:RadEditor>
                </ItemTemplate>
            </telerik:GridTemplateColumn>

How do I dynamically collaps2 all previous RadEditors, that contain content, to 25px when creating a new RadEditor row within the RadGrid?

Thank You in Advance!
Rengo
Top achievements
Rank 1
 answered on 28 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?