Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
1.3K+ views
Hi all,

Recently we discovered that Visual Studio can sporadicaly display the "Error rendering control" message in design time.
This can occur in several specific error messages:
  • [A]Telerik.Web.UI.RadScriptManager cannot be cast to [B]Telerik.Web.UI.RadScriptManager. Type A originates from...
  • Unable to cast object of type 'Telerik.Web.UI.RadScriptManager' to 'Telerik.Web.UI.RadScriptManager'
  • Unable to cast object of type Telerik.Web.UI.[ControlName] to Telerik.Web.UI.ControlItemContainer

The screenshots below demonstrate sample occurrences of the error:









A subsequent close of the page in design time and a further reload usually might make it render correctly. A further close and reload can cause the error to reappear though.

Our research showed that some registry entries we use to enable Visual Studio display RadControls in the "Add Reference" and "Choose ToolBox Items" dialogs are the reason for the error. It seems that for some reason Visual Studio loads several instances of the Telerik.Web.UI assembly into its AppDomain, which results in the error above.
We decided to sacrifice the appearance of the Telerik.Web.UI assembly in the above mentioned dialogs, but prevent this annoying error from happening and we already removed the registry entries from the RadControls installers.

As a fix in the meantime, you could use the .reg files in the attached archives (one targets a 32-bit machine and the other targets a 64-bit one) and the .bat files (targeting Windows XP and Windows7/Vista respectively) to fix the problem. Here are the steps to follow:
  1. Download and extract the archive to a folder of your choice
  2. Close all Visual Studio instances
  3. Double-click the .reg file (use the Remove_AssemblyFoldersEx_32bitMachine.reg for 32-bit machines and the  Remove_AssemblyFoldersEx_64bitMachine.reg one for 64-bit machines) and click the 'Yes' button when asked to confirm the registry entry merge
  4. Double-click the bat file, depending on the Windows system you're running (use the ClearProjectAssemblies_Win7_Vista.bat for Windows7/Vista and the ClearProjectAssemblies_WinXP.bat for Windows XP)
  5. Start Visual Studio and load your project

Kind regards,
Erjan Gavalji
Telerik
Nicklas
Top achievements
Rank 1
 answered on 05 Aug 2013
1 answer
51 views
dddd
Maria Ilieva
Telerik team
 answered on 05 Aug 2013
1 answer
102 views
Hi
I am using an autocompletebox in my form to enter tokens. After selecting four token I want to disable further token selection. But the user should be able to delete one and add another.

Thanks
Lovella
Shinu
Top achievements
Rank 2
 answered on 05 Aug 2013
1 answer
91 views
Hi Dear,

I am using radpivotgrid for achieving a customized report that have

Row -> Customer Name (Retrieving from Data Source)
Main Column -> Carrier Name (Retrieving from Data Source)
2 Sub Columns under Main Column -> "Minimum" and "MarkUp" - These are headings of the column
2 Data Columns under it need to show the minimum and markup values, that retrieved from data source.

And this need to be exported to excel. (please see below attachments for further clarification). Please suggest me to solve this.
1) Customer Carrier Report.png--> this is the output I am getting with pivot rad grid
2) Expected OutPut.png --> This is what I need to achieve.
Angel Petrov
Telerik team
 answered on 05 Aug 2013
1 answer
88 views
 

Hi,

Need Help in Retrieving Image.
I have a Radgrid populated by a records of file name of image.

images are located in "~/images/"
ex.
----------------
filename
apple.jpg    
Cherry.jpg 
tuna.jpg      
dog.jpg
bottle.jpg
----------------

my Code to populated those filename:

        Dim filePaths() As String = Directory.GetFiles(Server.MapPath("~/images"))
        Dim files As List(Of ListItem) = New List(Of ListItem)
        For Each filePath As String In filePaths
            files.Add(New ListItem(Path.GetFileName(filePath), filePath))
        Next
        Radgri1.DataSource = files
        Radgri1
Radgri1.DataBind()


-----------------------------------------

all i want is When the user click a row in the Radgrid1 it will return the file name and will concatenate with file path location :

Ex.
dim strRowSelected = "Apple.jpg"

Image1.imageurl = "~/images" & strRowSelected

where the "Apple.jpg" is from the user selected row from the Radgrid1

and finally it will display the image to an asp.net image control.

How do i do that?

please help, and kindly refer the the attached file for the scenario










Jayesh Goyani
Top achievements
Rank 2
 answered on 05 Aug 2013
1 answer
83 views
Hi 

   Im having problem with radwindow.

   when i try to open radwindow from mainpage button click its open but the content of the Mainpage overlap with radwindow content.

   if anybody know the solution for this.




Regards

P.Mugil
Danail Vasilev
Telerik team
 answered on 05 Aug 2013
1 answer
379 views
Good Afternoon,

I am currently working on a project at work and we are using the RadGrid to display some hierarchical information. All works fine except for binding to a list that is contained within the primary class. I have the following:

Approver Class:
---------------------

    public class BOC_Approver
    {
        public BOC_Approver()
        {
        }

        public BOC_Approver(Int32 MyApproverID, String MyApproverName)
        {
            ApproverID   = MyApproverID;
            ApproverName = MyApproverName;
        }

        public Int32  ApproverID { get; set; }
        public String ApproverName { get; set; }
    }



Product Class:
-------------------
    public class BOC_Product
    {
        public BOC_Product()
        {
            Approvers = new List<BOC_Approver>();
        }

        public BOC_Product(Int32 MyProductID, String MyName) : this()
        {
            ProductID = MyProductID;
            ProductName = MyName;         
        }

        public Int32              ProductID { get; set; }
        public String             ProductName { get; set; }
        public List<BOC_Approver> Approvers { get; set; }
     }


Rad Grid Setup:
---------------------
  <telerik:RadGrid ID="gridNewHireRequests" runat="server" CssClass="MyGridControl" GridLines="None" AutoGenerateColumns="False"
                             OnNeedDataSource="gridNewHireRequests_NeedDataSource" >                        
        <ClientSettings>
          <Scrolling AllowScroll="True" ScrollHeight="100%" UseStaticHeaders="false" />
        </ClientSettings>
                        
        <MasterTableView DataKeyNames="ProductID" CommandItemDisplay="Top">
            <CommandItemSettings ShowAddNewRecordButton="true" ShowRefreshButton="false" />
                <DetailTables>
                    <telerik:GridTableView DataKeyNames="ProductID" Width="100%" runat="server">
                        <ParentTableRelation>
                            <telerik:GridRelationFields DetailKeyField="ProductID" MasterKeyField="ProductID" />
                        </ParentTableRelation>
                        <Columns>
                          <telerik:GridBoundColumn  DataField="Approvers.ApproverID" HeaderText="Approver ID" UniqueName="ApproverID" />
                          <telerik:GridBoundColumn   DataField="Approvers.ApproverName"  HeaderText="Approver Name"  UniqueName="ApproverName" />
                         </Columns>
                        </telerik:GridTableView>
                    </DetailTables>
                    <Columns>
                        <telerik:GridBoundColumn DataField="ProductID" HeaderText="Product ID" UniqueName="ProductID" />
                        <telerik:GridBoundColumn DataField="ProductName" HeaderText="Product Name" UniqueName="ProductName" />
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>


If the Approvers List in the Product class was just another class I can get this to work no issues, but because the Approvers property in the Product class is a list I am unsure how to get it to bind in the subgrid. At the moment if throws an error with unknown fields of course.

is there a standard way to handle binding if a list that each element contains another list?

Thanks, Any help would be appreciated.

Chris Eisnaugle
Jayesh Goyani
Top achievements
Rank 2
 answered on 05 Aug 2013
7 answers
313 views
I have 3 radgrids. while i click the export button, All the 2 grids should be exported into the single excel file.
first grid should be sheet1, 2nd grid should be in sheet2 accordingly.
Whether this is possible. If this is possible how can we do this.
this is my grid code
<table runat="server" id="GridTable" visible="false" width="100%">
            <tr>
                <td>
                    <div class="pageheadertext">
                        On-Hand
                    </div>
                </td>
            </tr>
            <tr>
                <td align="center">
                    <telerik:RadGrid ID="RadGrid_LotDetailsonHand" runat="server" AllowPaging="True"
                        AllowSorting="True" EnableLinqExpressions="false" Width="90%" AutoGenerateEditColumn="false"
                        AutoGenerateColumns="False" OnPageIndexChanged="RadGrid_LotDetailsonHand_PageIndexChanged"
                        Visible="false" ShowFooter="True">
                        <PagerStyle Mode="NextPrevAndNumeric" />
                        <HeaderStyle BorderStyle="Solid" Font-Bold="true" HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Left" Font-Underline="false" />
                        <AlternatingItemStyle HorizontalAlign="Left" Font-Underline="false" />
                        <ExportSettings ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true">
                            <Excel Format="ExcelML" />
                        </ExportSettings>
                        <MasterTableView AllowPaging="true" CommandItemDisplay="Top" AllowMultiColumnSorting="false"
                            ShowGroupFooter="true">
                            <CommandItemSettings ShowExportToExcelButton="true" ShowRefreshButton="false" ShowAddNewRecordButton="false"
                                ShowExportToCsvButton="false" ShowExportToPdfButton="true" ShowExportToWordButton="true" />
                            <PagerStyle Mode="NextPrevAndNumeric" />
                            <Columns>
                                <telerik:GridBoundColumn HeaderText="Warehouse" UniqueName="Warehouse_code" DataField="WAREHOUSE_CODE"
                                    ItemStyle-HorizontalAlign="Left">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn HeaderText="Location" UniqueName="Locetion_code" DataField="LOCATION_CODE"
                                    ItemStyle-HorizontalAlign="Left">
                                </telerik:GridBoundColumn>
                                <telerik:GridCalculatedColumn HeaderText="Qty" UniqueName="qty" ItemStyle-HorizontalAlign="Right"
                                    DataFields="QTTY, PACKSHORT_DESC" Expression='{0}+ " " +{1}' />
                                <%--  <telerik:GridBoundColumn Aggregate="Sum" HeaderText="Qty" UniqueName="qty" ItemStyle-HorizontalAlign="Right"
                                    DataField="QTTY">
                                    
                                </telerik:GridBoundColumn>--%>
                                <telerik:GridBoundColumn HeaderText="Owner" UniqueName="Owner_Code." DataField="OWNER_CODE"
                                    ItemStyle-HorizontalAlign="Left">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn HeaderText="Status" UniqueName="Status" DataField="STATUS"
                                    ItemStyle-HorizontalAlign="Left">
                                </telerik:GridBoundColumn>
                            </Columns>
                        </MasterTableView>
                    </telerik:RadGrid>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="pageheadertext">
                        Received
                    </div>
                </td>
            </tr>
            <tr>
                <td align="center">
                    <telerik:RadGrid ID="RadGrid_LotDetailsOnRecev" runat="server" AllowPaging="True"
                        AllowSorting="True" EnableLinqExpressions="false" Width="90%" AutoGenerateEditColumn="false"
                        AutoGenerateColumns="False" OnPageIndexChanged="RadGrid_LotDetailsOnRecev_PageIndexChanged"
                        Visible="false">
                        <PagerStyle Mode="NextPrevAndNumeric" />
                        <ExportSettings ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true">
                            <Excel Format="ExcelML" />
                        </ExportSettings>
                        <MasterTableView AllowPaging="true" CommandItemDisplay="Top">
                            <CommandItemSettings ShowExportToExcelButton="true" ShowRefreshButton="false" ShowAddNewRecordButton="false"
                                ShowExportToCsvButton="true" ShowExportToPdfButton="true" ShowExportToWordButton="true" />
                            <PagerStyle Mode="NextPrevAndNumeric" />
                            <Columns>
                                <telerik:GridDateTimeColumn DataType="System.DateTime" HeaderText="Date" UniqueName="Date"
                                    ItemStyle-HorizontalAlign="Left" DataField="DATETIME" DataFormatString="<%$Appsettings:dateformat%>">
                                </telerik:GridDateTimeColumn>
                                <telerik:GridTemplateColumn ItemStyle-HorizontalAlign="Left" SortExpression="PO_ORDER_NO"
                                    HeaderText="Order" UniqueName="Order">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="lnkOrdNum" runat="server" OnClick="lnkrefNum_Click" ForeColor="DarkBlue"
                                            CommandArgument='<%# DataBinder.Eval (Container.DataItem, "ORDER_NO2") %>' Text='<%# DataBinder.Eval (Container.DataItem, "PO_ORDER_NO") %>'
                                            ValidationGroup='<%# DataBinder.Eval (Container.DataItem, "SRORDER_ID") %>'>
                                        </asp:LinkButton>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn HeaderText="(Alt Order)" UniqueName="Alt_Order" DataField="ORDER_NO2"
                                    ItemStyle-HorizontalAlign="Left">
                                </telerik:GridBoundColumn>
                                <telerik:GridCalculatedColumn HeaderText="Qty" UniqueName="qty" ItemStyle-HorizontalAlign="Right"
                                    DataFields="QTTY, PACKSHORT_DESC" Expression='{0}+ " " +{1}' />
                                <telerik:GridBoundColumn HeaderText="Owner" UniqueName="Owner_Code." DataField="OWNER_CODE"
                                    ItemStyle-HorizontalAlign="Left">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn HeaderText="Status" UniqueName="Status" DataField="STATUS"
                                    ItemStyle-HorizontalAlign="Left">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn HeaderText="Warehouse" UniqueName="Warehouse_code" DataField="WAREHOUSE_CODE"
                                    ItemStyle-HorizontalAlign="Left">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn HeaderText="Source" UniqueName="source" ItemStyle-HorizontalAlign="Left"
                                    DataField="SOURCE">
                                </telerik:GridBoundColumn>
                            </Columns>
                        </MasterTableView>
                    </telerik:RadGrid>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="pageheadertext">
                        Shipped
                    </div>
                </td>
            </tr>
            <tr>
                <td align="center">
                    <telerik:RadGrid ID="RadGrid_LotDetailsShipper" runat="server" AllowPaging="True"
                        AllowSorting="True" EnableLinqExpressions="false" Width="90%" AutoGenerateEditColumn="false"
                        AutoGenerateColumns="False" OnPageIndexChanged="RadGrid_LotDetailsShipper_PageIndexChanged"
                        Visible="false">
                        <PagerStyle Mode="NextPrevAndNumeric" />
                        <ExportSettings ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true">
                            <Excel Format="ExcelML" />
                        </ExportSettings>
                        <MasterTableView AllowPaging="true" CommandItemDisplay="Top">
                            <CommandItemSettings ShowExportToExcelButton="true" ShowRefreshButton="false" ShowAddNewRecordButton="false"
                                ShowExportToCsvButton="true" ShowExportToPdfButton="true" ShowExportToWordButton="true" />
                            <PagerStyle Mode="NextPrevAndNumeric" />
                            <Columns>
                                <telerik:GridDateTimeColumn DataType="System.DateTime" HeaderText="Date" UniqueName="Date"
                                    ItemStyle-HorizontalAlign="Left" DataField="DATETIME" DataFormatString="<%$Appsettings:dateformat%>">
                                </telerik:GridDateTimeColumn>
                                <telerik:GridTemplateColumn ItemStyle-HorizontalAlign="Left" SortExpression="CO_ORDER_NO"
                                    HeaderText="Order" UniqueName="Order">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="lnkOrdNum" runat="server" OnClick="lnkrefNum_Click" ForeColor="DarkBlue"
                                            CommandArgument='<%# DataBinder.Eval (Container.DataItem, "ORDER_NO2") %>' Text='<%# DataBinder.Eval (Container.DataItem, "CO_ORDER_NO") %>'
                                            ValidationGroup='<%# DataBinder.Eval (Container.DataItem, "SRORDER_ID") %>'>
                                        </asp:LinkButton>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn HeaderText="(Alt Order)" UniqueName="Alt_Order" DataField="ORDER_NO2"
                                    ItemStyle-HorizontalAlign="Left">
                                </telerik:GridBoundColumn>
                                <telerik:GridCalculatedColumn HeaderText="Qty" UniqueName="qty" ItemStyle-HorizontalAlign="Right"
                                    DataFields="QTTY, PACKSHORT_DESC" Expression='{0}+ " " +{1}' />
                                <telerik:GridBoundColumn HeaderText="Owner" UniqueName="Owner_Code." DataField="OWNER_CODE"
                                    ItemStyle-HorizontalAlign="Left">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn HeaderText="Status" UniqueName="Status" DataField="STATUS"
                                    ItemStyle-HorizontalAlign="Left">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn HeaderText="Warehouse" UniqueName="Warehouse_code" DataField="WAREHOUSE_CODE"
                                    ItemStyle-HorizontalAlign="Left">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn HeaderText="Designation" UniqueName="Designation" ItemStyle-HorizontalAlign="Left"
                                    DataField="DEST">
                                </telerik:GridBoundColumn>
                            </Columns>
                        </MasterTableView>
                    </telerik:RadGrid>
                </td>
            </tr>
        </table>
Margret
Top achievements
Rank 1
 answered on 05 Aug 2013
1 answer
116 views
Hi, Dears

i use radMenu in my Webpage that its body direction set to right to left (rtl)
but i want menu be left to right
unfortunately rad menu dosn't work well

  
<telerik:RadMenu ID="SpecificPageMenu" Runat="server" EnableTheming="true" EnableEmbeddedSkins="true" dir="ltr">
    <Items>
        <telerik:RadMenuItem Text="بیماران" PostBack="False">
            <Items>
             <telerik:RadMenuItem CssClass="aspnet-ajax" Width="500px">
                 <ItemTemplate>
                     <div style="width: 100%; height:100px; background-color: greenyellow">
                         this is first menu                           
                     </div>
                 </ItemTemplate>                   
                 </telerik:RadMenuItem>
            </Items>
        </telerik:RadMenuItem>
        <telerik:RadMenuItem Text="قالب نسخ" PostBack="False">
            <Items>
             <telerik:RadMenuItem CssClass="aspnet-ajax" Width="500px">
                 <ItemTemplate>
                     <div style="width: 100%; height:100px; background-color: greenyellow">
                         this is second menu                           
                     </div>
                 </ItemTemplate>
                 </telerik:RadMenuItem>
            </Items>              
        </telerik:RadMenuItem>
        <telerik:RadMenuItem Text="دستورات دارویی" PostBack="False">
                           <Items>
             <telerik:RadMenuItem CssClass="aspnet-ajax" Width="500px">
                 <ItemTemplate>
                     <div style="width: 100%; height:100px; background-color: greenyellow">
                         this is third menu                           
                     </div>
                 </ItemTemplate>
                 </telerik:RadMenuItem>
            </Items>
 
        </telerik:RadMenuItem>
    </Items>
    <DefaultGroupSettings OffsetX="-445"></DefaultGroupSettings>
</telerik:RadMenu>


A2H
Top achievements
Rank 1
 answered on 05 Aug 2013
4 answers
1.3K+ views
I have an html chart that I generate some series for based on whatever is selected in a combobox. How do I reset the chart when I have new data for it?

I pretty much add the series myself.

RadHtmlChart1.PlotArea.Series.Add(Task1Series);

RadHtmlChart1.PlotArea.Series.Add(Task1Trend);

RadHtmlChart1.PlotArea.Series.Add(Task2Series);

RadHtmlChart1.PlotArea.Series.Add(Task2Trend);

the other chart control has a clear() method, but I am not seeing it here.

RadHtmlChart1.PlotArea.Series.Clear(); doent seem to work either.

Thanks

Rob
Top achievements
Rank 1
 answered on 04 Aug 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?