I using webservice popolate data on RadSchedule. But when build load Resourece, I want to pass some parameter to load list Resource in MySchedulerProvider. How to call and code example??? When I using using:
private MySchedulerInfo _customParameter = new MySchedulerInfo();
private IDictionary<int, Resource> _subjectId;
private IDictionary<int, Resource> SubjectId
{
get
{
if (_subjectId == null)
{
_subjectId = new Dictionary<int, Resource>();
foreach (Resource subjectId in LoadSubjectId(_customParameter.ClassId))
{
_subjectId.Add((int)subjectId.Key, subjectId);
}
}
return _subjectId;
}
}
public override IEnumerable<Appointment> GetAppointments(ISchedulerInfo shedulerInfo)
{
List<Appointment> appointments = new List<Appointment>();
MySchedulerInfo myInfo = shedulerInfo as MySchedulerInfo;
if(myInfo != null)
{
_customParameter = myInfo;
using (DbConnection conn = OpenConnection())
{
DbCommand cmd = DbFactory.CreateCommand();
if (cmd != null)
{
cmd.Connection = conn;
cmd.CommandText = "SELECT [Id],[Class_Id],[School_Id],[Subject],[Description],[Begin_Date],[End_Date],[Recurrent_Rule],[Recurrence_Parent_Key],[Subject_Id],[Reminder] FROM [Class_Schedule] WHERE [Class_Id]=@ClassId;";
cmd.Parameters.Add(CreateParameter("@ClassId", myInfo.ClassId));
using (DbDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
{
Appointment apt = new Appointment();
apt.ID = reader["Id"];
apt.Subject = Convert.ToString(reader["Subject"]);
apt.Start = DateTime.SpecifyKind(Convert.ToDateTime(reader["Begin_Date"]), DateTimeKind.Utc);
apt.End = DateTime.SpecifyKind(Convert.ToDateTime(reader["End_Date"]), DateTimeKind.Utc);
apt.RecurrenceRule = Convert.ToString(reader["Recurrent_Rule"]);
apt.RecurrenceParentID = reader["Recurrence_Parent_Key"] == DBNull.Value ? null : reader["Recurrence_Parent_Key"];
if (reader["Reminder"] != DBNull.Value)
{
IList<Reminder> reminders = Reminder.TryParse(Convert.ToString(reader["Reminder"]));
if (reminders != null)
{
apt.Reminders.AddRange(reminders);
}
}
if (apt.RecurrenceParentID != null)
{
apt.RecurrenceState = RecurrenceState.Exception;
}
else
if (apt.RecurrenceRule != string.Empty)
{
apt.RecurrenceState = RecurrenceState.Master;
}
LoadResources(apt);
appointments.Add(apt);
}
}
cmd.Dispose();
}
}
}
return appointments;
}
But customParameter all way null object data.
<
telerik:RadScriptManager
runat
=
"server"
ID
=
"RadScriptManager1"
/>
<
telerik:RadAjaxPanel
runat
=
"server"
ID
=
"RadAjaxPanel1"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
>
<
telerik:RadHtmlChart
runat
=
"server"
ID
=
"RadHtmlChart1"
DataSourceID
=
"sdsDeclineReport"
Width
=
"600px"
Height
=
"400px"
>
<
PlotArea
>
<
Series
>
<
telerik:ScatterLineSeries
DataFieldX
=
"date"
DataFieldY
=
"amount"
>
<
TooltipsAppearance
Color
=
"White"
DataFormatString
=
"{0:MM/dd}"
></
TooltipsAppearance
>
<
LabelsAppearance
Visible
=
"false"
>
</
LabelsAppearance
>
</
telerik:ScatterLineSeries
>
</
Series
>
</
PlotArea
>
<
Legend
>
<
Appearance
Visible
=
"false"
></
Appearance
>
</
Legend
>
<
ChartTitle
Text
=
"Declines"
></
ChartTitle
>
</
telerik:RadHtmlChart
>
</
telerik:RadAjaxPanel
>
The result looks like this:
http://i.imgur.com/TGtKTNxl.png
The "Amount" column ranges from 0-20, and the dates go from 2016-01-01 to 2017-01-01. Can someone point me in the right direction here in regards to the lack of any data, as well as where I went wrong with the axes?
Thanks
Hello Telerik team,
we are using the RadAutocompleteBox in our .aspx-page. In the Page_Load
-function we are binding the data like this:
protected
void
Page_Load(
object
sender, EventArgs e)
{
var siteUrl = SPContext.Current.Web.Url;
SPSecurity.RunWithElevatedPrivileges(
delegate
()
{
using
(var site =
new
SPSite(siteUrl))
{
using
(var web = site.OpenWeb())
{
var dbaccess =
new
DBAccess(web);
radComboPlz.DataSource = dbaccess.GetPlzListeDataTable();
radComboPlz.DataBind();
}
}
});
}
With our control we want to enable the user to search for zip codes. This is how the control looks like:
<
telerik:RadAutoCompleteBox
RenderMode
=
"Lightweight"
runat
=
"server"
ID
=
"radComboPlz"
EmptyMessage
=
""
Skin
=
"Windows7"
DataTextField
=
"PlzOrt"
InputType
=
"Text"
MinFilterLength
=
"2"
AutoPostBack
=
"False"
Filter
=
"StartsWith"
>
<
TextSettings
SelectionMode
=
"Single"
/>
</
telerik:RadAutoCompleteBox
>
Now let's assume we have some zip codes looking like this, "509511", "509678", "509144"....
We also have some zip codes looking like this, "501223", "501789", "501445"...
The main difference is that some have 509 for the first three digits the others begin with 501.
Now the problem that we encounter is somehow hard to reproduce because only a couple of users are experiencing it. For example if I type 509 in most cases the suggestions are looking as supposed, namely showing entries starting with 509 (see attached file "509.png"). While for some clients the autocompletion seems to stop after "50" and therefor returns entries staring with "501" (see attached File "501.png").
We are using the latest version of IE but also were able to reproduce the issue using other browsers (FireFox and Chrome). Is this a know issue, if so how to handle it? Might we be missing some parameter in the Control?
Regrads and thanks in advance!
Hi Everyone I am new at developing and I am just simply trying to Run this website from visual studio 2010 and I am getting this error. I just copied the production source code to a test server and it runs perfectly. I am unsure why on my local machine it does not run. My version is actually 2013.1.417.40 I am unsure why it keeps referencing these 2012.3.1016.40 and 2012.2.724.0 files.
1)I have searched my computer and I do not have any 2012 files on it.I have added the /bin .dll file to my GAC.
2)I tried it add this to my webconfig but it errors out at the runtime code. I am unsure where to place it in the webconfig but I assumed anywhere inbetween <Configuration></configuration>
<
runtime
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"Telerik.Web.UI"
publicKeyToken
=
"121fae78165ba3d4"
/>
<
bindingRedirect
oldVersion
=
"1.0.0.0-2013.1.417.40"
newVersion
=
"2013.1.417.40"
/>
</
dependentAssembly
>
</
runtime
>
3)added this intween the <assemblies></assemblies>
<
add
assembly
=
"Telerik.Web.UI, Version=2013.1.417.40, Culture=neutral, PublicKeyToken=121FAE78165BA3D4"
/>
4)I have removed the reference files and readded them using the dll file that is in my /bin and rebuild.
5)I have turned specific file version to false in references.
6)I have installed the Telerik asp.net ajax software(not sure if I need to do that)
I am running out of options. please help.
Parser Error Message: Could not load file or assembly 'Telerik.Web.UI, Version=2012.3.1016.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source Error:
Line 1: <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MainMenu.ascx.cs" Inherits="Risk_Registers.MainMenu" %>
Line 2: <%--<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>--%>
Line 3:
Source File: /MainMenu.ascx Line: 1
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Telerik.Web.UI, Version=2012.3.1016.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' could not be loaded.
=== Pre-bind state information ===
LOG: DisplayName = Telerik.Web.UI, Version=2012.3.1016.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4
(Fully-specified)
LOG: Appbase = file:///C:/Users/xxx/Risk Registers/
LOG: Initial PrivatePath = C:\Users\xxx\Risk Registers\bin
Calling assembly : Risk Registers, Version=2012.2.724.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\xxx\Risk Registers\web.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Telerik.Web.UI, Version=2012.3.1016.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4
LOG: Attempting download of new URL file:///C:/Users/xxx/AppData/Local/Temp/Temporary ASP.NET Files/root/80d173ca/a5cf8a4d/Telerik.Web.UI.DLL.
LOG: Attempting download of new URL file:///C:/Users/xxx/AppData/Local/Temp/Temporary ASP.NET Files/root/80d173ca/a5cf8a4d/Telerik.Web.UI/Telerik.Web.UI.DLL.
LOG: Attempting download of new URL file:///C:/Users/xxx/Risk Registers/bin/Telerik.Web.UI.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Major Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
Hi,
I would like to dynamically populate the RadDropDownTree client side - but I need all nodes to be fully expanded. The web service databinding scenario would be great, except I can't see any way to make it automatically expand all the nodes. Alternatively I can write a web service to return me a json list of the data I need, but I can't see a way to add nodes to the RadDropDownTree through javascript.
How can I achieve the functionality I want?
Hi,
i try to perform filter operation programmatically. So i created an asp button and attached a server side click event handler. The filter operation should be fired in the event handler:
protected void Filter_Click(object sender, EventArgs e)
{
RadGrid grd = grid;
grid.MasterTableView.FilterExpression = "([Capture] LIKE 'Kind%')"; // Capture is the id and unique name of a GridBoundColumn
GridColumn column = grid.MasterTableView.GetColumnSafe("Capture");
column.CurrentFilterFunction = GridKnownFunction.Contains;
column.CurrentFilterValue = "Kind";
grd.EnableLinqExpressions = false;
GridDataItem item = (grid.MasterTableView.GetItems(GridItemType.Item)[2] as GridDataItem);
item.FireCommandEvent("Filter", new System.Web.UI.Pair("Kind", "Capture")); // exception is being fired at this line
grid.Rebind();
}
This code causes an exception:
An exception of type 'System.NullReferenceException' occurred in Telerik.Web.UI.dll but was not handled in user code
at Telerik.Web.UI.GridColumn.RefreshCurrentFilterValue(GridFilteringItem filteringItem, String functionName)
at Telerik.Web.UI.GridFilterCommandEventArgs.ExecuteCommand(Object source)
at Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e)
at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
at Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e)
at Lusd.Presentation.LusdApplication.UserControls.Schule.InstitutionsListeControl.Filter_Click(Object sender, EventArgs e) in C:\TFS\ZeGOV\LUSD\Client\development\standard\Presentation\Presentation.LusdApplication\UserControls\Schule\InstitutionsListeControl.ascx.cs:line 429
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
How can I get it fixed?
Thanks in advance
Hi,
when I try to perform filter operation in a button event handler the FireCommandEvent method causes an exception.
protected void Filter_Click(object sender, EventArgs e)
{
RadGrid grd = grid;
grid.MasterTableView.FilterExpression = "([Capture] LIKE 'Kind%')";
GridColumn column = grid.MasterTableView.GetColumnSafe("Capture");
column.CurrentFilterFunction = GridKnownFunction.Contains;
column.CurrentFilterValue = "Kind";
grd.EnableLinqExpressions = false;
GridDataItem item = (grid.MasterTableView.GetItems(GridItemType.Item)[2] as GridDataItem);
item.FireCommandEvent("Filter", new System.Web.UI.Pair("Kind", "Capture"));
grid.Rebind();
}
Here is the exception:
An exception of type 'System.NullReferenceException' occurred in Telerik.Web.UI.dll but was not handled in user code
at Telerik.Web.UI.GridColumn.RefreshCurrentFilterValue(GridFilteringItem filteringItem, String functionName)
at Telerik.Web.UI.GridFilterCommandEventArgs.ExecuteCommand(Object source)
at Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e)
at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
at Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e)
at Lusd.Presentation.LusdApplication.UserControls.Schule.InstitutionsListeControl.Filter_Click(Object sender, EventArgs e) in C:\TFS\ZeGOV\LUSD\Client\development\standard\Presentation\Presentation.LusdApplication\UserControls\Schule\InstitutionsListeControl.ascx.cs:line 429
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
How can I get it solved?
Thanks in advance.