Telerik Forums
UI for WPF Forum
0 answers
83 views
Hi,

I'm in .Net 3.5, VS2008 and Telerik 2011.3.1116.35 and with one of my form I have the following exception in my designer section:

Exception has been thrown by the target of an invocation.

at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Delegate.DynamicInvokeImpl(Object[] args) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)

 

Ambiguous match found.

at System.RuntimeType.GetPropertyImpl(String name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers) at System.Type.GetProperty(String name) at MS.Internal.ComponentModel.DependencyPropertyKind.get_IsDirect() at MS.Internal.ComponentModel.DependencyPropertyKind.get_IsAttached() at MS.Internal.ComponentModel.APCustomTypeDescriptor.GetProperties(Attribute[] attributes) at MS.Internal.ComponentModel.APCustomTypeDescriptor.GetProperties() at System.ComponentModel.TypeDescriptor.TypeDescriptionNode.DefaultExtendedTypeDescriptor.System.ComponentModel.ICustomTypeDescriptor.GetProperties() at System.ComponentModel.TypeDescriptor.GetPropertiesImpl(Object component, Attribute[] attributes, Boolean noCustomTypeDesc, Boolean noAttributes) at System.ComponentModel.TypeDescriptor.GetProperties(Object component) at MS.Internal.Model.ModelPropertyCollectionImpl.GetProperties(String propertyNameHint) at MS.Internal.Model.ModelPropertyCollectionImpl.<GetEnumerator>d__0.MoveNext() at MS.Internal.Designer.PropertyEditing.Model.ModelPropertyMerger.<GetFirstProperties>d__0.MoveNext() at MS.Internal.Designer.PropertyEditing.Views.PropertyEntryReader.RedraftEntries(IPropertyViewManager viewManager, Selection selection, Boolean attachedOnly, IEventCodeBehindProxy eventCodeBehindProxy, CategoryList categoryList) at MS.Internal.Designer.PropertyEditing.PropertyInspector.UpdateCategories(Selection selection, Boolean attachedOnly, IEntryReader entryReader) at MS.Internal.Designer.PropertyEditing.PropertyInspector.RefreshPropertyList(Boolean attachedOnly) at MS.Internal.Designer.PropertyEditing.PropertyInspector.OnSelectionChangedIdle()


Thank's
Oliver
Top achievements
Rank 1
 asked on 07 Dec 2011
0 answers
170 views
Hello!
I have a next XAML in my Dictionary:


<Style TargetType="{x:Type telerik:GridViewRow}">
  <Style.Triggers>
    <Trigger Property="IsSelected" Value="True">
      <Setter Property="Background" Value="{StaticResource SelectedBrush}"/>
      <
Setter Property="Foreground" Value="{StaticResource SelectedForeground}"/>
    </Trigger>  
    <Trigger Property="IsMouseOver" Value="True">
      <Setter Property="Background" Value="{StaticResource SelectedBrushLight}"/>
      <
Setter Property="Foreground" Value="{StaticResource SelectedForegroundLight}"/>
    </
Trigger>
  </Style.Triggers>
</Style>
<Style TargetType="{x:Type telerik:GridViewCell}">
  <Style.Triggers>
    <Trigger Property="IsSelected" Value="True">
      <Setter Property="Background" Value="{StaticResource SelectedBrush}"/>
      <
Setter Property="Foreground" Value="{StaticResource SelectedForeground}"/>
    </
Trigger>
    <Trigger Property="IsMouseOver" Value="True">
      <Setter Property="Background" Value="{StaticResource SelectedBrushLight}"/>
      <Setter Property="Foreground" Value="{StaticResource SelectedForegroundLight}"/>
    </Trigger>
  </Style.Triggers>
</Style>

  So, i need set background for all row about Mouse Over. How to me it to make?
Anatoly
Top achievements
Rank 1
 asked on 06 Dec 2011
1 answer
63 views
Hello,
I was wondering if it's possible to have a Column footer for each GridViewRow I've in my application, even if I've different columns... is it possible?
Thanks
Paolo
Vlad
Telerik team
 answered on 06 Dec 2011
2 answers
241 views
I'm using GridView version 2011.3.1116.40.

<telerik:RadGridView ItemsSource="{Binding Jobs}" AutoGenerateColumns="False" ShowInsertRow="False"
                     IsReadOnly="False" CanUserDeleteRows="False" CanUserFreezeColumns="True"
                     CanUserInsertRows="False" CanUserReorderColumns="True" CanUserSelect="True"
                     RowIndicatorVisibility="Collapsed" Margin="0,0,0,-12" >
    <telerik:RadGridView.RowDetailsTemplate>
        <DataTemplate>
            <telerik:RadTabControl TabStripPlacement="Left" TabOrientation="Vertical">
                <telerik:RadTabItem Header="History">
                    <telerik:RadGridView ItemsSource="{Binding History}" AutoGenerateColumns="False" ShowGroupPanel="False" ShowInsertRow="False" IsReadOnly="True">
                        <telerik:RadGridView.Columns>
                            <telerik:GridViewDataColumn Name="ActionDate" DataMemberBinding="{Binding ActionDate}" Header="Date" DataFormatString="{} {0:D}" />
                            <telerik:GridViewDataColumn Name="ActionTime" DataMemberBinding="{Binding ActionTime}" Header="Time" />
                            <telerik:GridViewComboBoxColumn ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=Page}, Path=DataContext.Users}"
                                                                SelectedValueMemberPath="OID"
                                                                DataMemberBinding="{Binding UserInitiator}"
                                                                DisplayMemberPath="FullName"
                                                                Header="Name"
                                                                IsComboBoxEditable="False" />
 
                            <telerik:GridViewComboBoxColumn DisplayMemberPath=""
                                                                ItemsSource="{Binding Source={StaticResource historyEventType}}"
                                                                DataMemberBinding="{Binding HistoryType}"
                                                                Header="Action"
                                                                IsComboBoxEditable="False" />
                            <telerik:GridViewDataColumn Name="Reason" DataMemberBinding="{Binding ReasonDescription}" Header="Reason" DataFormatString="{} {0:D}" />
 
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding Notes}" Header="Notes"/>
                        </telerik:RadGridView.Columns>
                    </telerik:RadGridView>
                </telerik:RadTabItem>
 
            </telerik:RadTabControl>
 
        </DataTemplate>
    </telerik:RadGridView.RowDetailsTemplate>           
    <telerik:RadGridView.Columns>
        <telerik:GridViewToggleRowDetailsColumn ExpandMode="Single" />
        <telerik:GridViewDataColumn DataMemberBinding="{Binding FeederSourceName}" Header="Feeder Source" IsReadOnly="True"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding NPSOffenceDescription}" Header="Offence Code" IsReadOnly="True"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding NPSLocation}" Header="Location" IsReadOnly="True"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding VRM}" Header="VRM" IsReadOnly="True"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding NPSMakeModel}" Header="Make/Model" IsReadOnly="True"/>               
        <telerik:GridViewDataColumn DataMemberBinding="{Binding TimeStampDate}" Header="Offence Date" DataFormatString="{} {0:D}" IsReadOnly="True"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding TimeStampTime}" Header="Offence Time" IsReadOnly="True"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding ProcessedDatePart}" Header="Input Date" DataFormatString="{} {0:D}" IsReadOnly="True"/>
 
        <telerik:GridViewDataColumn DataMemberBinding="{Binding ProcessedTimePart}" Header="Input Time" IsReadOnly="True" />
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Status}" Header="Status" IsReadOnly="True" />
        <telerik:GridViewComboBoxColumn ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=Page}, Path=DataContext.Queues}"
                                                                SelectedValueMemberPath="OID"
                                                                IsReadOnly ="{Binding RelativeSource={RelativeSource AncestorType=Page}, Path=DataContext.CanChangeJobQueue, Converter={StaticResource NotConverter}}"
                                                                DataMemberBinding="{Binding Queue!Key}"
                                                                DisplayMemberPath="Name"
                                                                Header="Assign To Queue"
                                                                IsComboBoxEditable="True"/>
 
    </telerik:RadGridView.Columns>
</telerik:RadGridView>


When a page is initally loaded, my column widths are fine and default to that of the longest value. The grid is too wide for the page so I can scroll it horizontally.

If I use the thumb on the scroll bar to move right 'slowly' then the widths are preserved (see attachment 'small scroll to right'). However, if I scroll to the right more aggresively using the scroll bars 'Large Change' value then the width of the columns on the right all seem to expand to match a common denominator that I don't want (see attachment 'large scroll to right').

Is there a property I can set on the grid or columns to stop this automatic resizing? Thanks for your time!

Paul



Paul
Top achievements
Rank 1
 answered on 06 Dec 2011
3 answers
130 views
Hi,
We are trying to use Scrolling and zooming with external buttons as in provided example of the chart. We are in need to disable zooming from chart for this we make scrollmode="ScrollOnly" and enabled the zooming with external button. Now zooming is working fine but chart do not show scroll navigtion tab.
 
For this purpose we just checked the provided example and it is also not working there.
Old working code showing scroll tab
<telerik:ZoomScrollSettings ScrollMode="ScrollAndZoom" MinZoomRange="0.005"/>
 
 
 
Changed code do not show Scroll Tab
<telerik:ZoomScrollSettings ScrollMode="ScrollOnly" MinZoomRange="0.005"/>

Please refer to attached screen.
Thanks
Sia
Telerik team
 answered on 06 Dec 2011
1 answer
40 views
Hi,

With the TileView is there a way of selecting multiple items the same way as selecting files in Windows Explorer - by clicking in the whitespace around items and dragging a box to highlight some items inside?

Thanks
Petar Mladenov
Telerik team
 answered on 06 Dec 2011
2 answers
180 views
We are tying two bind Chart Series dynamically based on selected cell of above grid. Everything is working fine except LegendLabel is coming "Series0" and Series1. I see here that legend label is coming right if we bind our viewmodel statically in xaml but if we assign viewmodel as DataContext through code then legend label does not work.
Here is my code how I am doing.

MacroVal.MacroValCoorelation view = new MacroVal.MacroValCoorelation();
                view.DataContext = new MacroVal.MacroValCoorelationViewModel(processor);  //here I have to pass one input parameter in view model
view.showDialog()

Now my chart on view is like this
<telerik:RadChart Name="radChart1" ItemsSource="{Binding CorrelationChartData}" Grid.Row="2" BorderThickness="0" BorderBrush="Transparent">
            <telerik:RadChart.SamplingSettings>
                <telerik:SamplingSettings SamplingThreshold="400" />
            </telerik:RadChart.SamplingSettings>
 
            <telerik:RadChart.DefaultView>
                <telerik:ChartDefaultView ChartLegendPosition="Bottom">
                    <telerik:ChartDefaultView.ChartLegend>
                        <telerik:ChartLegend x:Name="chartLegend" Header="" UseAutoGeneratedItems="True" Background="Transparent" BorderThickness="0">
                        </telerik:ChartLegend>
                    </telerik:ChartDefaultView.ChartLegend>
                    <telerik:ChartDefaultView.ChartArea>
                        <telerik:ChartArea LegendName="chartLegend">
                            <telerik:ChartArea.AxisX>
                                <telerik:AxisX DefaultLabelFormat="M/d/yy" LabelRotationAngle="90">
                                </telerik:AxisX>
                            </telerik:ChartArea.AxisX>
                        </telerik:ChartArea>
                    </telerik:ChartDefaultView.ChartArea>
                </telerik:ChartDefaultView>
            </telerik:RadChart.DefaultView>
            <telerik:RadChart.SeriesMappings>
                <telerik:SeriesMapping LegendLabel="{Binding CurrentIndicatorName}">
                    <telerik:SeriesMapping.SeriesDefinition>
                        <telerik:LineSeriesDefinition ShowItemLabels="False" ShowPointMarks="False" LegendDisplayMode="SeriesLabel">
                        </telerik:LineSeriesDefinition>
                    </telerik:SeriesMapping.SeriesDefinition>
                    <telerik:SeriesMapping.ItemMappings>
                        <telerik:ItemMapping DataPointMember="XValue"
                                           FieldName="Date" />
                        <telerik:ItemMapping DataPointMember="YValue"
                                           FieldName="Value1" />
                    </telerik:SeriesMapping.ItemMappings>
                </telerik:SeriesMapping>
                <telerik:SeriesMapping LegendLabel="{Binding PreIndicatorName}">
                    <telerik:SeriesMapping.SeriesDefinition>
                        <telerik:LineSeriesDefinition ShowItemLabels="False" ShowPointMarks="False" LegendDisplayMode="SeriesLabel" />
                    </telerik:SeriesMapping.SeriesDefinition>
                    <telerik:SeriesMapping.ItemMappings>
                        <telerik:ItemMapping DataPointMember="XValue"
                                           FieldName="Date" />
                        <telerik:ItemMapping DataPointMember="YValue"
                                           FieldName="Value2" />
                    </telerik:SeriesMapping.ItemMappings>
                </telerik:SeriesMapping>
            </telerik:RadChart.SeriesMappings>
        </telerik:RadChart>

And here is my ViewModel Properties.

public List<LOB.DateValuesChartData> CorrelationChartData
        {
            get
            {
                return _ChartData;
            }
        }
 
        public string CurrentIndicatorName { get { return _CurIndicatorName; } }
        public string PreIndicatorName { get { return _PrevIndicatorName; } }
Ves
Telerik team
 answered on 06 Dec 2011
5 answers
254 views

Hello,
I would like to implement a context menu for all my application treeviews that allow users to ExpandAll, CollapseAll and Find text into nodes.
 For example, manage a style in the ressource dictionnary that looks like this :

<Style x:Key="StyleTreeViewWithContextMenu" TargetType="{x:Type telerik:RadTreeView}">
   <Setter Property="ContextMenu">
       <Setter.Value>
           <telerik:RadContextMenu>
               <telerik:RadMenuItem Header="Déployer tout"   />
               <telerik:RadMenuItem Header="Replier tout" />
               <telerik:RadMenuItem Header="Trouver" />
           </telerik:RadContextMenu>
      </Setter.Value>
   </Setter>
</Style>

How can I implement the actions of menuItems in order to apply this style on my treeviews?

Could you put me on track ?

Thanks in advance.
Olivier.

Petar Mladenov
Telerik team
 answered on 06 Dec 2011
8 answers
149 views
Hi,

I've got a simple RadGridView showing an ObservableCollection<> which is bound at run-time as the user can select which type to load. On the same grid I let my users dynamically create expression columns. All works fine and as expected excepting for the Export() function which doesn't seem to include any columns of type GridViewExpressionColumn.

This is how I create the columns at run-time:
var column = new GridViewExpressionColumn();
column.Expression = **some LINQ expression here**
column.UniqueName = field.Name;
var btnExpressionColumn = new RadButton();
column.Header = btnExpressionColumn;
 
btnExpressionColumn.Content = field.Name;
btnExpressionColumn.Click += new RoutedEventHandler(btnExpressionColumn_Click);
 
gridView.Columns.Add(column);

And this is how I export the grid:
using (Stream stream = dialog.OpenFile())
{
    gridView.Export(stream,
     new GridViewCsvExportOptions()
     {
         Format = ExportFormat.Csv,
         ShowColumnHeaders = true,
         ShowColumnFooters = true,
         ShowGroupFooters = false,
     });
}

Please advise on how to solve this problem.

Thanks
Marcelo
Top achievements
Rank 1
 answered on 06 Dec 2011
1 answer
147 views
Hi

I want to have a textbox property in the property grid that supports multiple lines. I have overridden the EditorTemplate as follows:

<telerik:PropertyDefinition Binding="{Binding Description}" DisplayName="Description">
    <telerik:PropertyDefinition.EditorTemplate>
        <DataTemplate>
            <TextBox Text="{Binding Description, Mode=TwoWay}" TextWrapping="Wrap" VerticalScrollBarVisibility="Visible" AcceptsReturn="true" />
        </DataTemplate>
    </telerik:PropertyDefinition.EditorTemplate>
</telerik:PropertyDefinition>

When I run the code the long text does not wrap as expected.
Ivan Ivanov
Telerik team
 answered on 06 Dec 2011
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?