Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
169 views
Hello,

I have a Document Center Site Collection (home site) onto which I wanted to place this web part.  I tried several times to get it working, installing and uninstalling the web part a few different times.  Now, I think everything is installed correctly but when I add the web part to the page, I get the error below.  Is this because I installed and uninstalled the solution so many times?  I made sure the web part's feature was enabled on the site collection, and everything. Had to use Web Part Maintenance page to remove the part so that I could view the page again.

Thanks,
 - Matt

 

Server Error in '/' Application.

[A]System.Collections.Generic.Dictionary`2[System.String,Telerik.Web.UI.OurUpdatePanel] cannot be cast to [B]System.Collections.Generic.Dictionary`2[System.String,Telerik.Web.UI.OurUpdatePanel]. Type A originates from 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in the context 'LoadNeither' at location 'C:\Windows\assembly\GAC_64\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'. Type B originates from 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in the context 'LoadNeither' at location 'C:\Windows\assembly\GAC_64\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'.

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.InvalidCastException: [A]System.Collections.Generic.Dictionary`2[System.String,Telerik.Web.UI.OurUpdatePanel] cannot be cast to [B]System.Collections.Generic.Dictionary`2[System.String,Telerik.Web.UI.OurUpdatePanel]. Type A originates from 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in the context 'LoadNeither' at location 'C:\Windows\assembly\GAC_64\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'. Type B originates from 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in the context 'LoadNeither' at location 'C:\Windows\assembly\GAC_64\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'.

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:

[InvalidCastException: [A]System.Collections.Generic.Dictionary`2[System.String,Telerik.Web.UI.OurUpdatePanel] cannot be cast to [B]System.Collections.Generic.Dictionary`2[System.String,Telerik.Web.UI.OurUpdatePanel]. Type A originates from 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in the context 'LoadNeither' at location 'C:\Windows\assembly\GAC_64\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'. Type B originates from 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in the context 'LoadNeither' at location 'C:\Windows\assembly\GAC_64\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'.]
   Telerik.Web.UI.RadAjaxControl.CreateUpdatePanel(Control initiator, String eventName, Control updated, UpdatePanelRenderMode panelRenderMode, Unit panelHeight) +439
   Telerik.Web.UI.RadAjaxControl.OnPagePreRender(Object sender, EventArgs e) +1529
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Control.OnPreRender(EventArgs e) +11032190
   Microsoft.SharePoint.WebPartPages.WebPartPage.OnPreRender(EventArgs e) +50
   System.Web.UI.Control.PreRenderRecursiveInternal() +108
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3394


Version Information: Microsoft .NET Framework Version:2.0.50727.4959; ASP.NET Version:2.0.50727.4955
Tesfaye
Top achievements
Rank 1
 answered on 14 Mar 2012
1 answer
50 views
We are trying to use the ToolbarProviderID functionality with multiple RadEditor controls.  The RadEditor controls are being instantiated at RunTime.  When the first RadEditor control is being created, we store the ID of that Editor to be used as the ToolbarProviderID for later Editors.

When we run, the Toolbar on the first RadPageView page where the first Editor is drawn renders as it should.  When I switch to a Tab that contains an additional Editor, we encounter a Javascript error.

My question:  how do we use the ToolbarProviderID when the ID of the control will not be visible because of the RadPageView hiding the control?
Rumen
Telerik team
 answered on 14 Mar 2012
1 answer
45 views
Hi,

When I open Hyperlink Manager for a link in RadEditor, enter some data in Email tab and click OK, its not saving that data. When I re-open the Hyperlink manager, the email tab data is cleared. Other two tabs are fine. Please let me know if I am missing something.

Thanks..
Rumen
Telerik team
 answered on 14 Mar 2012
1 answer
146 views
Hi,

    I am now integrating RadEditor into my collaborative appliaction. I found the feature "commenting in RadEditor" interesting as users are able to make comments on the contents. However, I just wonder how to change the RadEditorUser/Author attribute because everytime a user makes a comment, Radeditor would set the author as "RadEditorUser". This causes confusion as users cannot distingish their comments with those made by others.

Thanks
Nelson
Rumen
Telerik team
 answered on 14 Mar 2012
1 answer
78 views
I am trying to automatically expand to detail level the newly inserted master record (which works)
and then auto put the child into insert mode which I cant seem to get working.

It throws the 'index out of bounds' error on the :

  Dim tableView As GridTableView = DirectCast(item.ChildItem.NestedTableViews(0), GridTableView)
  tableView.IsItemInserted = True


Any advice appreciated.
Thanks in advance.

Snippet of code I am using below

<telerik:RadGrid ID="RadGrid1" OnPreRender="RadGrid1_PreRender" DataSourceID="SqlDataSource1" OnItemInserted="RadGrid1_ItemInserted"
            runat="server" AutoGenerateColumns="False" AllowSorting="True" AllowMultiRowSelection="False"
            AllowPaging="True" PageSize="10" GridLines="None" AllowAutomaticInserts="True"
            allowautomaticdeletes="true" AllowAutomaticUpdates="true">
            <PagerStyle Mode="NumericPages"></PagerStyle>
            <MasterTableView DataSourceID="SqlDataSource1" CommandItemDisplay="Top" DataKeyNames="custID" AllowMultiColumnSorting="True"
                            GroupLoadMode="Server">
                <NestedViewTemplate>
                    <asp:Panel runat="server" ID="InnerContainer" CssClass="viewWrap" Visible="true">
                        <telerik:RadTabStrip runat="server" ID="TabStip1" MultiPageID="Multipage1"
                            SelectedIndex="0">
                            <Tabs>
                                <telerik:RadTab runat="server" Text="Job Details" PageViewID="PageView1">
                                </telerik:RadTab>
                                <telerik:RadTab runat="server" Text="Scheduling" PageViewID="PageView2">
                                </telerik:RadTab>
 
                            </Tabs>
                        </telerik:RadTabStrip>
                        <telerik:RadMultiPage runat="server" ID="Multipage1" SelectedIndex="0" RenderSelectedPageOnly="false">
                            <telerik:RadPageView runat="server" ID="PageView1">
                                <asp:Label ID="Label1" Font-Bold="true" Font-Italic="true" Text='<%# Eval("custID") %>'
                                    Visible="false" runat="server" />
                                <telerik:RadGrid runat="server" ID="OrdersGrid" DataSourceID="SqlDataSource2"
                                    ShowFooter="true" AllowSorting="true" EnableLinqExpressions="false">
                                    <MasterTableView ShowHeader="true" AutoGenerateColumns="False" AllowPaging="true" EditMode="InPlace"
                                        DataKeyNames="OrderID" PageSize="7" HierarchyLoadMode="ServerOnDemand" CommandItemDisplay="Top">
                                        <Columns>
                                            <telerik:GridNumericColumn SortExpression="Description" HeaderText="Description" HeaderButtonType="TextButton"
                                                DataField="Description" UniqueName="Description">
                                            </telerik:GridNumericColumn>
                                            <telerik:GridBoundColumn SortExpression="Price" HeaderText="Price" HeaderButtonType="TextButton"
                                                DataField="Price" UniqueName="Price">
                                            </telerik:GridBoundColumn>
                                            <telerik:GridDateTimeColumn SortExpression="PayOnline" HeaderText="PayOnline" HeaderButtonType="TextButton"
                                                DataField="PayOnline" UniqueName="Payonline">
                                            </telerik:GridDateTimeColumn>
                                            <telerik:GridBoundColumn UniqueName="Frequency" DataField="FrequencyNum"
                                                HeaderText="Frequency">
                                            </telerik:GridBoundColumn>
                                        </Columns>
                                    </MasterTableView>
                                </telerik:RadGrid>
                                <asp:SqlDataSource ID="SqlDataSource2" ConnectionString="<%$ ConnectionStrings:MainConnectionString %>"
                                    ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM CustJobs Where custID = @custID "
                                    runat="server">
                                    <SelectParameters>
                                        <asp:ControlParameter ControlID="Label1" PropertyName="Text" Type="String" Name="custID" />
                                    </SelectParameters>
                                </asp:SqlDataSource>
 
                            </telerik:RadPageView>
                            <telerik:RadPageView runat="server" ID="PageView2" Width="600px">
                                <asp:Label ID="Label2" Font-Bold="true" Font-Italic="true" Text='<%# Eval("custID") %>'
                                    Visible="false" runat="server" />
                                <telerik:RadGrid runat="server" ID="RadGrid2" DataSourceID="SqlDataSource2"
                                    ShowFooter="true" AllowSorting="true" EnableLinqExpressions="false">
                                    <MasterTableView ShowHeader="true" AutoGenerateColumns="False" AllowPaging="true" EditMode="InPlace"
                                        DataKeyNames="OrderID" PageSize="7" HierarchyLoadMode="ServerOnDemand">
                                        <Columns>
                                            <telerik:GridNumericColumn SortExpression="FrequencyNum" HeaderText="Frequency" HeaderButtonType="TextButton"
                                                DataField="FrequencyNum" UniqueName="FrequencyNum">
                                            </telerik:GridNumericColumn>
                                            <telerik:GridBoundColumn SortExpression="FrequencyTerm" HeaderText=".." HeaderButtonType="TextButton"
                                                DataField="FrequencyTerm" UniqueName="FrequencyTerm">
                                            </telerik:GridBoundColumn>
                                            <telerik:GridDateTimeColumn SortExpression="FirstClean" HeaderText="FirstClean" HeaderButtonType="TextButton"
                                                DataField="FirstClean" UniqueName="FirstClean">
                                            </telerik:GridDateTimeColumn>
                                            <telerik:GridBoundColumn UniqueName="NextDue" HeaderText="Next Due" HeaderButtonType="TextButton"
                                                DataField="NextDue">
                                            </telerik:GridBoundColumn>
                                        </Columns>
                                    </MasterTableView>
                                </telerik:RadGrid>
                                <asp:SqlDataSource ID="SqlDataSource3" ConnectionString="<%$ ConnectionStrings:MainConnectionString %>"
                                    ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM CustJobs Where custID = @custID "
                                    runat="server">
                                    <SelectParameters>
                                        <asp:ControlParameter ControlID="Label1" PropertyName="Text" Type="String" Name="custID" />
                                    </SelectParameters>
                                </asp:SqlDataSource>
 
                            </telerik:RadPageView>
 
                        </telerik:RadMultiPage>
                    </asp:Panel>
                </NestedViewTemplate>
                <Columns>
                    <telerik:GridBoundColumn DataField="custID" SortExpression="custID" HeaderText="custID" Visible="false" >
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Name" HeaderText="Name" HeaderButtonType="TextButton" ItemStyle-Font-Size="Smaller"
                        DataField="Name" UniqueName="Name" ItemStyle-Width="5" HeaderStyle-Width="5" FilterControlWidth="5">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Addr1" HeaderText="Address" HeaderButtonType="TextButton" ItemStyle-Font-Size="Smaller"
                        DataField="Addr1" UniqueName="Addr1">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Addr2" HeaderText="" HeaderButtonType="TextButton" ItemStyle-Font-Size="Smaller"
                        DataField="Addr2" UniqueName="Addr2">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Town" HeaderText="Town" HeaderButtonType="TextButton" ItemStyle-Font-Size="Smaller"
                        DataField="Town" UniqueName="Town">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="County" HeaderText="County" HeaderButtonType="TextButton" ItemStyle-Font-Size="Smaller"
                        DataField="County" UniqueName="County">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="PostCode" HeaderText="PostCode" HeaderButtonType="TextButton" MaxLength="8" ItemStyle-Font-Size="Smaller"
                        DataField="PostCode" UniqueName="PostCode">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Tel" HeaderText="Tel" HeaderButtonType="TextButton" MaxLength="11" ItemStyle-Font-Size="Smaller"
                        DataField="Tel" UniqueName="Tel">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Mobile" HeaderText="Mobile" HeaderButtonType="TextButton" MaxLength="11" ItemStyle-Font-Size="Smaller"
                        DataField="Mobile" UniqueName="Mobile">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Email" HeaderText="Email" HeaderButtonType="TextButton" ItemStyle-Font-Size="Smaller"
                        DataField="Email" UniqueName="Email">
                    </telerik:GridBoundColumn>                   
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                        <ItemStyle CssClass="MyImageButton" />
                    </telerik:GridEditCommandColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings AllowDragToGroup="true" />
        </telerik:RadGrid>
 
 
 
 
 
 
 
 
 Protected Sub RadGrid1_PreRender(ByVal sender As Object, ByVal e As EventArgs) Handles RadGrid1.PreRender
 
    'REPLACE with oleDB method b4 go live
    '----------
        Dim strGUID2Find As String
        strGUID2Find = Session("CustGUID")
    '-------------
    'use session var for debugging.. switch to OLEDB method before go live.
 
        ' Do nothing if RadGrid is in insert mode or no new item is inserted recently.
        If RadGrid1.MasterTableView.IsItemInserted OrElse strGUID2Find = "" Then
            Return
        End If
 
 
        Dim currentPageIndex As Integer = RadGrid1.CurrentPageIndex
 
        ' loop thru grid to find latest rec inserted..
        For i As Integer = 0 To RadGrid1.PageCount - 1
            ' Compare CustID of each item in the RadGrid with the newly inserted item custID
            For Each item As GridDataItem In RadGrid1.Items
                If strGUID2Find.Equals(item("CustID").Text) Then
                    ' Select the last inserted row
                    item.Selected = True
                    item.Expanded = True
 
                      Dim tableView As GridTableView = DirectCast(item.ChildItem.NestedTableViews(0), GridTableView)
                      tableView.IsItemInserted = True
 
                    currentPageIndex = -1
                    ' flag exit
                    Exit For
                End If
            Next
 
            ' If item is found then exit RadGrid page loop
            If currentPageIndex.Equals(-1) Then
                Exit For
            End If
 
            ' Go to next RadGrid page
            currentPageIndex += 1
            If currentPageIndex >= RadGrid1.PageCount Then
                currentPageIndex = 0
            End If
            RadGrid1.CurrentPageIndex = currentPageIndex
            RadGrid1.Rebind()
        Next
    End Sub
Tsvetina
Telerik team
 answered on 14 Mar 2012
1 answer
65 views
Hello,
I Need this example  "Filtering By ListTextField for GridDropDownColumn"
http://www.telerik.com/help/aspnet-ajax/grid-filtering-by-listtextfield-for-griddropdowncolumn.html
but I use the HeaderContextMenu.
My e.Item is a GridHeaderItem  insteadOf GridFilteringItem  Thanks in advance
Richard
Top achievements
Rank 1
 answered on 14 Mar 2012
1 answer
99 views
Hi everyone,

I have a question about if I can to create my sql query with some telerik controls;

Could I with radtreeview or radfilter create my sql query and then fill my  grid?
What happens is that I don´t want to get all the records at once but only those who will need.


Regards,
Tsvetina
Telerik team
 answered on 14 Mar 2012
1 answer
381 views
Hi,

I have a rad window and for that I need to set the default button.Currently, when I hit the Enter key the button inside rad window is working only when my focus is inside the rad window. I need to set the focus to rad window when I open it in server side.

Can anyone help me out on this?

Thanks
Marin Bratanov
Telerik team
 answered on 14 Mar 2012
3 answers
158 views
HI,

This is with reference to the below thread

http://www.telerik.com/community/forums/aspnet/input/change-max-value-of-radnumerictextbox.aspx

I know that RadNumericTextbox has a limitation of 2^46 but is it possible to turn-off the automatic rounding to the maximum value allowed. I don't want the user to automatically be rounded to the maxvalue if the entered value is larger. Instead, I want to signal the user about the error, and ask him/her to retype the value.

can anyone please help me in this
Richard
Top achievements
Rank 1
 answered on 14 Mar 2012
0 answers
362 views

I ran into this error and I wanted to post my work around to it.  I was trying to add a popup warning to an existing edit button that kicked off an edit for a grid.  The error I got is below.

Specified argument was out of the range of valid values.
Parameter name: ItemHierarchicalIndex
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.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: ItemHierarchicalIndex
 
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:
 
 
 
 
 
[ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: ItemHierarchicalIndex]
   Telerik.Web.UI.GridDataItemCollection.get_Item(String hierarchicalIndex) +113
   Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument) +3642
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981

 

What caused this error was the javascript I added to fire the grid_ItemCommand after the popup.  It was firing off code inside the RadGrid Control before it ever got to my codebehind and this code was having the error.

Bad Code

<Telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
    <script language="javascript" type="text/javascript">
 
        function confirmEdit() {
            // This function prompts the user if they want to edit (Y/N).
            <% If ShowPopup Then %>
                radconfirm("The date selected is a prior period date, are you sure you want to edit the data for the date shown?", confirmCallBackFnEdit, 330, 100, null, 'Edit Receipt Noms (Y/N)');
            <% Else %>
                var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
                masterTable.fireCommand("Edit", "");
            <% End If %>          
        }
 
        function confirmCallBackFnEdit(arg) {
            if (arg) {
                var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
                masterTable.fireCommand("Edit", "");
            }
        }
         
    </script>
</Telerik:RadScriptBlock>

To fix this error I renamed the CommandName I was looking for in the code behind Grid_ItemCommand from Edit to EditAll, changed the commandname on the button in HTML to EditAll and I changed the javascript to call EditAll. This bypassed the code inside the RadGrid control causing the error.

Good Code

<Telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
    <script language="javascript" type="text/javascript">
 
        function confirmEdit() {
            // This function prompts the user if they want to edit (Y/N).
            <% If ShowPopup Then %>
                radconfirm("The date selected is a prior period date, are you sure you want to edit the data for the date shown?", confirmCallBackFnEdit, 330, 100, null, 'Edit Receipt Noms (Y/N)');
            <% Else %>
                var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
                masterTable.fireCommand("EditAll", "");
            <% End If %>          
        }
 
        function confirmCallBackFnEdit(arg) {
            if (arg) {
                var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
                masterTable.fireCommand("EditAll", "");
            }
        }
         
    </script>
</Telerik:RadScriptBlock>

It looks like a button CommandName of Edit should be treated like a reserved word until Telerik fixes this issue. 

 

 

Steve
Top achievements
Rank 1
 asked on 14 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?