Telerik Forums
UI for WPF Forum
4 answers
227 views

Hi,

 I have attempted to add a RadContextMenu to a RadAutoCompleteBox but the context menu does not open when the RadAutoCompleteBox is clicked!  Can you see what my problem is please?

Regards,

Joe

 

<telerik:RadAutoCompleteBox x:Name="ColDriverAutoBox" Grid.Column="3" Grid.Row="0" Padding="6,0,0,4" AutoCompleteMode="SuggestAppend" DropDownWidth="240" WatermarkContent="Enter Collection Driver name" TextSearchPath="Name"  SelectionMode="Multiple"  
DisplayMemberPath="Code" SelectedItems="{Binding ColDrivers, Source={StaticResource ViewModel}}"            
DropDownItemTemplate="{StaticResource CustomDropDownItemTemplate}" IsTabStop="True" TabIndex="141" ContextMenu="{x:Null}"  >
                                                    <telerik:RadContextMenu.ContextMenu>
                                                        <telerik:RadContextMenu >
                                                            <telerik:RadMenuItem Header="Copy" />
                                                            <telerik:RadMenuItem Header="Paste" />
                                                            <telerik:RadMenuItem Header="Cut" />
                                                            <telerik:RadMenuItem IsSeparator="True" />
                                                            <telerik:RadMenuItem Header="Select All" />
                                                        </telerik:RadContextMenu>
                                                    </telerik:RadContextMenu.ContextMenu>
                                                </telerik:RadAutoCompleteBox>​

Nasko
Telerik team
 answered on 02 Nov 2015
2 answers
206 views

I need to have more than one appointment type, let's them be AppX and AppY, both derived from your Appointment class. One may have properties that the other does not, but at a minimum both have a subject, a start time and end time.

The AppointmentsSource property being bound to a Collection of Appointment objects, I can thus add AppX and AppY objects to it. 

So far, so good. Each appointment type is displayed in the schedule the way I want (I use a different template for each type).

Now I want to be able to show a create/edit dialog that is customized to each type of appointment. DialogX and DialogY would be associated to AppX and AppY, respectively. And if the user double-clicks on an empty slot, I want to create an appointment of type AppX through DialogX.

This is where I'm stuck.

I thought of hooking to the AppointmentCreating and AppointmentEditing events, and show the appropriate dialog there. Is this the correct technique?

Or would you not happen by any chance to have a sample that illustrates how this could be done?

 

Nasko
Telerik team
 answered on 02 Nov 2015
2 answers
135 views

I've just updated the Telerik controls and now I am trying to find a new way to apply my filtering.

 Previously I had a FilterDescriptor defined in the XAML for my grid, that allowed me to filter on a Data Member without including that member as a column. The grid is bound to a child collection of a parent object (which is the data context for the User control). But I need to filter the child collection so that items marked IsDeleted are never shown to the user.

 What is the easiest, quickest way to do this now that FilterDescriptors are no more?

Stefan
Telerik team
 answered on 02 Nov 2015
1 answer
174 views

Hi,

I'm using binding sampling threshold in chartview, everything is ok until i'm going to another view. It throws NullReferenceException in Telerik.Windows.controls.Chart.dll in method SampleThresholdData because internalView is null.

 Is this a bug, or i am doing something wrong?

Thanks

Dinko | Tech Support Engineer
Telerik team
 answered on 02 Nov 2015
3 answers
110 views

What is the purpose of this property?

I was under the impression that it might be used to indicate that an event extends across the whole day, that is, from 00:00 to 23:59 (or from the open hour up to the close hour).

But if I don't supply a start time and end time, nothing is shown (if I leave out the end time, the duration is that of a single slot located at the specified start time). And if I have to supply a start time and an end time, that kind of defeats the purpose.

What am I missing?

 

Kalin
Telerik team
 answered on 02 Nov 2015
2 answers
311 views

Hello,

I wonder if it is possible to work with lists and arrays in RadPropertyGrid in the same way. Maybe some example will clarify my problem:

At runtime I bind object of type shown below to RadPropertyGrid.Item:

public class ​SampleType
 {
        public int Id { get; set; }
        public string Content { get; set; }
        public int[] array { get; set; }
        public List<int> list { get; set; }
 }

List is initialized but empty, the same in the case of the array.

In GUI I can modify list property (add/remove items and modify their content), but array property cannot be modified in any way. I understand more static nature of arrays in .NET, but maybe it is possible to enable 'dynamic arrays' in RadPropertyGrid using some property or custom made extension method.

I would be most grateful if you would look into this matter as soon as possible and at least tell me if it is possible :).

 

Best Regards,

Maciej Nowicki

Maciej
Top achievements
Rank 1
 answered on 30 Oct 2015
1 answer
147 views

Hello,

in a grid view with filter:

  1. Open a filter.
  2. Where the the filter display "Or", clic on the combo box and leave it open.
  3. Clic on another place in the application, the combo box is closed, but not the filter.
Yoan
Telerik team
 answered on 30 Oct 2015
3 answers
235 views
Just installed the latest WPF controls and the Demo app but the demo app isn't working.  The app is looking for Telerik.Windows.Control version 2015.3.930.40 and failing to find that version, but  I have 2015.3.930.45 installed locally.  Should this be working correctly or is something broken?  Thanks.
Stefan Nenchev
Telerik team
 answered on 29 Oct 2015
1 answer
215 views
Hi! I know how to set a custom style for the field of a property grid but I cant figure out how I am supposed to make that style bound to anything that is relative to the specific PropertyDefinition of that field.
 
The PropertyGridField's PropertyDefinition is the default source the style's binding. The binding path of the PropertyDefinition might be "Communication.Timeout" but I want to bind the FontWeight property to "Communication.TimeoutProperty.Mode". How can this be done? 

 

Do I have to create a subclass of PropertyDefinition with my own dependency properties on to be able to do this?  

<telerik:RadPropertyGrid
    Name="PropertyGrid"
    IsGrouped="True"
    Item="{Binding SelectedItem}"
    EditMode="Single"
    RenderMode="Flat"                                 
    FieldStyle="{DynamicResource PropertyGridFieldStyle}"
    AutoGeneratePropertyDefinitions="False">
    <telerik:RadPropertyGrid.Resources>               
        <Style x:Key="PropertyGridFieldStyle"
               TargetType="{x:Type telerik:PropertyGridField}"
               BasedOn="{StaticResource PropertyGridFieldStyle}">                   
                    <Setter Property="FontWeight" Value="{Binding Path=???}"/>
        </Style>
    </telerik:RadPropertyGrid.Resources>
</telerik:RadPropertyGrid>
Stefan
Telerik team
 answered on 29 Oct 2015
3 answers
202 views
Hi every one on Telerik :P
Im getting a Exception Which is unknown to me and apparently Microsoft

Sinse i'm new to templating in WPF i'm not really sure what is hapening, I get this Exception "Provide value on 'System.Windows.Baml2006.DeferredBinaryDeserializerExtension' threw an exception." and the inner exception "Token is not valid."

Is there any reason why i would get this? Please help.

Here is my Stack Trace and Source Code.

   at System.Windows.Markup.XamlReader.RewrapException(Exception e, Uri baseUri)
   at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlReader templateReader, XamlObjectWriter currentWriter)
   at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlObjectWriter objectWriter)
   at System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent(DependencyObject container, IComponentConnector componentConnector, IStyleConnector styleConnector, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField)
   at System.Windows.FrameworkTemplate.LoadContent(DependencyObject container, List`1 affectedChildren)
   at System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate)
   at System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 templateDataField, FrameworkElement container)
   at System.Windows.FrameworkElement.ApplyTemplate()
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.MeasureOverride(Size constraint) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP2\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewVirtualizingPanel.cs:line 1269

<Page x:Class="GridTest.Page1"
      mc:Ignorable="d" Title="SomePage"
      xmlns:controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" xmlns:my="clr-namespace:GridTest" xmlns:gridview="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView">
    <Page.Resources>
        <my:NorthwindOADataSet x:Key="northwindOADataSet" />
        <CollectionViewSource x:Key="employeesViewSource" Source="{Binding Path=Employees, Source={StaticResource northwindOADataSet}}" />
         
        <ControlTemplate x:Key="ImageCellTemplate" TargetType="{x:Type telerik:GridViewCell}">
            <Rectangle RadiusX="5" RadiusY="100" Height="100">
                <Rectangle.Fill>
                    <ImageBrush x:Name="brush" ImageSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content}"></ImageBrush>
                </Rectangle.Fill>
            </Rectangle
        </ControlTemplate>
         
        <ControlTemplate x:Key="MyCustomRowTemplate" TargetType="{x:Type telerik:GridViewRow}">
            <Border Background="Transparent" Name="selectedRow" Margin="0" Opacity="1" BorderThickness="0,1,0,1" VerticalAlignment="Center">
                <Grid Width="400">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="30"/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="35"/>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="100"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Border Height="Auto" HorizontalAlignment="Left" Background="#FF233052" Margin="2,1,0,0" Width="400" BorderBrush="#FFFFFFFF" CornerRadius="5,5,5,5" BorderThickness="1" Grid.ColumnSpan="4">
                    </Border>
                    <Border Height="Auto" Grid.Row="1" HorizontalAlignment="Left" Background="#FF5E78BA" Margin="2,1,0,0" Width="400" BorderBrush="#FFFFFFFF" CornerRadius="5,5,5,5" BorderThickness="1" Grid.ColumnSpan="4" Grid.RowSpan="4">
                    </Border>
                     
                    <gridview:GridViewCell Grid.Row="0" Grid.Column="1" Foreground="#FFFFFFFF" Width="200" Margin="0,5,0,0" HorizontalAlignment="Left" Name="FirstName" TextBlock.FontSize="16" VerticalAlignment="Center"/>
 
                    <gridview:GridViewCell Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="2" Foreground="#FFFFFFFF" Width="200" Margin="0,5,0,0" HorizontalAlignment="Left" Name="Title" TextBlock.FontSize="16" VerticalAlignment="Center" />
 
                    <gridview:GridViewCell Name="LastName" TextBlock.Foreground="#FFC4D2EF" Grid.Row="1" Grid.Column="0" Grid.RowSpan="3" Width="100" Margin="10,0,0,12">
                        <gridview:GridViewCell.LayoutTransform>
                            <TransformGroup>
                                <RotateTransform Angle="270"/>
                            </TransformGroup>
                        </gridview:GridViewCell.LayoutTransform>
                    </gridview:GridViewCell>
                     
                    <gridview:GridViewCell Name="Photo" HorizontalAlignment="Center" VerticalAlignment="Center" Template="{StaticResource ImageCellTemplate}" Margin="10,50,10,20" Grid.Column="1" Grid.Row="0" Grid.RowSpan="4"/>
                     
                    <Label Grid.Column="2" Foreground="FFC4D2EF" Grid.Row="1" Content="Street Address"/>
                    <Label Grid.Column="2" Foreground="FFC4D2EF" Grid.Row="2" Content="City:"/>
                    <Label Grid.Column="2" Foreground="FFC4D2EF" Grid.Row="3" Content="HomePhone:"/>
 
                    <gridview:GridViewCell Grid.Column="3" TextBlock.Foreground="#FFFFFFFF" Grid.Row="1" Name="Address">
                        <gridview:GridViewCell.Template>
                            <ControlTemplate>
                                <TextBlock TextWrapping="Wrap" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Context}"/>
                            </ControlTemplate>
                        </gridview:GridViewCell.Template>
                    </gridview:GridViewCell>
 
                    <gridview:GridViewCell TextBlock.Foreground="#FFFFFFFF" Grid.Column="3" Grid.Row="2" Name="City"/>
                    <gridview:GridViewCell TextBlock.Foreground="#FFFFFFFF" Grid.Column="3" Grid.Row="3" Name="HomePhone"/>
                    <gridview:GridViewCell Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="4" TextBlock.Foreground="#FFFFFFFF" Name="Notes">
                        <gridview:GridViewCell.Template>
                            <ControlTemplate>
                                <TextBlock TextWrapping="Wrap" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Context}" />
                            </ControlTemplate>
                        </gridview:GridViewCell.Template>
                    </gridview:GridViewCell>
                     
                </Grid>
            </Border>
        </ControlTemplate>
         
        <Style TargetType="{x:Type gridview:GridViewRow}">
            <Setter Property="telerik:GridViewRow.Template" Value="{StaticResource MyCustomRowTemplate}"/>
        </Style>
         
    </Page.Resources>
    <Grid DataContext="{StaticResource employeesViewSource}">
        <controls:RadGridView HorizontalAlignment="Left" Name="radGridView1" VerticalAlignment="Top" ScrollMode="RealTime" IsReadOnly="True" AutoGenerateColumns="False" ItemsSource="{Binding}">
            <controls:RadGridView.Columns>
                <controls:GridViewDataColumn DataType="{x:Null}" UniqueName="EmployeeID" />
                <controls:GridViewDataColumn DataType="{x:Null}" UniqueName="LastName" />
                <controls:GridViewDataColumn DataType="{x:Null}" UniqueName="Photo" IsSortable="True" />
                <controls:GridViewDataColumn DataType="{x:Null}" UniqueName="Title" />
                <controls:GridViewDataColumn DataType="{x:Null}" UniqueName="City" />
                <controls:GridViewDataColumn DataType="{x:Null}" UniqueName="HomePhone" />
            </controls:RadGridView.Columns>
        </controls:RadGridView>
    </Grid>
</Page>
 
Source Code is not much
 
public Page1()
        {
            InitializeComponent();
 
            var dbdata = new NorthwindOADataSetTableAdapters.EmployeesTableAdapter();
            radGridView1.DataContext = dbdata.GetData();
        }
Petya
Telerik team
 answered on 29 Oct 2015
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?