Hi, I would like to display footer with total record. I am successfully display it. However, when i am export to pdf, the correct total show in the footer however, the export does not exporting all record even in the radgrid itself the record has more than one page. Please advise
private int parentAccountWithChildTotalCount = 0;
protected void ParentAccountGridWithChild_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridFooterItem)
{
GridFooterItem footer = (GridFooterItem)e.Item;
Label lblTotalRowCount = new Label();
lblTotalRowCount.Text = "Total Record: " + this.parentAccountWithChildTotalCount.ToString();
footer["Firstname"].Controls.Add(lblTotalRowCount);
}
}
public int ParentAccountWithChildTotalCount
{
set { parentAccountWithChildTotalCount = value; }
}
protected void ParentExportPDFButton_Click(object sender, EventArgs e)
{
ParentAccountWithChild.ExportSettings.ExportOnlyData = true;
ParentAccountWithChild.MasterTableView.ExportToPdf();
}
I am using a RadAsyncUpload control on a page that allows the user to send emails with attachments.
I have in place the work around found here
http://www.telerik.com/community/forums/aspnet-ajax/async-upload/known-issues-and-breaking-changes.aspx
My radscriptmanager is in the master page, here's my radasyncupload declaration
<tel:RadAsyncUpload
ID="fileUpload"
runat="server"
ReadOnlyFileInputs="true"
OnClientValidationFailed="onUploadFailed"
OnClientFileUploadFailed="onUploadFailed"
OnClientFileSelected="onFileSelected"
OnClientFileUploaded="onFileUploaded"
HttpHandlerUrl="~/Handlers/RadAsyncUploadWorkAround.ashx" />
In the code behind,
I have this in my onInit
fileUpload.FileUploaded += new FileUploadedEventHandler(uploaded);
fileUpload.TemporaryFolder = systemDocumentPathRoot;
//fileUpload.TargetFolder = systemDocumentPathFull;
fileUpload.Localization.Select = GetResourceString("Browse");
and for my uploaded method
List<string> fileNames = new List<string>();
public void uploaded(object sender, FileUploadedEventArgs args){
string fileName = @"DocumentFolder" + args.File.FileName;
args.File.SaveAs(fileName);
fileNames.Add(fileName);
}
on my SendButton event
System.Net.Mail.MailMessage message = new MailMessage("Zach.French@blackline.com", "Zach.French@Blackline.com", "test", "this is a test");
foreach(string fileName in fileNames)
message.Attachments.Add(new Attachment(fileName));
SmtpClient smtpClient = new SmtpClient();
smtpClient.Send(message);
for a small files it works fine
but when I tried a file at about 2MB or more it fails.
the file is uploaded to the correct temporary location.
When I click the send button and do the full postback, uploaded is called and the file is saved to the correct location
When the send button event is called, an exception is thrown on smtpClient.send(message).
the quick watch of the exception was print screened and is attached as exception.jpg
When I go to the file via the file explorer, and try to delete it I get an error message saying the file is in use (see fileinuse.jpg)
I believe the radasyncupload is still accessing the file or blocking it but I'm not sure.
Any help would be appreciated.
function pageLoad() { //get a reference to the needed controls - var manager = GetRadWindow().get_windowManager(); var tabStrip = $find("<%=RadTabStrip1.ClientID %>"); }