<%@ Page Title="" Language="C#" MasterPageFile="~/Controls/MasterPages/User.master" Theme="Default" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Sections_OrgChart_Default" %>
<
asp:Content
ID
=
"Content1"
ContentPlaceHolderID
=
"head"
Runat
=
"Server"
>
</
asp:Content
>
<
asp:Content
ID
=
"Content2"
ContentPlaceHolderID
=
"ContentPlaceHolder1"
Runat
=
"Server"
>
<
telerik:RadOrgChart
runat
=
"server"
ID
=
"RadOrgChart1"
></
telerik:RadOrgChart
>
</
asp:Content
>
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Web;
using
System.Web.UI;
using
System.Web.UI.WebControls;
using
Getron.AAM;
using
Getron.AAM.EntityManagement;
using
Getron.Core.Base.Objects;
using
System.Data;
public
partial
class
Sections_OrgChart_Default : EntityProtectedPage
{
protected
void
Page_Load(
object
sender, EventArgs e)
{
OrgSchema osch =
new
OrgSchema();
QueryEntity qent =
new
QueryEntity();
qent.QueryEntityType = Getron.Core.Enums.EQueryEntityType.WhereCondition;
qent.Query =
"SupervisorId=@SupervisorId"
;
Getron.DBInterface.Parameter p0 =
new
Getron.DBInterface.Parameter(
"@SupervisorId"
, ParameterDirection.Input, DbType.Int64, 0);
p0.Value = 23;
qent.Parameters.Add(p0);
DataTable dt =
new
DataTable();
dt = osch.GetCustomViewAll(
"OrgSchemaAllData"
,
new
List<
string
>() {
"SystemUserIntCode"
,
"SystemUserName"
,
"SuperVisorId"
}, qent);
RadOrgChart1.DataTextField =
"SystemUserName"
;
RadOrgChart1.DataFieldID =
"SystemUserIntCode"
;
RadOrgChart1.DataFieldParentID =
"SupervisorId"
;
RadOrgChart1.DataSource = dt;
RadOrgChart1.DataBind();
}
}
Type 'Telerik.Web.UI.RadListBoxItemCollection' in Assembly 'Telerik.Web.UI, Version=2013.2.717.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' is not marked as serializable.
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.Runtime.Serialization.SerializationException: Type 'Telerik.Web.UI.RadListBoxItemCollection' in Assembly 'Telerik.Web.UI, Version=2013.2.717.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' is not marked as serializable.
Source Error:
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.
Stack Trace:
[SerializationException: Type 'Telerik.Web.UI.RadListBoxItemCollection' in Assembly 'Telerik.Web.UI, Version=2013.2.717.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' is not marked as serializable.]
System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type) +9476053
System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context) +247
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo() +160
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder) +491
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder) +54
System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) +542
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck) +133
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph) +13
System.Web.UI.ObjectStateFormatter.SerializeValue(SerializerBinaryWriter writer, Object value) +3113
[ArgumentException: Error serializing value 'Telerik.Web.UI.RadListBoxItemCollection' of type 'Telerik.Web.UI.RadListBoxItemCollection.']
System.Web.UI.ObjectStateFormatter.SerializeValue(SerializerBinaryWriter writer, Object value) +3428
System.Web.UI.ObjectStateFormatter.Serialize(Stream outputStream, Object stateGraph) +141
System.Web.UI.ObjectStateFormatter.Serialize(Object stateGraph) +57
System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Serialize(Object state) +4
System.Web.UI.Util.SerializeWithAssert(IStateFormatter formatter, Object stateGraph) +37
System.Web.UI.HiddenFieldPageStatePersister.Save() +79
System.Web.UI.Page.SavePageStateToPersistenceMedium(Object state) +108
System.Web.UI.Page.SaveAllState() +315
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2839
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1016
Hi, i have Telerik version Q3 2012 , Oracle DB 10, VS 2005.
I try in all the way to bind data to RadPivot but no way, nothing happens. I tried with ObjectDataSource and with Advanced Data...but i failed.
Do i need a specific DDL ? or another version of Telerik ?
Anyway give a look to what i produce and tell me please where is the mistake.
<telerik:RadPivotGrid runat="server" ID="RadPivotGrid1" AllowFiltering="true"
AllowPaging = "true"
Width="800px" Height="400px"
AllowSorting="true"
ShowFilterHeaderZone="true"
OnNeedDataSource="RadPivotGrid1_NeedDataSource" >
<ClientSettings EnableFieldsDragDrop="true">
<Scrolling AllowVerticalScroll="true"></Scrolling>
</ClientSettings>
<Fields>
<telerik:PivotGridRowField DataField="attivita">
</telerik:PivotGridRowField>
<telerik:PivotGridColumnField DataField="liv_auto">
</telerik:PivotGridColumnField>
<telerik:PivotGridAggregateField DataField="q_ta" Aggregate="Sum">
</telerik:PivotGridAggregateField>
</Fields>
</telerik:RadPivotGrid>
In vb file :
Protected Sub RadPivotGrid1_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.PivotGridNeedDataSourceEventArgs) Handles RadPivotGrid1.NeedDataSource
TryCast(sender, RadPivotGrid).DataSource = GetDataTable("SELECT * FROM lbrms_libretto_vw where matri=17720")
End Sub
Public Function GetDataTable(ByVal query As String) As DataTable
Dim ConnString As [String] = ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString
Dim conn As New OracleConnection(ConnString)
Dim adapter As New OracleDataAdapter()
adapter.SelectCommand = New OracleCommand(query, conn)
Dim myDataTable As New DataTable()
conn.Open()
Try
adapter.Fill(myDataTable)
Finally
conn.Close()
End Try
Return myDataTable
End Function
NeedDataSource fires and the DataTable contains data. But Pivot show no data.
I guess maybe the structure of my Oracle Table is not good for Pivot ?
ID Activity Level_Activity Quantity
-- --------- ------------------- -----------
1 A High 20
2 A Low 10
3 B High 12
and so on.....
SomeOne can help me ?
Thanks Maurizio
Javascript
<script type=
"text/javascript"
>
function
OnClientButtonClick(sender, args) {
// debugger;
var
currentIndex = sender.get_currentItem().get_index();
var
count = sender.get_items().length;
var
frames = Math.ceil(count / 3);
var
tot = 1;
if
(currentIndex % 3 == 0) {
tot = 2 + (sender.get_currentItem().get_index() / 3);
}
else
if
(currentIndex == 0)
tot = 1;
var
com = tot +
'/'
+ frames;
document.getElementById(
'<%= this.Label1.ClientID %>'
).innerHTML = com;
}
</script>
<telerik:RadRotator ID=
"ImageStrip_RadRotator"
InitialItemIndex=
"0"
runat=
"server"
RotatorType=
"CoverFlowButtons"
>
<ItemTemplate>
<telerik:RadBinaryImage ID=
"RadBinaryImage1"
CssClass=
"itemTemplate"
runat=
"server"
DataValue=
'<%# Eval("Photo") == DBNull.Value? new System.Byte[0]: Eval("Photo") %>'
AutoAdjustImageControlSize=
"false"
/>
</ItemTemplate>
<ControlButtons OnClientButtonClick=
"OnClientButtonClick"
/>
</telerik:RadRotator>
Hello,
I've seen many threads about this problem but none of the solutions provided seems to be working for me.
I'm using radEditor and the upload button (and the others) are disabled in the Image Manager on the production server. It's, working fine on my development server though.
It's the first time I've got this problem and I've used the editor in other applications.
To make sure the problem is not due to some Javascript or other codes, I've created a simple .aspx page (not secured or anything) with just this HTML and code-behind :
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="editor.aspx.vb" Inherits="editor" %>
<!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
runat
=
"server"
>
<
title
>Test</
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
div
>
<
telerik:RadScriptManager
runat
=
"server"
ID
=
"RadScriptManager1"
></
telerik:RadScriptManager
>
<
telerik:RadEditor
ID
=
"fTest"
Width
=
"960px"
ToolsFile
=
"~/editor/ToolsFile.xml"
ValidationGroup
=
"MyValidationGroup"
Runat
=
"server"
>
<
Tools
>
<
telerik:EditorToolGroup
Tag
=
"FileManagers"
>
<
telerik:EditorTool
Name
=
"ImageManager"
/>
</
telerik:EditorToolGroup
>
</
Tools
>
</
telerik:RadEditor
>
</
div
>
</
form
>
</
body
>
</
html
>
Dim nomRepGeneral As String = "~/uploaded/test"
fTest.ImageManager.ViewPaths = New String() {nomRepGeneral}
fTest.ImageManager.UploadPaths = New String() {nomRepGeneral}
fTest.ImageManager.DeletePaths = New String() {nomRepGeneral}
I've used the test code to make sure the rights are set correctly on the folder (here).
Any idea ?
Thank you