Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
176 views
I have an issue where asyncupload simply resets or stops during large uploads.

I have a test harness here.

I have successfully uploaded a 18MB file but nothing over this.  The execution timeout is 3600 and the maxRequestLength is large.

http://regrowth2010.c6.ixwebhosting.com/

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="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>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
     <style type="text/css">
    div.RadUpload .ruFakeInput
    {
        visibility: hidden;
        width: 0;
        padding: 0;
    }
    div.RadUpload .ruFileInput
    {
        width: 1;
    }
     </style>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        var Nbre = 0;
        function getRadWindow() {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow;
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
            return oWindow;
        }
        function CloseWindow() {
            var wnd = getRadWindow();
            var openerPage = wnd.BrowserWindow;
            openerPage.Importer_Callback();
            wnd.close();
        }
        function validateRadUpload1(source, arguments) {
            arguments.IsValid = $find('RadUpload1').validateExtensions();
        }
  
        function validateFailed(source, arguments) {
  
        }
  
        function fileSelected(source, arguments){
  
        }
  
        function fileUploaded(sender, args) {
            document.forms[0].btnSubmit.style.display= 'inline';
        } 
  
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
   
    <telerik:RadSkinManager ID="RadSkinManager1" Runat="server" Skin="Vista">
    </telerik:RadSkinManager>
          
    <telerik:RadProgressManager runat="server" ID="RadProgressManager1" /> 
        <div>
          <table>
            <tr>
                <td>Firstname:</td>
                <td>
                    <asp:TextBox ID="tbFirstName" runat="server"></asp:TextBox></td>
            </tr>
            <tr>
                <td>Surname:</td>
                <td>
                    <asp:TextBox ID="tbSurname" runat="server"></asp:TextBox></td>
            </tr>  
            <tr>
                <td>Act/DJ Name:</td>
                <td>
                    <asp:TextBox ID="tbActName" runat="server"></asp:TextBox></td>
            </tr>          
          </table>
            
          <telerik:RadAsyncUpload runat="server" Localization-Select="Upload" ID="AsyncUpload1" MaxFileSize="300000000" OnClientFileUploaded="fileUploaded" ReadOnlyFileInputs="true" InitialFileInputsCount="1" MaxFileInputsCount="1" ControlObjectsVisibility="None" OnClientFileSelected="fileSelected" OnClientValidationFailed="validateFailed" /> 
            
        </div>
        <div><telerik:RadProgressArea runat="server" ID="RadProgressArea1" ProgressIndicators="TotalProgressBar,TotalProgressPercent,RequestSize,TimeElapsed,TimeEstimated,CurrentFileName,TotalProgress"  /></div> 
              
        <asp:Button ID="btnSubmit" runat="server" Text="Submit Demo" style="display:none" OnClick="buttonSubmit_Click"/>
    </form>
</body>
</html>
Kate
Telerik team
 answered on 05 Oct 2012
4 answers
122 views
In looking at the RadWindow examples (the Restriction Zone example best fits my scenario) If you follow the steps below:

1. Maximize a window
2. Minimize the same window
3. Restore the window

In the operating system if you do this the window is restored to a maximized state.  however, the radwindow restores to a non-maximized state.  Is there a way to allow the radwindow to behave closer to the OS? (restoring the window to its last know state)

Thanks....
Francois MARTIN
Top achievements
Rank 2
 answered on 05 Oct 2012
1 answer
199 views
I have a problem with webservice binding of RadScheduler on an ASP.NET forms application.  I need to be able to access Session state from my webservice code, and sometimes it works and sometimes it doesn't.

Specifically the client event OnClientResourcesPopulating does not maintain session state - I presume because it's not passing the current session state cookie to the webservice call.

I have set up a sample project showing the problem, which I set up using the example here: http://www.telerik.com/help/aspnet-ajax/scheduler-webservicebinding.html

The key parts are that in my Default.aspx I set a session variable like this:

namespace RSWSTest

{

    public partial class Default : System.Web.UI.Page

    {

        protected void Page_Load(object sender, EventArgs e)

        {

            if (!Page.IsPostBack)

            {

                Session["TestSessionValue"] = "MyTestValue";

            }

        }

    }

}


The page has a RadScheduler on it, configured to call a webservice.  Here's a snippet from the webservice code:

        [WebMethod(EnableSession=true)]

        public IEnumerable<ResourceData> GetResources(SchedulerInfo schedulerInfo)

        {

            object v = Session["TestSessionValue"]; //-- THIS RETURNS NULL

            Session["WS_GetResourcesCalled"] = true; //-- THIS WORKS BUT NOT VISIBLE IN SUBSEQUENT CALLS

            return Controller.GetResources(schedulerInfo);

        }

        

        [WebMethod(EnableSession=true)]

        public IEnumerable<AppointmentData> GetAppointments(SchedulerInfo schedulerInfo)

        {

            object v = Session["TestSessionValue"]; //-- THIS RETURNS "MyTestValue"

            Session["WS_GetAppointmentsCalled"] = true;

            return Controller.GetAppointments(schedulerInfo);

        }


As you can see from my comments - it appears that the GetResources function starts a new session every time it is called, whilst the GetAppointments function seems to work as expected.

I need to find a solution to this as I have session-based user security and I want to return different things based on which user is stored in the current session.

I can't attach my test solution because it'll only let me post image files - but I can email it to someone if it would help - it's only 19k zipped!


Plamen
Telerik team
 answered on 05 Oct 2012
4 answers
215 views
Hello,
I have created a RadGrid that uses KeyboardNavigation for making changes.  Two of my columns are dates and use RadDatePickers for inline editing.  My third column is just a Notes column (text box).
When I hit [Enter]  to put a row into Edit Mode, move to the Notes text box and hit [Enter] I can save the row, or if I hit [Escape] I can cancel the edit.

If, however, my focus is on one of the two RadDatePickers and I hit [Enter] or [Escape] I get the following error:

Text property cannot be set. String was not recognized as a valid DateTime. 
[InvalidCastException: Text property cannot be set. String was not recognized as a valid DateTime.]
   Telerik.Web.UI.RadDateInput.RangeTextProperty(String value) +265
   Telerik.Web.UI.RadDateInput.set_Text(String value) +47
   Telerik.Web.UI.DatePickingInput.LoadPostData(String postDataKey, NameValueCollection postCollection) +750
   Telerik.Web.UI.RadWebControl.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +42
   System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +327
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +878


<telerik:RadGrid ID="RadGrid1" runat="server" ShowStatusBar="true" AutoGenerateColumns="False"
            PageSize="15" AllowSorting="True" AllowMultiRowSelection="true" AllowPaging="True"
            AutoGenerateEditColumn="true" GridLines="None" Width="50%" Skin="Hay">
            <PagerStyle Mode="NumericPages" />
            <MasterTableView DataKeyNames="RecordID" AllowMultiColumnSorting="True" Width="100%"
                CommandItemDisplay="Top" Name="Customers" EditMode="InPlace">
                <GroupByExpressions>
                    <telerik:GridGroupByExpression>
                        <SelectFields>
                            <telerik:GridGroupByField FieldAlias="Name" FieldName="Name" />
                        </SelectFields>
                        <GroupByFields>
                            <telerik:GridGroupByField FieldName="Name" SortOrder="Ascending" />
                        </GroupByFields>
                    </telerik:GridGroupByExpression>
                </GroupByExpressions>
                <Columns>
                    <telerik:GridBoundColumn UniqueName="Name" DataField="Name" HeaderText="Name" ReadOnly="true"
                        Visible="false" />
                    <telerik:GridDateTimeColumn UniqueName="StartDate" DataField="StartDate" HeaderText="Start Date"
                        ColumnEditorID="editorStartDate" DataFormatString="{0:M/d/yyyy}" />
                    <telerik:GridDateTimeColumn UniqueName="EndDate" DataField="EndDate" HeaderText="End Date"
                        ColumnEditorID="editorEndDate" DataFormatString="{0:M/d/yyyy}" />
                    <telerik:GridBoundColumn UniqueName="Notes" DataField="Notes" HeaderText="Notes"
                        ColumnEditorID="editorNotes" />
                </Columns>
            </MasterTableView>
            <ClientSettings AllowKeyboardNavigation="true">
                <ClientEvents OnRowClick="RowClick" OnRowDblClick="RowDblClick" OnGridCreated="GridCreated"
                    OnCommand="GridCommand" />
                <KeyboardNavigationSettings EnableKeyboardShortcuts="true" AllowSubmitOnEnter="true"
                    AllowActiveRowCycle="true" CollapseDetailTableKey="LeftArrow" ExpandDetailTableKey="RightArrow" />
                <Selecting AllowRowSelect="true" />
            </ClientSettings>
        </telerik:RadGrid>
        <telerik:GridDateTimeColumnEditor ID="editorStartDate" runat="server" />
        <telerik:GridDateTimeColumnEditor ID="editorEndDate" runat="server" />
        <telerik:GridTextBoxColumnEditor ID="editorNotes" runat="server" />

Has anyone else seen this one?

Thanks,
-Aaron
Vasil
Telerik team
 answered on 05 Oct 2012
1 answer
137 views
HOw can I increment the fontsize of the filter textbox?

I tried to use the filteritem font-size option but it doesnt work. I need to have a bigger font.

Thanks in advance.
Shinu
Top achievements
Rank 2
 answered on 05 Oct 2012
1 answer
139 views
Hi,
how to use date picker to only pick for year and show only the year.

By
Anzar.M
Princy
Top achievements
Rank 2
 answered on 05 Oct 2012
3 answers
251 views
Hi all when I enter values as follows 1234567891234567891 in Numeric Textbox I am getting some thing like as follows when I leave the textbox 70368744177664 what should I do in-order to accepts a long digit in Numeric Textbox.

Also when I enter some thing like 1222 it is displaying as 1,222.00 what should I do in-order to display as it is as the entered value
Princy
Top achievements
Rank 2
 answered on 05 Oct 2012
0 answers
191 views

I have a Radgrid with a couple of numeric columns. The grid is in multi-edit mode, and when the user hits Save button, I loop through the grid, and call GridEditableItem.ExtractValues to get the values to save back to the database.

The issue is that when a user is entering a value in the textbox (for the gridnumericcolumn) and does not tab off that textbox and hits the save button, the value does not get saved. If the user tabs off, the entered value is formatted and when the user hits Save button, value gets saved as expeced. The issue is easily reproducible. I am using Telerik v2.0.50727



The markup is:
<telerik:RadGrid Skin="Web20" ID="RadGrid1" runat="server" OnItemCreated="RadGrid1_ItemCreated"
    OnItemDataBound="RadGrid1_ItemDataBound" OnNeedDataSource="rgTasks_NeedDataSource"
    AllowMultiRowEdit="true" ShowStatusBar="false" Width="100%" GridLines="Both">
   
    <MasterTableView HierarchyDefaultExpanded="true" HierarchyLoadMode="Client" ShowFooter="false"
        ShowGroupFooter="false" ShowHeadersWhenNoRecords="false" AllowSorting="true"
        GridLines="Both" DataKeyNames="Id" Width="100%" AutoGenerateColumns="false" EditMode="InPlace"
        TableLayout="Auto" CommandItemDisplay="Top">
        <NoRecordsTemplate>
        </NoRecordsTemplate>
        <CommandItemSettings ShowAddNewRecordButton="False" ShowExportToCsvButton="True"
                    ShowExportToExcelButton="false" ShowExportToPdfButton="false" ShowExportToWordButton="false"
                    ShowRefreshButton="False"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
        </RowIndicatorColumn>
        <Columns>
            <telerik:GridBoundColumn HeaderText="Task ID" UniqueName="MyName" DataField="IdAsInt"
                ReadOnly="true">
            </telerik:GridBoundColumn>
            <telerik:GridTemplateColumn HeaderText="Task Name" UniqueName="Name" DataField="Name"
                ReadOnly="true" ItemStyle-Wrap="false">
                <ItemTemplate>
                    <span style='font-weight: <%# Convert.ToBoolean(Eval("IsSummary")) == true ? "bold" : "normal"%>;
                        margin-left: <%# (Convert.ToInt32(Eval("Depth")) - 1) * 10%>px'>
                        <%# Eval("Name")%>
                    </span>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
           
            <telerik:GridNumericColumn NumericType="Number" HeaderText="Estimated Cost" DataField="ForecastCostLoc"
                UniqueName="ForecastCostLoc" AllowRounding="true" DecimalDigits="0" DataFormatString="{0:#,#}">
            </telerik:GridNumericColumn>           
           
        </Columns>
        <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
        </EditFormSettings>
        <NoRecordsTemplate>
            There are no tasks to display
        </NoRecordsTemplate>
    </MasterTableView>
<ExportSettings Csv-EncloseDataWithQuotes="true" FileName="Forecast Costs" IgnorePaging="true">
            </ExportSettings>
    <ClientSettings AllowExpandCollapse="true" />
    <FilterMenu EnableImageSprites="False">
    </FilterMenu>
</telerik:RadGrid>

<asp:Button ID="btnSave" runat="server" OnClick="btnSave_Click" Text="Save" ValidationGroup="PRJ_WEB_PART"
                         />

andy
Top achievements
Rank 1
 asked on 05 Oct 2012
0 answers
88 views
Hi everyone
I need to know if possible, add a shortcut to a textbox inside a RadGrid.
The point is this: I have a radgrid where some fields have textbox, these textbox, if I positioned in one of them by pressing a key combination, it must display a popup.
If anyone knows of any control or something would be very useful.
thank you very much

Layo
Top achievements
Rank 1
 asked on 04 Oct 2012
4 answers
195 views
Hello,
I am using in my RadGrid following code:

<telerik:GridDateTimeColumn FilterControlWidth="140px" DataField="Datum" HeaderText="Datum"
    SortExpression="Datum" UniqueName="Datum" PickerType="DateTimePicker"
    EnableRangeFiltering="true" CurrentFilterFunction="Between" ReadOnly="True" AllowFiltering="True" FilterListOptions="VaryByDataType">
    <HeaderStyle Width="220px" />
</telerik:GridDateTimeColumn>

When I click on filter icon I get list of options like (between, not between etc...) Would it be possible to have always one default value there (between) and use it after clicking to filter icon?
berto
Top achievements
Rank 1
 answered on 04 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?