Telerik Forums
UI for WPF Forum
5 answers
265 views

I get the following error in the designer of VS2010.  The project compiles and runs fine, but the designer has this error.  I've checked all the references and I am not referencing any older versions anywhere.  I've cleaned and rebuilt the solution and it still doesn't work.  I've also added the loadFromRemoteSources option to the app.config.  Still no good.

System.IO.FileLoadException

Could not load file or assembly 'Telerik.Windows.Controls, Version=2010.3.1227.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.Assembly.Load(AssemblyName assemblyRef) at MS.Internal.Package.VSIsolationProviderService.RemoteReferenceProxy.VsReflectionResolver.GetRuntimeAssembly(Assembly reflectionAssembly) at Microsoft.Windows.Design.Metadata.ReflectionMetadataContext.CachingReflectionResolver.GetRuntimeAssembly(Assembly reflectionAssembly) at Microsoft.Windows.Design.Metadata.ReflectionMetadataContext.Microsoft.Windows.Design.Metadata.IReflectionResolver.GetRuntimeAssembly(Assembly reflectionAssembly) at MS.Internal.Metadata.ClrAssembly.GetRuntimeMetadata(Object reflectionMetadata) at Microsoft.Windows.Design.Metadata.AttributeTableContainer.<MergeAttributesIterator>d__c.MoveNext() at Microsoft.Windows.Design.Metadata.AttributeTableContainer.GetAttributes(Assembly assembly, Type attributeType, Func`2 reflectionMapper) at MS.Internal.Metadata.ClrAssembly.GetAttributes(ITypeMetadata attributeType) at MS.Internal.Design.Metadata.Xaml.XamlAssembly.get_XmlNamespaceCompatibilityMappings() at Microsoft.Windows.Design.Metadata.Xaml.XamlExtensionImplementations.GetXmlNamespaceCompatibilityMappings(IAssemblyMetadata sourceAssembly) at Microsoft.Windows.Design.Metadata.Xaml.XamlExtensions.GetXmlNamespaceCompatibilityMappings(IAssemblyMetadata source) at MS.Internal.Design.Metadata.ReflectionProjectNode.BuildSubsumption() at MS.Internal.Design.Metadata.ReflectionProjectNode.SubsumingNamespace(Identifier identifier) at MS.Internal.Design.Markup.XmlElement.BuildScope(PrefixScope parentScope, IParseContext context) at MS.Internal.Design.Markup.XmlElement.ConvertToXaml(XamlElement parent, PrefixScope parentScope, IParseContext context, IMarkupSourceProvider provider, Boolean visitCodeModel) at MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.FullParse(Boolean convertToXamlWithErrors) at MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.get_RootItem() at Microsoft.Windows.Design.DocumentModel.Trees.ModifiableDocumentTree.get_ModifiableRootItem() at Microsoft.Windows.Design.DocumentModel.MarkupDocumentManagerBase.get_LoadState() at MS.Internal.Host.PersistenceSubsystem.Load() at MS.Internal.Host.Designer.Load() at MS.Internal.Designer.VSDesigner.Load() at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedView.Load() at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedDesignerFactory.Load(IsolatedView view) at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view) at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view) at MS.Internal.Host.Isolation.IsolatedDesigner.Load() at MS.Internal.Designer.DesignerPane.LoadDesignerView(Boolean isReload)

 

System.NotSupportedException

An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.

Zbigniew Kozłowski
Top achievements
Rank 1
 answered on 04 Feb 2011
4 answers
1.1K+ views
Hello,

I'm attempting to scroll the selected item into view.  The item is not null.  I have tried the following methods:

mainGrid.ScrollIntoView(mainGrid.SelectedItem);

mainGrid.BringIndexIntoView(mainGrid.Items.IndexOf(mainGrid.SelectedItem));
Dispatcher.BeginInvoke(new Action(() =>  mainGrid.ScrollIntoView(mainGrid.SelectedItem)));
Dispatcher.BeginInvoke(new Action(() =>  mainGrid.BringIndexIntoView(mainGrid.Items.IndexOf(mainGrid.SelectedItem))));


All of the above methods simply scroll my grid a few pixels only and then stop.  All four behave the same way.  If I call all four together, it scrolls (a couple pixels * 4).  Any ideas?
Paul
Top achievements
Rank 1
 answered on 04 Feb 2011
2 answers
82 views
Hi. I'am using 2010 Q3 WPF controls with Visual Studio 2010. I Have RadSplitContainer with RadPanes. I want RadPane Headers to be non resizable when application window width gets smaller then headers total width. I want to get same behavior as the Visual Studio tabs headers behavior. When application window width is smaller then tabitems headers total width most right Header is hiding and when application window width  increasing tabitem header is again visible. Is it possible to do the same behavior for RadPane Headers. Also in Visual Studio selected Tab is set to first position (if it was not in first position and there is not enough space because of the window width decreasing)

Thank you,
Regards Armen  
Armen
Top achievements
Rank 1
 answered on 04 Feb 2011
1 answer
673 views
how to put selected row cell into edit mode with single click or selection.
Currently, I have to click twice to have it in the edit mode.
First click selects it, second puts it in the edit mode.

Thanks
Veselin Vasilev
Telerik team
 answered on 04 Feb 2011
2 answers
384 views
hi,
I have a dataset object which contains 2 datatable (relation). How do i bind this dataset to the radgridview with allowing to insert a new row on both parent and child grid?

thanks

So far this is the code

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Collections.ObjectModel;
using System.Data;
 
namespace WpfApplication8
{
    /// <summary>
    /// Interaction logic for Window3.xaml
    /// </summary>
    public partial class Window3 : Window
    {
        public Window3()
        {
            InitializeComponent();
 
            this.DataContext = this;
 
            //RadGridView1.DataMember = CarsSet.Tables["Car"].TableName;
        }
 
 
        public DataSet CarsSet
        {
            get
            {
                DataSet carSet = new DataSet();
 
                DataTable car = new DataTable("Car");
                DataTable comp = new DataTable("Complaint");
 
                DataColumn col = new DataColumn("AllWheelDrive");
                car.Columns.Add(col);
                col = new DataColumn("Doors");
                car.Columns.Add(col);
                col = new DataColumn("Make");
                car.Columns.Add(col);
                col = new DataColumn("Model");
                car.Columns.Add(col);
                col = new DataColumn("ModelYear");
                car.Columns.Add(col);
 
                col = new DataColumn("Doors");
                comp.Columns.Add(col);
                col = new DataColumn("DateOfComplaint");
                comp.Columns.Add(col);
                col = new DataColumn("Complaint");
                comp.Columns.Add(col);
                col = new DataColumn("Resolved");
                comp.Columns.Add(col);
 
                DataRow row = car.NewRow();
                row["Doors"] = "test1";
                row["Make"] = "test2";
                row["Model"] = "test3";
                row["ModelYear"] = "test4";
 
                car.Rows.Add(row);
 
                row = comp.NewRow();
                row["Doors"] = "test1";
                row["DateOfComplaint"] = "test4";
                row["Complaint"] = "test2";
                row["Resolved"] = "test3";
 
 
                comp.Rows.Add(row);
 
                carSet.Tables.Add(car);
                carSet.Tables.Add(comp);
 
                carSet.Relations.Add(new DataRelation("link", carSet.Tables["Car"].Columns["Doors"], carSet.Tables["Complaint"].Columns["Doors"]));
                return carSet;
            }
 
 
        }
    }
}

<
Window xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"  x:Class="WpfApplication8.Window3"
        Title="Window3" Height="300" Width="600">
    <Grid>
        <telerik:RadGridView x:Name="RadGridView1" CanUserFreezeColumns="False" GridLinesVisibility="Horizontal"
                             ShowInsertRow="true" DataMember="Car"
                             ItemsSource="{Binding CarsSet}"  
                             AutoGenerateColumns="False">
            <telerik:RadGridView.ChildTableDefinitions>
                <telerik:GridViewTableDefinition />
            </telerik:RadGridView.ChildTableDefinitions>
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding AllWheelDrive}" Header="Order Date" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Doors}" Header="Employee" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Make}" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Model}" Header="Ship Country" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding ModelYear}" Header="Ship City" />
            </telerik:RadGridView.Columns>
            <telerik:RadGridView.HierarchyChildTemplate>
                <DataTemplate>
                    <telerik:RadGridView x:Name="RadGridView1"
                                         DataMember="Complaint"
                                         CanUserFreezeColumns="False"
                                         ShowInsertRow="true" CanUserInsertRows="True"
                                         AutoGenerateColumns="False" ItemsSource="{Binding Complaint}" 
                                         ShowGroupPanel="False">
                        <telerik:RadGridView.Columns>
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding DateOfComplaint}" Header="Product ID" />
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding Complaint}" Header="Unit Price" />
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding Resolved}" Header="Quantity" />
                        </telerik:RadGridView.Columns>
                    </telerik:RadGridView>
                </DataTemplate>
            </telerik:RadGridView.HierarchyChildTemplate>
        </telerik:RadGridView>
    </Grid>
</Window>


Milan
Telerik team
 answered on 04 Feb 2011
3 answers
54 views
I noticed that a window with a RadDocking control behaves in a strange fashion in relation to the Windows task bar:

Whereas every other window of whatever application when dragged towards the task bar is behind it, a window with the RadDocking control - if it is activated - is above the task bar. If other windows are behind the active window with a RadDockingControl, they get placed above the task bar as well, but only in this case.

How do I fix this behavior so that a window with a RadDocking control is always behind the Windows task bar like every other standard window?

I use Windows 7.
George
Telerik team
 answered on 04 Feb 2011
3 answers
371 views
Hi,
I need to capture which one the user clicked on mousedoubleclick event of radgridview..

I need to differentiate if the user clicked on the cell or on the border of the grid.. How can i achive this?

thanks
Maya
Telerik team
 answered on 04 Feb 2011
1 answer
267 views
Hi,

i have the following scenario (RadDocking with three panes and on the third pane is a PRISM region) :

<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
    <Telerik:RadDocking Name="Docking" UI:PaRadDockingExtensions.IsEnabled="True"
                        ItemContainerStyle="{DynamicResource PaNewRadDockPaneStyle}" AllowUnsafeMode="True" >
            <Telerik:RadDocking.DocumentHost >
            <Telerik:RadSplitContainer Orientation="Vertical">
                <Telerik:RadPaneGroup Name="MapGroup">
                    <Telerik:RadPane Header="Pane1" Telerik:RadDocking.SerializationTag="C1">
                            <AlapModul:CikkInputView DataContext="{Binding}" />
                        </Telerik:RadPane>
                    <Telerik:RadPane Header="Pane2" Telerik:RadDocking.SerializationTag="C2" >
                        <AlapModul:CikkKiegeszitoInputView DataContext="{Binding}" />
                        </Telerik:RadPane>
                    <Telerik:RadPane Header="Pane3" Telerik:RadDocking.SerializationTag="C3" >
                        <ContentControl cal:RegionManager.RegionName="{Binding MERegionName}" DataContext="{Binding}"/>
                    </Telerik:RadPane>
                </Telerik:RadPaneGroup>
            </Telerik:RadSplitContainer>
        </Telerik:RadDocking.DocumentHost>
    </Telerik:RadDocking>

At runtime, when I begin drag the pane with the PRISM region, I got the following error:

An exception occurred while creating a region with name 'cc4ebccf-36cf-410c-b390-318f6e905d1b'. The exception was: System.InvalidOperationException: ContentControl's Content property is not empty.
    This control is being associated with a region, but the control is already bound to something else.
    If you did not explicitly set the control's Content property,
    this exception may be caused by a change in the value of the inherited RegionManager attached property.
   at Microsoft.Practices.Composite.Presentation.Regions.ContentControlRegionAdapter.Adapt(IRegion region, ContentControl regionTarget) in E:\Projects\PrismLib\Source\Main\CAB\Composite.Presentation\Regions\ContentControlRegionAdapter.cs:line 58
   at Microsoft.Practices.Composite.Presentation.Regions.RegionAdapterBase`1.Initialize(T regionTarget, String regionName) in E:\Projects\PrismLib\Source\Main\CAB\Composite.Presentation\Regions\RegionAdapterBase.cs:line 65
   at Microsoft.Practices.Composite.Presentation.Regions.RegionAdapterBase`1.Microsoft.Practices.Composite.Regions.IRegionAdapter.Initialize(Object regionTarget, String regionName) in E:\Projects\PrismLib\Source\Main\CAB\Composite.Presentation\Regions\RegionAdapterBase.cs:line 82
   at Microsoft.Practices.Composite.Presentation.Regions.Behaviors.DelayedRegionCreationBehavior.CreateRegion(DependencyObject targetElement, String regionName) in E:\Projects\PrismLib\Source\Main\CAB\Composite.Presentation\Regions\Behaviors\DelayedRegionCreationBehavior.cs:line 137.

Any idea what I do wrong?

Thanks,

Balazs
George
Telerik team
 answered on 04 Feb 2011
2 answers
178 views
Hi,

Is there an easy or effecient way to check if the user changes any data on the grid? comparing the old row with the new row..

thanks


ronald
Top achievements
Rank 1
 answered on 04 Feb 2011
1 answer
136 views
Hello Telerik Team,
                                I have one clarification about rad colorpicker.we are using rad controls in our latest project.

My doupt is how to binding radcolor picker?
what is color picker input value?

our aim is stored the values of color picker input .Then display values in datagrid with corresponding color. 

give me more suggestion.
Petar Mladenov
Telerik team
 answered on 04 Feb 2011
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?