Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
404 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
156 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
408 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
210 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
131 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
703 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
265 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
5 answers
116 views
Greetings,

I have a batch mode grid that's required to be able to display a dialog when the user is editing a row, and the user will interact with the dialog in some way.
I used a RadWindow for the dialog, and because the grid closes the currently edited row if the user clicks outside the row, I added the following code to prevent the grid from closing the currently edited row while the dialog is shown:

function dialog_beforeShow(sender, args)
    {
        grid.add_batchEditClosing(grid_batchEditClosing);
    }
 
    function grid_batchEditClosing(sender, args)
    {
        args.set_cancel(true);
    }
 
function dialog_close(sender, args)
    {
        grid.remove_batchEditClosing(grid_batchEditClosing);
    }

After the dialog is closed, I find that the row doesn't close if I click with mouse anywhere.
It only closes if I open another row for editing.
Angel Petrov
Telerik team
 answered on 21 Jan 2014
1 answer
218 views

Hi there,


I am attempting to refresh a datatable with the latest updates from a radgrid.



Steps

1. Two Rows exist

2. User Clicks "edit"

3. Two columns become editable

4. User edits 1 or both values clicks "update"

5. Within myGrid_UpdateCommand session variable gets updated.

6. Currently only returns newly edited row, ignores row not edited.

7. WANTED: to always return all the rows, edited and unchanged.



Code

 


Protected Sub rgTaxRate_UpdateCommand(ByVal sender As Object, ByVal e As GridCommandEventArgs) Handles rgTaxRate.UpdateCommand
Dim newDataTable As DataTable = New DataTable
 
 ' build column names
For Each col As GridColumn In rgTaxRate.Columns
    Dim dCol As DataColumn = New DataColumn(col.UniqueName)
    newDataTable.Columns.Add(dCol)
Next
 
; attempt to create row
For Each row As GridDataItem In rgTaxRate.Items
    Dim dr As DataRow = newDataTable.NewRow
    For Each col As GridColumn In rgTaxRate.Columns
        dr(col.UniqueName) = row(col.UniqueName).Text
    Next
    newDataTable.Rows.Add(dr)
Next
 
Session("MyTempTable") = newDataTable


this is based on another thread I saw but I am unsure for the life of me how they got it to work.

Here is my aspx code

<telerik:RadGrid OnItemEvent="rgTaxRate_ItemEvent" ID="rgTaxRate" Width="100%" AllowPaging="True" PageSize="8" runat="server" AllowSorting="True" GridLines="None"
                                        AutoGenerateColumns="True" ShowStatusBar="True" CellSpacing="0" EnableViewState="false" AutoGenerateEditColumn="true" OnUpdateCommand="rgTaxRate_UpdateCommand">
                                        <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
                                        <MasterTableView ShowFooter="false" DataKeyNames="TaxID" EditMode="InPlace" Width="100%" CommandItemDisplay="Bottom"  HorizontalAlign="NotSet" AutoGenerateColumns="false">
                                        <CommandItemTemplate>
                                            <div style="padding: 5px 5px; text-align:left;">
                                                <asp:LinkButton ID="reloadTaxes" Text="Reset to Defaults" CommandName="Reload" runat="server" OnCommand="lbReload_Command"></asp:LinkButton>
                                            </div>
                                        </CommandItemTemplate>
                                        <Columns>
                                            <telerik:GridBoundColumn DataField="TaxID" HeaderText="TaxID" UniqueName="TaxID" SortExpression="TaxID" Display="false"></telerik:GridBoundColumn>
                                            <telerik:GridTemplateColumn DataField="TaxDescription" UniqueName="TaxDescription" HeaderText="Tax Description" SortExpression="TaxDescription" HeaderStyle-Width="128px" ItemStyle-Width="128px" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left">
                                                <ItemTemplate>
                                                    <%#DataBinder.Eval(Container.DataItem, "TaxDescription")%>
                                                </ItemTemplate>
                                                <EditItemTemplate>
                                                    <telerik:RadTextBox Width="128px" runat="server" ID="rgTaxRate_Description" MaxLength="20" Text='<%#Eval("TaxDescription") %>'></telerik:RadTextBox>
                                                </EditItemTemplate>
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridTemplateColumn DataField="TaxRate" UniqueName="TaxRate" HeaderText="Tax Rate" SortExpression="TaxRate"  ItemStyle-Width="56px"  HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left">
                                                <ItemTemplate>
                                                    <%#DataBinder.Eval(Container.DataItem, "TaxRate")%>
                                                </ItemTemplate>
                                                <EditItemTemplate>
                                                    <telerik:RadNumericTextBox Width="56px" ID="rgTaxRate_Amount" Type="Percent" MinValue="0" MaxValue="100" MaxLength="3" NumberFormat-DecimalDigits="0" NumberFormat-GroupSeparator="," Culture="en-US"  runat="server" DbValue='<%#Eval("TaxRate") %>'>
                                                    </telerik:RadNumericTextBox>
                                                </EditItemTemplate>
                                            </telerik:GridTemplateColumn>
                                        </Columns>
                                        </MasterTableView>
                                        <ClientSettings></ClientSettings>
                                        <FilterMenu EnableTheming="True">
                                            <CollapseAnimation Duration="200" Type="OutQuint"></CollapseAnimation>
                                        </FilterMenu>
                                    </telerik:RadGrid>
                                    <telerik:GridTextBoxColumnEditor runat="server" ID="rgTaxRate_Amount">  
                                        <TextBoxStyle Width="50px" />
                                    </telerik:GridTextBoxColumnEditor>








Princy
Top achievements
Rank 2
 answered on 21 Jan 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?