We are using telerik old version which was using dll of rad controls.Now we are upgrading these controls to latest version of telerik and getting more code issue which was not working .
My following code is not working , So please let us know How we can fixed this issue.
Telerik.Web.UI.RadTreeView was unable to find an embedded skin with the name '~/RadControls/TreeView/Skins/Arrows/3DBlue'. Please, make sure that the skin name is spelled correctly and that you have added a reference to the Telerik.Web.UI.Skins.dll assembly in your project. If you want to use a custom skin, set EnableEmbeddedSkins=false.
<telerik:RadTreeView ID="rtvTopLeftPatientMenu" Skin="Arrows/3DBlue"
runat="server" OnNodeClick="rtvTopLeftPatientMenu_NodeClick"
BeforeClientToggle = "BeforeToggleHandler" BeforeClientClick = "BeforeClientClick" >
</telerik:RadTreeView>
We are using telerik old version which was using dll of rad controls.Now we are upgrading these controls to latest version of telerik and getting more code issue which was not working .
My following code is not working , So please let us know How we can fixed this issue.
'Telerik.Web.UI.RadEditor' does not contain a definition for 'ConvertToLower' and 'FileEncoding' .
Telerik.Web.UI.RadEditor rd = new Telerik.Web.UI.RadEditor();
rd.ConvertToLower = true; ----------error
rd.FileEncoding = 65001; //UTF8 --------error
rd.Html = sMessage;
sMessage = rd.Text;
I have added telerik:RadDatePicker in a gridView. Its fetching results and calender as expected. But when i am exporting to excel. I am getting error.
Server Error in '/' Application.
Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.
Source Error:
Line 121:
Line 122: // render the table into the htmlwriter Line 123: table.RenderControl(htw); Line 124:
Line 125: // render the htmlwriter into the response
Source File: \App_Code\GridViewExportUtil.cs Line: 123
Stack Trace:
[InvalidOperationException: Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.]
Telerik.Web.UI.ScriptRegistrar.GetScriptManager(Control control) +161
Telerik.Web.UI.RadWebControl.RegisterScriptDescriptors() +39
I have a RadGrid with SEO Paging and Routing turned on. I'm using the NextPrevNumericAndAdvanced mode with TopAndBottom position.
When entering a custom page number (i.e. page 33 of 66) and click on the go button it just goes to the current page.
The individual page number buttons are fine (except the CSS issue I've reported before) and go to the correct page.
I followed the attached example to create a RegularExpressionValidator for a input.
I have 3 inputs (2 DateTimePicker & 1 RadTextBox" and 5 "RadButton") to operate several actions. I now want that only the click on 3 of my 5 buttons make the validation of a specific "RadTextBox" because its an extra that is not always used.
Now, no matter which button I press I get the check for the RadTextBox and Error message presented.
Is there a filter or specification tag that I can use, that the RegularExpressionValidator use only my selected buttons?
(C#; VS2015; ASP 4.5; Win 7; UI for ASP.net AJAX latest Version)
Thanks
Attachment:
http://docs.telerik.com/devtools/aspnet-ajax/controls/input/radtextbox/limiting-allowable-values
Hello,
I have one telerik radgrid with EditFormSttings and i have two fields (ID="editCodEmp" e ID="editNIFFilho") where (Enabled="false"). In code behind i need make (enable="true"), how?
My Code Behind:
protected void Insert_Click(object source, EventArgs e)//Telerik.Web.UI.GridItemEventArgs
{
try
{
error.Style["Display"] = "none";
success.Style["Display"] = "none";
how to access "editCodEmp"?
how to access "editNIFFilho"?
CTGrid.MasterTableView.IsItemInserted = true;
CTGrid.MasterTableView.Rebind();
}
}
catch (Exception ex)
{
Logger.FillLog(ex, Session["Username"].ToString(), Session["Produto"].ToString(), "Insert_Click");
error.Style["Display"] = "block";
errorMessage.Text = ConfigurationManager.AppSettings["genericError"].ToString();
}
}
My Code ASPX:
<telerik:RadGrid ID="CTGrid" AllowSorting="true" AutoGenerateColumns="false" PageSize="10"
AllowPaging="true" AllowMultiRowSelection="true" runat="server" GridLines="None"
Width="100%" Skin="TicketBlue" EnableEmbeddedSkins="false" OnItemDataBound="CTGrid_ItemDataBound"
OnUpdateCommand="CTGrid_UpdateCommand" OnInsertCommand="CTGrid_InsertCommand"
OnDeleteCommand="CTGrid_DeleteCommand" OnItemCreated="CTGrid_ItemCreated">
<MasterTableView Width="100%" Summary="RadGrid table" EditMode="EditForms" HierarchyLoadMode="Client"
ExpandCollapseColumn-Display="false" InsertItemDisplay="Top" DataKeyNames="id,NIFFilho, DescricaoEstado, DataRegisto">
<DetailTables>
..........
<EditFormSettings EditFormType="Template">
<FormTemplate>
<table align="left" width="100%" class="editTemplate">
<tr>
<td>
Nº Contribuinte *
</td>
<td>
<asp:TextBox ID="editCodEmp" Width="70px" CssClass="editFields" MaxLength="9" Enabled="false" runat="server" Text='<%# Bind("CodEmp") %>'></asp:TextBox>
</td>
<td>
Nome do Funcionário *
</td>
<td>
<asp:TextBox ID="editNomeFuncionario" Width="250px" CssClass="editFields" MaxLength="40" runat="server"
Text='<%# Bind("NomeFuncionario") %>'></asp:TextBox>
</td>
<td>
Nome a gravar no Cartão *
</td>
<td>
<asp:TextBox ID="editNomeGravar" Width="160px" CssClass="editFields" MaxLength="21" runat="server" Text='<%# Bind("NomeGravar") %>'></asp:TextBox>
</td>
</tr>
<asp:PlaceHolder ID="PlaceHolder1" runat="server" OnLoad="MakeVisibleOrNot">
<tr id = "CartaoFilhos" runat = "server">
<td>
Nº Contr. Filho *
</td>
<td>
<asp:TextBox ID="editNIFFilho" Width="70px" Enabled="False" CssClass="editFields" MaxLength="9" runat="server"
Text='<%# Bind("NIFFilho") %>'></asp:TextBox>
</td>
...........
<tr>
<td colspan="8">
<br />
* Campos obrigatórios
</td>
</tr>
<tr>
<td align="left" colspan="6">
<asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Gravar" : "Gravar" %>'
runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
</asp:Button>
<asp:Button ID="btnCancel" Text="Cancelar" runat="server" CausesValidation="False"
CommandName="Cancel"></asp:Button>
</td>
</tr>
<asp:HiddenField ID="id" runat="server" Value='<%# Bind( "id") %>' />
</table>
</FormTemplate>
</EditFormSettings>
</MasterTableView>
I need to validate that the minimum date to select is equal to 6 months before the current date.
For example: Today's date = 21.10.2015
this.dt_Date.MaxDate = DateTime.Now; so
MinDate = 04.21.2015
I have a radgrid that I am dynamically creating in the Page_Init method as mentioned here. I have multiple templated columns that dispaly a label in the ItemTemplate and a RadComboBox and RadTimePicker in the EditItemTemplate. Both are properly displayed. However, on editing in batch mode, I am only able to get the value of the radcombobox and not of the time picker. I have noticed that the DataBinding events of my EditItemTemplate controls do not fire at all. Even the overridden ExtractValues method doesnt hit my breakpoint. Have attached the code..Any help is appreciated.
public
class
MyItemTemplate : IBindableTemplate
{
protected
Label lblProj;
private
string
colName;
public
MyItemTemplate(
string
cName)
{
colName = cName;
}
public
void
InstantiateIn(System.Web.UI.Control container)
{
lblProj =
new
Label();
lblProj.ID =
"ProjTime_"
+ colName;
lblProj.Width = Unit.Pixel(140);
lblProj.DataBinding +=
new
EventHandler(lblProj_DataBinding);
container.Controls.Add(lblProj);
}
void
lblProj_DataBinding(
object
sender, EventArgs e)
{
Label lblProj = (Label)sender;
GridDataItem container = (GridDataItem)lblProj.NamingContainer;
lblProj.Text = ((DataRowView)container.DataItem)[colName].ToString();
}
public
IOrderedDictionary ExtractValues(Control container)
{
OrderedDictionary values =
new
OrderedDictionary();
return
values;
}
}
public
class
MyEditTemplate : ITemplate
{
protected
RadComboBox PDay;
protected
static
string
date;
protected
static
string
time;
protected
RadTimePicker PTime;
private
string
colName;
public
MyEditTemplate(
string
cName)
{
colName = cName;
}
public
IOrderedDictionary ExtractValues(Control container)
{
//breakpoint here doesnt get hit
OrderedDictionary values =
new
OrderedDictionary();
return
values;
}
public
void
InstantiateIn(System.Web.UI.Control container)
{
PDay =
new
RadComboBox();
PDay.ID =
"PDay_"
+ colName;
PDay.Width = Unit.Pixel(150);
PDay.AllowCustomText =
true
;
PDay.DataBinding +=
new
EventHandler(PDay_DataBinding);
//adding Items to PDay.Items here
PTime =
new
RadTimePicker();
PTime .ID =
"PTime_"
+ colName;
PTime .Width = Unit.Pixel(100);
PTime .DataBinding +=
new
EventHandler(PTime_DataBinding);
PTime .DateInput.ReadOnly =
true
;
container.Controls.Add(PDay);
container.Controls.Add(PTime );
}
void
PTime_DataBinding(
object
sender, EventArgs e)
{
//breakpoint here doesnt get hit
RadTimePicker timePicker = (RadTimePicker)sender;
GridDataItem container = (GridDataItem)timePicker.NamingContainer;
timePicker.SelectedDate = Convert.ToDateTime(((DataRowView)container.DataItem)[colName].ToString());
}
public
void
PDay_DataBinding(
object
sender, EventArgs e)
{
//breakpoint here doesnt get hit
RadComboBox cBox = (RadComboBox)sender;
GridDataItem container = (GridDataItem)cBox.NamingContainer;
cBox.Text = ((DataRowView)container.DataItem)[colName].ToString();
}
}
<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Register Tagprefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2011.3.1115.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MyCustomUpload.aspx.cs" Inherits="LargeFileUploadSP.Layouts.LargeFileUploadSP.MyCustomUpload" DynamicMasterPageFile="~masterurl/default.master" %>
<
asp:Content
ID
=
"PageHead"
ContentPlaceHolderID
=
"PlaceHolderAdditionalPageHead"
runat
=
"server"
>
</
asp:Content
>
<
asp:Content
ID
=
"Main"
ContentPlaceHolderID
=
"PlaceHolderMain"
runat
=
"server"
>
<
telerik:RadProgressManager
ID
=
"Radprogressmanager1"
runat
=
"server"
/>
<
table
>
<
tr
>
<
td
>
<
telerik:RadUpload
ID
=
"RadUpload1"
runat
=
"server"
/>
</
td
>
<
td
>
<
div
>
<
asp:Label
ID
=
"labelNoResults"
runat
=
"server"
Visible
=
"True"
>No uploaded files yet</
asp:Label
>
<
asp:Repeater
ID
=
"repeaterResults"
runat
=
"server"
Visible
=
"False"
>
<
HeaderTemplate
>
<
div
>Uploaded files in the target folder:</
div
>
</
HeaderTemplate
>
<
ItemTemplate
>
<%#DataBinder.Eval(Container.DataItem, "FileName")%>
<%#DataBinder.Eval(Container.DataItem, "ContentLength").ToString() + " bytes"%>
<
br
/>
</
ItemTemplate
>
</
asp:Repeater
>
</
div
>
</
td
>
</
tr
>
</
table
>
<
div
class
=
"submitArea"
>
<
asp:Button
runat
=
"server"
ID
=
"SubmitButton"
Text
=
"Upload files"
OnClick
=
"SubmitButton_Click"
/>
</
div
>
<
telerik:RadProgressArea
runat
=
"server"
ID
=
"ProgressArea1"
>
</
telerik:RadProgressArea
>
</
asp:Content
>
<
asp:Content
ID
=
"PageTitle"
ContentPlaceHolderID
=
"PlaceHolderPageTitle"
runat
=
"server"
>
My custom upload page
</
asp:Content
>
<
asp:Content
ID
=
"PageTitleInTitleArea"
ContentPlaceHolderID
=
"PlaceHolderPageTitleInTitleArea"
runat
=
"server"
>
My custom upload page
</
asp:Content
>
using
System;
using
Microsoft.SharePoint;
using
Microsoft.SharePoint.WebControls;
using
System.Web.UI;
using
Telerik.Web.UI;
namespace
LargeFileUploadSP.Layouts.LargeFileUploadSP
{
public
partial
class
MyCustomUpload : LayoutsPageBase
{
private
ScriptManager scriptManager;
protected
void
Page_Load(
object
sender, EventArgs e)
{
RadUpload1.TargetPhysicalFolder = @
"C:\telerik_uploads\"
;
}
protected
void
SubmitButton_Click(
object
sender, EventArgs e)
{
if
(RadUpload1.UploadedFiles.Count > 0)
{
repeaterResults.DataSource = RadUpload1.UploadedFiles;
repeaterResults.DataBind();
labelNoResults.Visible =
false
;
repeaterResults.Visible =
true
;
}
else
{
labelNoResults.Visible =
true
;
repeaterResults.Visible =
false
;
}
}
}
}
<
system.webServer
>
<
security
>
<
requestFiltering
allowDoubleEscaping
=
"true"
>
<
requestLimits
maxAllowedContentLength
=
"2147483647"
/>
</
requestFiltering
>
</
security
>
...
<
httpRuntime
maxRequestLength
=
"1024000"
executionTimeout
=
"3600"
/>
...
<
modules
runAllManagedModulesForAllRequests
=
"true"
>
...
<!-- For Telerik RadUpload control -->
<
add
name
=
"RadUploadHttpModule"
type
=
"Telerik.Web.UI.SPRadUploadHttpModule, Telerik.Web.UI, Version=2011.3.1115.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
preCondition
=
"integratedMode"
/>
</
modules
>
<
handlers
>
...
<!-- For Telerik RadUpload control -->
<
add
path
=
"Telerik.RadUploadProgressHandler.ashx"
type
=
"Telerik.Web.UI.RadUploadProgressHandler, Telerik.Web.UI, Version=2011.3.1115.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
verb
=
"*"
preCondition
=
"integratedMode"
name
=
"Telerik_RadUploadProgressHandler_ashx"
/>
</
handlers
>
</
system.webServer
>
<
location
path
=
"Telerik.RadUploadProgressHandler.ashx"
>
<
system.web
>
<
authorization
>
<
allow
users
=
"*"
/>
</
authorization
>
</
system.web
>
</
location
>
<
location
path
=
"WebResource.axd"
>
<
system.web
>
<
authorization
>
<
allow
users
=
"*"
/>
</
authorization
>
</
system.web
>
</
location
>
<
location
path
=
"Telerik.Web.UI.WebResource.axd"
>
<
system.web
>
<
authorization
>
<
allow
users
=
"*"
/>
</
authorization
>
</
system.web
>
</
location
>
<
section
name
=
"requestFiltering"
overridemodedefault
=
"Allow"
/>