Hi,
I'd like to know if Telerik has any component or some tutorial/demo to sign a PDF with a certificate.
I found this tutorial: http://demos.telerik.com/aspnet-ajax/editor/examples/import-export/pdf-export/defaultcs.aspx to generate a PDF, but I can't find a way to sign this file with a certificate.
Is there any way or any Telerik's component to do this task?
This would be required to be used on web pages, at the moment ASP.Net or MVC are both acceptable.
Thanks,
Adriano Gaspar.
As shown in the examples I have implemented a Provider for the Gantt chart. The provider appears to be working, when I break through it the methods are called, items are inserted, updated and deleted in the database etc. Both GetTasks and GetDependencies return an ITask list. The problem I'm having is that nothing appears in the Gantt chart (it loads with no Tasks showing).
When I add new Tasks those will show (and are added to the database) and I can update them etc. After a page refresh they also no longer show.
Here is the provider implementation, GetById returns a DataSet and Mutate returns an object containing the ID of inserted item + success/error info:
public class GanttCustomProvider : GanttProviderBase { private long _projectId; private string _connString; public GanttCustomProvider(long projectId, string connString) : base() { _projectId = projectId; _connString = connString; } public override ITaskFactory TaskFactory { get { return new CustomGanttTaskFactory(); } } public override List<ITask> GetTasks() { using (var client = new FunctionsClient()) { var source = client.GetById(new Phase { PROJECT_ID = _projectId, ConnectionString = _connString }) .Tables[0].AsEnumerable(); var list = source.Select(row => new CustomTask { ID = row["ID"], ParentID = row["PARENT"], Title = row["TITLE"].ToString(), Start = (DateTime)row["START_DATE"], End = (DateTime)row["END_DATE"], Summary = (bool)row["SUMMERY"], OrderID = row["ORDER_ID"], Expanded = (bool)row["EXPANDED"], PercentComplete = Decimal.Parse(row["PERCENTCOMPLETE"].ToString()), Time = (double)row["TIME"] }).ToList<ITask>(); return list; } } public override ITask InsertTask(ITask t) { var task = (CustomTask)t; using (var client = new FunctionsClient()) { task.ID = client.Mutate(new Phase { PROJECT_ID = _projectId, PARENT = (int?)task.ParentID, TITLE = task.Title, START_DATE = task.Start, END_DATE = task.End, SUMMERY = task.Summary, ORDER_ID = (int?)task.OrderID, EXPANDED = task.Expanded, Mode = Modes.Insert, ConnectionString = _connString }).returnID; return task; } } public override ITask UpdateTask(ITask t) { var task = (CustomTask)t; using(var client = new FunctionsClient()) { client.Mutate(new Phase { ID = (int)task.ID, PARENT = (int?)task.ParentID, PROJECT_ID = _projectId, TITLE = task.Title, START_DATE = task.Start, END_DATE = task.End, SUMMERY = task.Summary, ORDER_ID = (int)task.OrderID, EXPANDED = task.Expanded, TIME = task.Time, Mode = Modes.Update, ConnectionString = _connString }); } return task; } public override ITask DeleteTask(ITask task) { using (var client = new FunctionsClient()) { client.Mutate(new Phase { ID = (int)task.ID, Mode = Modes.Delete, ConnectionString = _connString }); return task; } } public override List<IDependency> GetDependencies() { using (var client = new FunctionsClient()) { var source = client.GetById(new PhaseDependency { ProjectID = _projectId, ConnectionString = _connString }) .Tables[0].AsEnumerable(); var list = source.Select(row => new Dependency { ID = row["ID"], PredecessorID = row["PredecessorID"], SuccessorID = row["SuccessorID"], Type = (DependencyType)row["Type"] }).ToList<IDependency>(); return list; } } public override IDependency InsertDependency(IDependency dependency) { using (var client = new FunctionsClient()) { dependency.ID = client.Mutate(new PhaseDependency { PredecessorID = (int)dependency.PredecessorID, SuccessorID = (int)dependency.SuccessorID, Type = (int)dependency.Type, Mode = Modes.Insert, ConnectionString = _connString }).returnID; } return dependency; } public override IDependency DeleteDependency(IDependency dependency) { using(var client = new FunctionsClient()) { client.Mutate(new PhaseDependency { ID = (int)dependency.ID, Mode = Modes.Delete, ConnectionString = _connString }); } return dependency; }}Here are the implementations of the Custom Task and Factory:
public class CustomTask : Task { public CustomTask() : base() { } public double? Time { get { return (double?)(ViewState["Time"] ?? (double?)null); } set { ViewState["Time"] = value; } } protected override IDictionary<string, object> GetSerializationData() { var dict = base.GetSerializationData(); dict["Time"] = Time; return dict; } public override void LoadFromDictionary(System.Collections.IDictionary values) { base.LoadFromDictionary(values); Time = values["Time"] == null ? (float?)null : float.Parse(values["Time"].ToString()); } } public class CustomGanttTaskFactory : ITaskFactory { Task ITaskFactory.CreateTask() { return new CustomTask(); } }
And finally the Page the Gantt is on:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GanttTest.aspx.cs" Inherits="GanttTest" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<telerik:RadScriptManager runat="server" />
<telerik:RadGantt runat="server" id="rgPlanning" AutoGenerateColumns="false" >
<YearView UserSelectable="True" />
<Columns>
<telerik:GanttBoundColumn DataField="Title" DataType="String" Width="100px" HeaderText="Title"/>
<telerik:GanttBoundColumn DataField="Start" DataType="DateTime" DataFormatString="dd/MM/yy" Width="100px" HeaderText="Start"/>
<telerik:GanttBoundColumn DataField="End" DataType="DateTime" DataFormatString="dd/MM/yy" Width="100px" HeaderText="End"/>
<telerik:GanttBoundColumn DataField="Time" DataType="Number" Width="100px" UniqueName="Time" HeaderText="Hours"/>
</Columns>
<CustomTaskFields>
<telerik:GanttCustomField PropertyName="Time" Type="Number" ClientPropertyName="time"/>
</CustomTaskFields>
</telerik:RadGantt>
</div>
</form>
</body>
</html>
And code behind:
public partial class GanttTest : Page { private long? projectID = 3; private string connString = "Connectionstring"; protected void Page_Load(object sender, EventArgs e) { rgPlanning.Provider = new GanttCustomProvider(projectID.Value, connString); } }project using RadClientDataSource to binding RadDropdownTree control using WebService WCF. Load data is ok.
This my code:
.aspx:
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<telerik:RadClientDataSource ID="RadClientDataSource1" runat="server"
AllowBatchOperations="True">
<ClientEvents OnCustomParameter="ParameterMap" OnDataParse="Parse" />
<DataSource>
<WebServiceDataSourceSettings BaseUrl="UserInfoService.svc/">
<Select Url="GetDonVis" DataType="JSON" RequestType="Post" ContentType="application/json; charset=utf-8" />
</WebServiceDataSourceSettings>
</DataSource>
<Schema>
<Model>
<telerik:ClientDataSourceModelField FieldName="MaDonVi" DataType="String" />
<telerik:ClientDataSourceModelField FieldName="TenDonVi" DataType="String" />
<telerik:ClientDataSourceModelField FieldName="ParentId" DataType="String" />
</Model>
</Schema>
</telerik:RadClientDataSource>
<telerik:RadDropDownTree RenderMode="Classic" EnableFiltering="true" ID="RadDropDownTree1" runat="server"
DropDownSettings-Height="220px" Width="100%" DropDownSettings-CloseDropDownOnSelection="true"
ClientDataSourceID="RadClientDataSource1" DataTextField="TenDonVi"
DataValueField="MaDonVi" DataFieldID="MaDonVi"
DataFieldParentID="ParentId" Skin="Office2007">
<CollapseAnimation Type="None" />
</telerik:RadDropDownTree>
WebService:
[WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json)]
[OperationContract]
public CustomersResult GetDonVis()
{
//Doc data tu DB
SqlConnection sqlConnection = new SqlConnection();
try
{
sqlConnection.ConnectionString = "SERVER=localhost;Database=LongBien;UID=sa;PWD=abcde12345-;";
sqlConnection.Open();
SqlDataAdapter da = new SqlDataAdapter("SELECT * FROM tblDmDonVi;", sqlConnection);
DataTable dataTable = new DataTable("DonVi");
da.Fill(dataTable);
da.Dispose();
List<ServiceDonVi> result = new List<ServiceDonVi>();
foreach (DataRow dataRow in dataTable.Rows)
{
ServiceDonVi donVi = new ServiceDonVi();
donVi.MaDonVi = dataRow["MaDonVi"].ToString();
donVi.TenDonVi = dataRow["TenDonVi"].ToString();
if (dataRow["ParentId"] != DBNull.Value)
{
donVi.ParentId = dataRow["ParentId"].ToString();
}
result.Add(donVi);
}
dataTable.Dispose();
CustomersResult a = new CustomersResult();
a.Data = result;
a.Count = 100;
return a;
}
catch (Exception exception)
{
throw;
}
finally
{
sqlConnection.Close();
sqlConnection.Dispose();
}
}
But I has problem:
1. When addnew data item -> save data in database is ok. (Example: value selected = 5)
2. When edit this item, how to set selected item keep old value (value = 5) has save in database???
i am using TabStrip with RadMultiPage.
these tabs share the save asp:Button. i would like to know is it possible to trigger the validationgroup base on the current selected tab?
for example i have 3 tabs
Tab 1 - Validation group: "validateIntro"
Tab 2 - Validation group: "validateBody"
Tab 3 - Validation group: "validateFinal"
so when user is on tab 1 and click on the Next button, only validateIntro should fire, similarly when user is on tab 2 only validateBody should fire
hi.
i would like to check how do i enable the "Select" button when the validation fails?
my current mock up is as such
1.<telerik:RadAsyncUpload RenderMode="Lightweight" MultipleFileSelection="Disabled" MaxFileSize="500000" OnClientValidationFailed="validationFailed" AllowedFileExtensions="jpg,jpeg,png" MaxFileInputsCount="1" runat="server" ID="fileCourseImage" PostbackTriggers="btnSubmit">2.</telerik:RadAsyncUpload>
Hi,
I have a radgrid with EditMode​ = "Popup" and EditType = "WebUserControl"
I can set some parameters of the PopUp using javascript:
var popUp;function ShowPopUp(sender, args) { popUp = args.get_popUp(); popUp.style.height = "auto"; popUp.style.width = "680px"; popUp.style.left = ((window.innerWidth - 680) / 2).toString() + "px"; popUp.style.top = ((window.innerHeight - 515) / 2).toString() + "px";}But how can I modify the settings from the caption of the popup?
Settings like:
Height
FontSize
FontColor
BackColor
Thank you so much for attention! And sorry for my bad english!

In an existing vb.net 2010 web form that uses the radeditor, I want to know if I can make the radeditor invisibile and/or not usable for awhile when a particular webform page is displayed. I am asking that question since I want a user to work with a gridview control during the time the radeditor is not visible. I want to do this so I do not need to setup a new web form page just for the gridview control.
Thus can you tell me and/or show me how to make the radeditor invisible and most likely not usable at the same time. Also would you also then tell me how to make the radeditor visible and useable when I want to? There must be some properties that need to be set?
Hello,
We have a Rad grid with combination of Bound & Template columns in it.
For the first time when page gets loaded we are binding the Rad grid through server side Need Data Source handler.
In our case for page actions we are trying to bind the Rad grid from client side by calling Web Method via $.Ajax() function.
Everything works well w.r.t. Bound column but it seems Template column are not supported to bind data via client side.
We have tried many alternate ways to bind the template column at client side with no success.
Could someone please advise is there a workaround/better way to achieve the client side binding of Template column for Rad Grid?
<telerik:RadComboBox ID="MyRadCombo" runat="server" Skin="Office2007" MarkFirstMatch="True" Width="405px"> <Items> <telerik:RadComboBoxItem runat="server" Text="Action Date" Value="Action Date" /> <telerik:RadComboBoxItem runat="server" Text="Date Seized" Value="Date Seized" /> <telerik:RadComboBoxItem runat="server" Text="Date Soft" Value="Date Soft" /> <telerik:RadComboBoxItem runat="server" Text="Dispo Type" Value="Dispo Type" /> <telerik:RadComboBoxItem runat="server" Text="Dispo Kind" Value="Dispo Kind" /> </Items></telerik:RadComboBox>protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
MyRadCombo.Focus();
}

| protected void rgPeople_ItemCreated(object sender, GridItemEventArgs e) |
| { |
| if (e.Item is GridDataItem) |
| { |
| GridDataItem gridItem = e.Item as GridDataItem; |
| foreach (GridColumn column in rgPeople.MasterTableView.RenderColumns) |
| { |
| if (column is GridBoundColumn) |
| { |
| gridItem[column.UniqueName].ToolTip = gridItem.OwnerTableView.DataKeyValues[gridItem.ItemIndex]["pkEmployeeNumber"].ToString(); |
| } |
| } |
| } |
| } |
| <telerik:RadGrid ID="rgPeople" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" |
| GridLines="None" Skin="Simple" OnPreRender="rgPeople_PreRender" DataSourceID="sdsPeople" EnableLinqExpressions="False" |
| runat="server" OnItemCreated="rgPeople_ItemCreated"> |
| <MasterTableView AutoGenerateColumns="False" DataKeyNames="pkEmployeeNumber"> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px" /> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn> |
| <HeaderStyle Width="20px" /> |
| </ExpandCollapseColumn> |
| <Columns> |
| <telerik:GridHyperLinkColumn DataNavigateUrlFields="pkEmployeeNumber" SortExpression="firstName" |
| UniqueName="firstName" DataNavigateUrlFormatString="/people/profiles/?empno={0}" |
| HeaderText="First Name" DataTextField="firstName" DataType="System.String"> |
| </telerik:GridHyperLinkColumn> |
| <telerik:GridBoundColumn DataField="firstName" HeaderText="First Name" SortExpression="firstName" |
| UniqueName="firstNameSort" Display="false" DataType="System.String"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="lastName" HeaderText="Last Name" SortExpression="lastName" |
| UniqueName="lastName"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="positionDescription" HeaderText="Title" SortExpression="positionDescription" |
| UniqueName="positionDescription"> |
| </telerik:GridBoundColumn> |
| <intra:FilteringColumnPeople DataField="directorate" FilterControlWidth="180px" HeaderText="Directorate"> |
| <headerstyle width="15%" /> |
| <itemtemplate> |
| <%# Eval("directorate")%> |
| </itemtemplate> |
| </intra:FilteringColumnPeople> |
| <telerik:GridBoundColumn DataField="phone" HeaderText="Phone" SortExpression="phone" |
| UniqueName="phone"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="email" HeaderText="Email" SortExpression="email" |
| UniqueName="email"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="pkEmployeeNumber" HeaderText="pkEmployeeNumber" SortExpression="pkEmployeeNumber" |
| UniqueName="pkEmployeeNumber" Display="false"> |
| </telerik:GridBoundColumn> |
| </Columns> |
| </MasterTableView> |
| </telerik:RadGrid> |