<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TaskExport.aspx.cs" Inherits="EncControl.TaskExport" %> |
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
<html xmlns="http://www.w3.org/1999/xhtml"> |
<head id="Head1" runat="server"> |
<EncEventViewer:Title ID="ucTitle" runat="server" /> |
<link href="Styles.css" rel="stylesheet" type="text/css" /> |
</head> |
<body> |
<form id="frmMain" runat="server"> |
<telerik:RadScriptManager ID="radScriptMgr" runat="server"> |
</telerik:RadScriptManager> |
<script type="text/javascript" src="focus.js"></script> |
<telerik:RadFormDecorator ID="decoratorMain" runat="server" DecoratedControls="all" |
Skin="WebBlue"></telerik:RadFormDecorator> |
<table cellpadding="0" cellspacing="0" align="center" class="MainTable"> |
<EncEventViewer:Header ID="ucHeader" runat="server" /> |
<tr> |
<td class="MainMenu"> |
<EncEventViewer:Menu ID="ucMenu" runat="server" /> |
</td> |
<td class="MainWorkArea"> |
<!-- This is the main work area customized for each page --> |
<telerik:RadAjaxPanel ID="radAjaxPanel" runat="server"> |
<table cellpadding="2px" cellspacing="0" align="center" class="PageText"> |
<tr> |
<td> |
<br /> |
<asp:Label ID="lblPageHeader" runat="server" CssClass="ParagraphHeader" Text="Export Issue"></asp:Label><br /> |
<asp:Label ID="lblPageText" runat="server" CssClass="ParagraphBody" Text="This export may take a few minutes and will include the following components. You may remove any unwanted items from the Export."></asp:Label> |
</td> |
</tr> |
</table> |
<br /> |
<asp:Panel ID="pnlAddIssue" runat="server" Visible="true" DefaultButton="btnSave"> |
<table cellpadding="2px" cellspacing="0" align="center" class="FormTable"> |
<tr> |
<td class="FormHeader" colspan="2"> |
<asp:Label ID="lblFormHeader" runat="server" CssClass="FormHeaderLabel" Text="Export Issue"></asp:Label> |
</td> |
</tr> |
<tr> |
<td align="right" class="FormPrimary" width="200px"> |
<asp:Label ID="Label1" runat="server" CssClass="ControlLabel" Text="Default Data: "></asp:Label> |
</td> |
<td align="left" class="FormPrimary" width="350px"> |
<asp:CheckBox ID="chkDefault" runat="server" Checked="true" Enabled="false" Text="Export Default Data" /> |
</td> |
</tr> |
<tr> |
<td align="right" class="FormSecondary" width="200px"> |
<asp:Label ID="Label2" runat="server" CssClass="ControlLabel" Text="Next Steps:"></asp:Label> |
</td> |
<td align="left" class="FormSecondary" width="350px"> |
<asp:CheckBox ID="chkNextSteps" runat="server" Checked="true" Text="Export Next Steps" /> |
</td> |
</tr> |
<tr> |
<td align="right" class="FormPrimary" width="200px"> |
<asp:Label ID="Label3" runat="server" CssClass="ControlLabel" Text="Resolutions:"></asp:Label> |
</td> |
<td align="left" class="FormPrimary" width="350px"> |
<asp:CheckBox ID="chkResolutions" runat="server" Checked="true" Text="Export Resolutions" /> |
</td> |
</tr> |
<tr> |
<td align="right" class="FormSecondary" width="200px"> |
<asp:Label ID="Label4" runat="server" CssClass="ControlLabel" Text="Notes:"></asp:Label> |
</td> |
<td align="left" class="FormSecondary" width="350px"> |
<asp:CheckBox ID="chkExportNotes" runat="server" Checked="true" Text="Export Notes" /> |
</td> |
</tr> |
<tr> |
<td align="right" class="FormPrimary" width="200px"> |
<asp:Label ID="lblAttachmentsLabel" runat="server" CssClass="ControlLabel" Text="Attachments:"></asp:Label> |
</td> |
<td align="left" class="FormPrimary" width="350px"> |
<asp:CheckBox ID="chkAttachments" runat="server" Checked="true" Text="Export Attachments" /> |
</td> |
</tr> |
<tr> |
<td align="right" class="FormSecondary" width="200px"> |
<asp:Label ID="Label5" runat="server" CssClass="ControlLabel" Text="Notifications:"></asp:Label> |
</td> |
<td align="left" class="FormSecondary" width="350px"> |
<asp:CheckBox ID="chkNotifications" runat="server" Checked="true" Text="Export Email Notifications" /> |
</td> |
</tr> |
<tr> |
<td align="right" class="FormPrimary" width="200px"> |
<asp:Label ID="Label6" runat="server" CssClass="ControlLabel" Text="Business Units:"></asp:Label> |
</td> |
<td align="left" class="FormPrimary" width="350px"> |
<asp:CheckBox ID="chkBusinessUnits" runat="server" Checked="true" Text="Export Associated Business Units" /> |
</td> |
</tr> |
<tr> |
<td align="right" class="FormSecondary" width="200px"> |
<asp:Label ID="Label7" runat="server" CssClass="ControlLabel" Text="User Groups:"></asp:Label> |
</td> |
<td align="left" class="FormSecondary" width="350px"> |
<asp:CheckBox ID="chkUserGroups" runat="server" Checked="true" Text="Export Associated User Groups" /> |
</td> |
</tr> |
<tr> |
<td align="right" class="FormPrimary" width="200px"> |
<asp:Label ID="Label8" runat="server" CssClass="ControlLabel" Text="Associated Issues:"></asp:Label> |
</td> |
<td align="left" class="FormPrimary" width="350px"> |
<asp:CheckBox ID="chkAssociatedIssues" runat="server" Checked="true" Text="Export Associated Issues" /> |
</td> |
</tr> |
<tr> |
<td align="right" class="FormSecondary" width="200px"> |
<asp:Label ID="Label9" runat="server" CssClass="ControlLabel" Text="Events:"></asp:Label> |
</td> |
<td align="left" class="FormSecondary" width="350px"> |
<asp:CheckBox ID="chkEvents" runat="server" Checked="true" Text="Export Associated Events" /> |
</td> |
</tr> |
<tr> |
<td align="right" class="FormPrimary" width="200px"> |
<asp:Label ID="Label10" runat="server" CssClass="ControlLabel" Text="Associated Tasks:"></asp:Label> |
</td> |
<td align="left" class="FormPrimary" width="350px"> |
<asp:CheckBox ID="chkRelatedTasks" runat="server" Checked="true" Text="Export Associated Tasks" /> |
</td> |
</tr> |
<tr> |
<td align="right" class="FormSecondary" width="200px"> |
<asp:Label ID="Label11" runat="server" CssClass="ControlLabel" Text="Issue History:"></asp:Label> |
</td> |
<td align="left" class="FormSecondary" width="350px"> |
<asp:CheckBox ID="chkIssueHistory" runat="server" Checked="true" Text="Export Issue History" /> |
</td> |
</tr> |
<tr> |
<td class="FormFooter" colspan="2" height="25px"> |
<asp:Button ID="btnExport" runat="server" Text="Export" CssClass="Control" OnClick="btnExport_Click" |
Width="125px" /> |
<asp:Button ID="btnCancel" runat="server" Text="<Back" CssClass="Control" OnClick="btnCancel_Click" |
CausesValidation="false" Width="125px" /> |
</td> |
</tr> |
</table> |
<table> |
<tr> |
<td> |
<telerik:RadEditor ID="TaskExportEditor" runat="server" SkinID="DefaultSetOfTools" |
OnExportContent="TaskExportEditor_ExportContent"> |
<ExportSettings OpenInNewWindow="true" /> |
</telerik:RadEditor> |
</td> |
</tr> |
</table> |
</asp:Panel> |
</telerik:RadAjaxPanel> |
<!-- This is the end of the main work area --> |
<br /> |
</td> |
</tr> |
<EncEventViewer:Footer ID="ucFooter" runat="server" /> |
</table> |
</form> |
</body> |
</html> |
using System; |
using System.Collections.Generic; |
using System.Linq; |
using System.Web; |
using System.Web.UI; |
using System.Web.UI.WebControls; |
using System.IO; |
using Telerik.Web.UI; |
namespace EncControl |
{ |
public partial class TaskExport : System.Web.UI.Page |
{ |
protected void Page_Load(object sender, EventArgs e) |
{ |
TaskExportEditor.Content = "Some content to export to a PDF"; |
} |
// the following line is generating a compile error |
protected void TaskExportEditor_ExportContent(object sender, Telerik.Web.UI.EditorExportingArgs e) |
{ |
TaskExportEditor.ExportSettings.FileName = "TaskExport"; |
string url = String.Format("~/{0}.pdf", TaskExportEditor.ExportSettings.FileName); |
string path = Server.MapPath(url); |
if (File.Exists(path)) |
{ |
File.Delete(path); |
} |
using (FileStream fs = File.Create(path)) |
{ |
Byte[] info = System.Text.Encoding.Default.GetBytes(e.ExportOutput); |
fs.Write(info, 0, info.Length); |
} |
} |
protected void btnExport_Click(object sender, EventArgs e) |
{ |
TaskExportEditor.ExportToPdf(); |
} |
} |
} |
Hello,
I have ComboBox:
<telerik:RadComboBox ID="RadComboBox_Branze" runat="server" DataTextField="NAZWA_BRANZA" DataValueField="idTB_BRANZA" EnableLoadOnDemand="True" OnItemsRequested="RadComboBox_Branze_ItemsRequested" Width="300px" ><CollapseAnimation Duration="200" Type="OutQuint" /></telerik:RadComboBox>
In properties of RadComboBox I set:
DataTextField="businesslinename"
DataValueField="id_businessline"
where businesslinename is string value and id_businessline is int value, both retrieved from database
C# method to fill combo:
protected
void RadComboBox_Branze_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
{
if (e.Text.Length > 3)
{
RadComboBox combo = (RadComboBox)o;
combo.Items.Clear();
string sql = "select * from tb_branza where nazwa_branza like '%" + e.Text + "%' AND idTB_JEZYK=1";
//SqlDataSource1
SqlDataAdapter adapter = new SqlDataAdapter(sql, SqlDataSource1.ConnectionString.ToString());
DataTable data = new DataTable();
adapter.Fill(data);
try
{
int itemsPerRequest = 100;
int itemOffset = e.NumberOfItems;
int endOffset = itemOffset + itemsPerRequest;
if (endOffset > data.Rows.Count)
{
endOffset = data.Rows.Count;
}
if (endOffset == data.Rows.Count)
{
e.EndOfItems =
true;
}
else
{
e.EndOfItems =
false;
}
for (int i = itemOffset; i < endOffset; i++)
{
RadComboBox_Branze.Items.Add(
new RadComboBoxItem(data.Rows[i]["nazwa_branza"].ToString(), data.Rows[i]["nazwa_branza"].ToString()));
}
if (data.Rows.Count > 0)
{
e.Message =
String.Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", endOffset.ToString(), data.Rows.Count.ToString());
}
else
{
e.Message =
"No matches";
}
}
catch
{
e.Message =
"No matches";
}
}
}
I have got Button to submit method:
protected void btn_DodajBranze_Click(object sender, EventArgs e)
{
TextBox1.Text = RadComboBox_Branze.SelectedValue;
//DodajBranze(id_zamowienie_dns);
}
The problem is that I get DataTextField="businesslinename" instead DataValueField="id_businessline" into my TextBox1. How to retrieve a value from RadComboBox instead of text.
Best Regards
Dariusz Tomoń
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
|
[ArgumentOutOfRangeException: Height must be non negative. Parameter name: value] System.Web.UI.WebControls.Style.set_Height(Unit value) +8694900 System.Web.UI.WebControls.WebControl.set_Height(Unit value) +30 Telerik.Web.UI.AppointmentControl.CalculateSize() +234 Telerik.Web.UI.DayViewAppointmentControl.CalculateSize() +45 Telerik.Web.UI.Scheduler.Views.RowBuilder..ctor(IList`1 slotList, Int32 maxColumnWidth) +709 Telerik.Web.UI.Scheduler.Views.Week.RendererBase.CreateViewRows(IList`1 slotLists) +161 Telerik.Web.UI.Scheduler.Views.Week.RendererBase.CreateInnerContentTable(Control container, IList`1 slotLists) +101 Telerik.Web.UI.Scheduler.Views.Week.Renderer.GetInnerContent() +144 Telerik.Web.UI.Scheduler.Views.Week.Renderer.GetContent() +93 Telerik.Web.UI.RadScheduler.CreateContent() +122 Telerik.Web.UI.RadScheduler.CreateChildControls(Boolean bindFromDataSource) +106 Telerik.Web.UI.RadScheduler.CreateChildControls() +10 System.Web.UI.Control.EnsureChildControls() +102 Telerik.Web.UI.RadScheduler.SaveViewState() +20 System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +50 System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148 System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148 System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148 System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148 System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148 System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148 System.Web.UI.Page.SaveAllState() +194 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2839 |
Hi,
We have development a web app in .Net 4.0, AjaxControlToolKit 3.0.20820.0 and Telerik 2010.3.1215.40. When the app is running under SSL, we get security warining message only from IE8 ( FF, IE7 works fine). I have verified all links are relative and starts with https (I have used http watch). Do I have to setup/update any component?
Please advice.
-Prashanthan
Update 1: I have removed AjaxControlToolKit reference, used RadAjaxPanel instead of update panel and still I am getting the security warning message in IE8. Also, I have tried securitySwitch, customer httpmodule to redirect any request with http to https, and no luck. I have verified http watch, firebug and fiddler 2, and no request are made in http.
Update 2: I have moved the radgrid outside the RadAjaxPanel and now it doesn't show any warning in IE8. Any postback within RadAjaxPanel does show the warning message.
Any help regards this issue is appreciated.