Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
478 views
Hello

I am using radasyncupload on the usercontrol that populates and saves the data using WCF from client side code. There is no postback to server.

Since now there is requirement to upload the file, I am using radasyncupload.  The idea behind that was to read the file from temporary folder from wcf hosted on the same server. However when I look at files it has some junk name and extension as I understand that on postback you move from temporary folder to target folder.

So how can I read the content as bytes from temporary folder. Is there any meta data that will point me to correct file?

Or is there a work around that I can get byte array on the client side and I can pass to wcf on my own. I tried onclientfileuploaded by it doesnot have property in fileinfo object that will give me bytes.

Regards
Manish
Hristo Valyavicharski
Telerik team
 answered on 29 Jul 2013
13 answers
355 views
I have two RadDatePickers.  When I select a date on the first one I need the MaxDate set to the selected date on the 2nd one.
The following code sets the MaxDate correctly

function dateSelected(sender, e) { 
   var dateString = e.get_newValue(); 
   var maxdate = new Date(dateString); 
   var postmarkdate = $find("<%= PostMarkDate.ClientID %>"); 
   postmarkdate.set_maxDate(maxdate); 
} 

My error occurs when I set the date on the 1st picker to any date less than the current month and then I click the icon to popup the calendar for the second picker.  Whenever I do this I get a javascript popup with the error: "Date is out of range."

This occurs whether I type in the date or select one from the calendar.

As I said this does not happen if I select a date that falls in the current month.

This does not occur when I already have a date in the 2nd picker, only when it's empty.

The MaxDate is set correctly in the 2nd picker and the 2nd picker calendar that pops up is displaying the correct dates, it just throws the js error.

Whats the issue?

Thanks,

Rob T


Ashwini
Top achievements
Rank 1
 answered on 29 Jul 2013
6 answers
312 views
Hello,
I am having a strange issue with Export to Excel option.  It works for the first time and stopes working.  The only way I could make it work is refresh the page and try again.  Also all the other controls on the page stops posting back once I export once.  Following is my scenario. FYI, this does not happen in .NET Web App

Environment: SharePoint Foundation 2010
Type: Visual Webpart

 

 

<telerik:RadGrid ID="ReportRadGrid" runat="server" OnNeedDataSource="ReportsRadGrid_NeedDataSource" Skin="Sunset">

 

 

 

<MasterTableView TableLayout="Auto" CommandItemDisplay="Top" AllowPaging="true" AutoGenerateColumns="false" EnableNoRecordsTemplate="true" ShowHeadersWhenNoRecords="true">

 

 

 

<CommandItemSettings ExportToExcelText="Export to Excel" ShowExportToExcelButton="true" ShowAddNewRecordButton="false" ShowRefreshButton="false" />

 

 

 

<CommandItemTemplate>

 

 

 

<div style="text-align:right">

 

 

 

<telerik:RadButton ID="ExportRadButton" Text="Export to Excel" runat="server" Skin="Sunset" OnClick="ExportRadButton_Click" />

 

 

 

</div>

 

 

 

 

</CommandItemTemplate>

 

 

 

<Columns>

 

 

 

<telerik:GridBoundColumn DataField="Project_x0020_Name" HeaderText="Project Name" />

 

 

 

<telerik:GridBoundColumn DataField="Performing_x0020_Organization" HeaderText="Performing Organization" />

 

 

 

<telerik:GridBoundColumn DataField="Project_x0020_Sponser" HeaderText="Project Sponser" />

 

 

 

<telerik:GridBoundColumn DataField="Status" HeaderText="Status" />

 

 

 

<telerik:GridBoundColumn DataField="Status_x0020_Comments" HeaderText="Status Comments" />

 

 

 

<telerik:GridBoundColumn DataField="Risk_x0020_to_x0020_Project" HeaderText="Risk to Project" />

 

 

 

<telerik:GridBoundColumn DataField="Risk_x0020_Level" HeaderText="Risk Level" />

 

 

 

<telerik:GridBoundColumn DataField="Export_x0020_Date" HeaderText="Publish Date" DataFormatString="{0:MM/dd/yyyy}"/>

 

 

 

</Columns>

 

 

 

</MasterTableView>

 

 

 

<PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" />

 

 

 

<ExportSettings HideStructureColumns="true" ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true" />

 

 

 

</telerik:RadGrid>

 



 

 

protected void ExportRadButton_Click(object sender, EventArgs e)

 

 

{

 

 

 

this.ReportRadGrid.MasterTableView.ExportToExcel();

 

 

}

Please let me know if you need more details.

Thanks,
Bharath

Swati
Top achievements
Rank 1
 answered on 29 Jul 2013
1 answer
488 views
Hi

I have a doubt. When we are overriding a default style using CSS ! Important, its applied to all the respective controls. How can we avoid this such as I want to apply a hovered style for only one textbox in my page?

Any input to tackle this will be helpful
Katya
Shinu
Top achievements
Rank 2
 answered on 29 Jul 2013
2 answers
57 views
Hi,

Is there a way to make only dates that have been added as Special Days clickable?.

Thanks,

Hendrik
Hendrik Johns
Top achievements
Rank 1
 answered on 29 Jul 2013
1 answer
324 views
Hi,

We are using Rad Pivot grid data binding with OLAP settings. We are using OnebyFour as default layout.
Now We want to change the height of Filter, Row, Column and Aggregate fields of Layout and also width of All fields.
Can you please help us to change height and width of Layout in PivotGrid.
Please find attached png file.
Thanks.

Tsvetoslav
Telerik team
 answered on 29 Jul 2013
1 answer
169 views
Hello.
I encounter a problem with the controller [RadDropDownList].
I built a simple table on the server side (code behind) and manually sets the client function [OnClientSelectedIndexChanged] on the controller
[RadDropDownList].
My problem is that my property RadDropDownList.Enabled is always equal to false. I do not understand why ... If I define no client function on [OnClientSelectedIndexChanged] , my property of my control RadDropDownList.Enabled is equal to True.

Do you have any idea why it is impossible to define the client function [OnClientSelectedIndexChanged] without changing the Enabled property? This is boring because users can not use this controller if enable == false..

Thanks a lot !
Here is my code used to build my table with the control [RadDropDownList] .
for (int a = 0; a < allAudit.GetLength(0); a++)
{
          // .......
 
          int auditID = int.Parse(allAudit[a, 0]);
          double percent = ((double)countTotalAuditable/(double)countTotal) * 100.0;
 
          TableRow row = new TableRow() { BackColor = Color.FromArgb(215, 230, 247) };
          TableCell cell_processName = new TableCell() { HorizontalAlign = HorizontalAlign.Left,VerticalAlign = VerticalAlign.Middle };
          TableCell cell_date = new TableCell() { HorizontalAlign = HorizontalAlign.Center, VerticalAlign = VerticalAlign.Middle };
          TableCell cell_progression = new TableCell() { HorizontalAlign = HorizontalAlign.Center, VerticalAlign = VerticalAlign.Middle };
          TableCell cell_responsable = new TableCell() { HorizontalAlign = HorizontalAlign.Center,VerticalAlign = VerticalAlign.Middle };
 
          Label lblProcessName = new Label() { Text = allAudit[a, 1] };
          Label lblDate = new Label() { Text = DateTime.Parse(allAudit[a, 3]).ToLongDateString() };
          Label lblProgressionAudit = new Label() { Text = percent+" %" };
          RadDropDownList droopDownResponsable = new RadDropDownList();
          droopDownResponsable.EnableEmbeddedScripts = false;
          droopDownResponsable.ID = "droopDownResponsable";
          droopDownResponsable.ClientIDMode = System.Web.UI.ClientIDMode.Static;
          droopDownResponsable.OnClientSelectedIndexChanged = "cbx_responsible_SelectedIndexChanged("+auditID+");";
          SqlDataSource sourceUserList = new SqlDataSource(ConfigurationManager.ConnectionStrings["SCI2ConnectionString"].ToString(), "SELECT [tblUser].[userID], [UserName] FROM [aspnet_Users] INNER JOIN [tblUser] ON [aspnet_Users].[UserId] = [tblUser].[membershipID]");
 
          droopDownResponsable.DataValueField = "UserID";
          droopDownResponsable.DataTextField = "UserName";
          droopDownResponsable.DataSource = sourceUserList;
 
          droopDownResponsable.DataBind();
 
          foreach (DropDownListItem item in droopDownResponsable.Items)
          {
                if (item.Text == allAudit[a, 2])
                {
                      item.Selected = true;
                }
          }
 
          cell_processName.Controls.Add(lblProcessName);
          cell_date.Controls.Add(lblDate);
          cell_progression.Controls.Add(lblProgressionAudit);
          cell_responsable.Controls.Add(droopDownResponsable);
 
          row.Cells.Add(cell_processName);
          row.Cells.Add(new TableCell() { Text = " ", Width = 20 });
          row.Cells.Add(cell_date);
          row.Cells.Add(new TableCell() { Text = " ", Width = 20 });
          row.Cells.Add(cell_progression);
          row.Cells.Add(new TableCell() { Text = " ", Width = 20 });
          row.Cells.Add(cell_responsable);
 
          tableAuditAdministration.Rows.Add(row);
 
          // .......
}
Nencho
Telerik team
 answered on 29 Jul 2013
12 answers
470 views
Hi,
how can I add *.chm extension to RadEditorProm Document Maganer so I was able to insert *.chm files using DocManager.
Ianko
Telerik team
 answered on 29 Jul 2013
9 answers
395 views
All:

I've been going back and forth with support a bit on this issue (we are having trouble understanding each other I think), but thought I would post this here as well since I am scheduled to go into production with an applciation that is having this issue.  I was hoping that someone may have a workaround since I am reluctant to roll out my app with this problem.  We incorporated some of the new controls in Q1 2013 in our project and don't want to have to roll those back. 

I have reproduced this easily in another application as an example.

I noticed that with Q1 2013, when an unhandled server exception occurs during an Ajax callback, a script error occurs in a Microsoft Ajax script function which then causes Javascript processing to stop.  The result is that my own error handling on the client doesn't function, neither does the ending client event on the RadAjaxManager, so everything just comes to a halt.

This only occurs when RadFormDecorator is on the page (regardless of what controls are decorated).  If I remove the RadFormDecorotar, everything is fine.

Here is the code for the .asp page nd the code for the code-behind, where all I am doing is throwing an exception to simulate an unhandled exception on the server.  In IE9, the loading panel will never go away and you can see the script error in the debugger.  In other browsers, like Chrome, you can see the error, but the loading panel does disappear, so it is not as obvious.

I'm also including where the script error occurs: on the line "oldIds = upData.oldUpdatePanelIDs"....the error is that oldUpdatePanelIDs is null.  The snippet for that code is below too from the debugger.

Lastly, here is a video that clearly demonstrates the issue, as well as shows that Q3 2012 did not do this, so it appears to be a breaking change.
http://www.youtube.com/watch?v=1FuNEoNWBec

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication2.WebForm1" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager runat="server" ID="ScriptManager"></asp:ScriptManager>
 
        <telerik:RadAjaxManager runat="server" ID="RadAjaxManager">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="btnTest">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="pnlAll" LoadingPanelID="LoadingPanel" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
 
        <telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel" BackColor="Black" Transparency="50"></telerik:RadAjaxLoadingPanel>
  
        <asp:Panel runat="server" ID="pnlAll">
            This is the test page.
            <br /><br /><br /><br />
            <asp:Button runat="server" ID="btnTest" Text="Test Me" />
        </asp:Panel>
 
        <telerik:RadFormDecorator Enabled="true" runat="server" ID="RadFormDecorator1" Skin="Default" DecoratedControls="Buttons"   />
         
    </form>
</body>
</html>


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
namespace WebApplication2
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        public WebForm1()
        {
            this.Init += WebForm1_Init;
        }
 
        void WebForm1_Init(object sender, EventArgs e)
        {
            btnTest.Click += btnTest_Click;
        }
 
        void btnTest_Click(object sender, EventArgs e)
        {
            throw new Exception("THis is a test") ;
        }
    }
}

Henrik
Top achievements
Rank 2
 answered on 29 Jul 2013
1 answer
155 views
I want to copy data from Excel and paste into the listview and split the list view as per the column copied from excel in javascript.

Daniel
Telerik team
 answered on 29 Jul 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?