Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
265 views
I'm tring to create simple RadOrgChart page. And I have to bind it by DataTable. I did, but it doesnt work.

My Telerik version is 2011.3.1115.40.

Here is my code;
<%@ 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>

And my Cs codes,
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();
    }
}

And I attached my DataTable result panel picture.(dt object preview)
Shinu
Top achievements
Rank 2
 answered on 21 Jan 2014
3 answers
140 views
I have a grid on a page that displays some basic information about an item, such as item # and description.  I need to be able to allow my users to enter detail information about any item they choose then update a database with those values.  Presently I'm doing this by entering all of my detail fields as textboxes in an ItemTemplate.  Once the user is done entering information they hit a submit button that goes through every row in the table and checks for updates and the updates the database.  While this works, it is very inefficient and actually does fail to work when my server has lots of traffic.  It simply times out.  

For my scenario, what is the proper way to do this?

Thanks.
Viktor Tachev
Telerik team
 answered on 21 Jan 2014
1 answer
386 views
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
Plamen
Telerik team
 answered on 21 Jan 2014
3 answers
139 views

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



Ghezzo
Top achievements
Rank 1
 answered on 21 Jan 2014
8 answers
389 views
I'm looking at the demo example of the radrotator and I can't get it to work. What I want is to scroll between two or more image that I know the urls of.

My code:

<telerik:RadRotator ID="RadRotator1" runat="server" Width="580px" ItemWidth="300"
                Height="250px" ItemHeight="220" ScrollDuration="500" FrameDuration="2000"
                PauseOnMouseOver="false">              
                <ItemTemplate>
                    <asp:Image ID="Image1" runat="server" ImageUrl="http:/..1.jpg." />
                </ItemTemplate>
<ItemTemplate>
                    <asp:Image ID="Image2" runat="server" ImageUrl="http:/..2.jpg" />
                </ItemTemplate>
    </telerik:RadRotator>



What am I missing here? Nothing is visible.
        
Shinu
Top achievements
Rank 2
 answered on 21 Jan 2014
1 answer
197 views
Hai 
  i need sample code for grid view filter template like this
http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/filtering/filter-templates/defaultvb.aspx

first grid view sample but biding data from server side not in code bhind,bcz i am use Access db,so db path is always change.i need same functionality with filter opation and need one more column with checkbox,after check box need to delete checked box.
Shinu
Top achievements
Rank 2
 answered on 21 Jan 2014
1 answer
119 views
Hi,
       The below mention is the radrotator controls which I have created.  
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>

   I have given the rotator dimensions and rotator type in .cs file,which is working fine. The rotator shows 3 images per frame.Suppose if there are 7 images then 3 frames will be shown. I'm getting the number of frames from "Var Frames" in the script.
  What I want is that how to find the current frame if i move the left/right button in rotator  ? I have attached a screenshot also.
If you are not able to find out the current frame, can you tell me this with respect to number of images in the rotator and the current image in focus. I'm looking for a javascript.


Regards
Rahul
Slav
Telerik team
 answered on 21 Jan 2014
4 answers
1.0K+ views
Hello,
I have a requirement as follows,
I need to disable rad Grid Edit button If I am click on Edit and It needs to be enable when update/cancel click. Please find the attached screen shot.
Here I am using GridEditCommandColumn and EditFormSettings for edit form. 
Please give your valuable suggestions.

Regards,
Prasad.
Princy
Top achievements
Rank 2
 answered on 21 Jan 2014
10 answers
677 views

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">
 
<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

venkat
Top achievements
Rank 1
 answered on 21 Jan 2014
1 answer
252 views
Hi,
I am new to telerik controls. I am working on below scenario 
I have  one Rad Grid which will have 3 columns out of which one is dropdown column. I am able to populate the combo box on page load but I want that Values in other two columns should get populated based on what value is selected in combo box column.

Please let me know how to do this.

Princy
Top achievements
Rank 2
 answered on 21 Jan 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?