Telerik Forums
UI for WPF Forum
8 answers
309 views
Hi, how can I programatically add child tables and relations (hierarchies) to a WPF RadGridView? Can I add more than one level of hierarchies?

I need to create something like a master/details view in my RadGridView, but every detail can have its own details as well (that's why I need more that one level of hierarchies).

Thanks a lot.
Stefan
Telerik team
 answered on 20 Sep 2017
14 answers
481 views
Hi,
I have derived a custom class from the RadGridView to expose some dependency properties, and in the XAML when I create a control and binding its ItemSource to my viewmodel, then in the design view I'm getting the below error, and due to which the design view is not appearing, can you please help me:

Error 119 The local property "ItemsSource" can only be applied to types that are derived from "DataControl".

Thanks.

Gaurav Gupta
Martin
Telerik team
 answered on 20 Sep 2017
3 answers
678 views

Hi,

I am using Q3 2015.

I have editable RadGridView with two rows: Name and Count.

Name is editable.

Count is readonly.

When user clicks on "new row indicator" new row is created and focus is set to Name cell.

User enters text in name cell and clicks on "Count" cell.

My problem is that row remains in edit mode, "new row indicator" is not visible. User is confused because he thinks that edit is finished and there is no way to add another row.

To finish row edit user have to use tab key or click on any other control. Is there a way to end edit mode when any of readonly cells are focused?

My grid configuration:

<telerik:RadGridView
    x:Name="DocumentPositionsGridView"
    Style="{StaticResource EditableGridViewStyle}"
    SelectionMode="Extended"
    ItemsSource="{Binding Data, ValidatesOnDataErrors=True, NotifyOnValidationError=True}"
    ValidatesOnDataErrors="InViewMode"
    AddingNewDataItem="DocumentPositionsGridView_AddingNewDataItem"
    CellEditEnded="DocumentPositionsGridView_CellEditEnded"
    CanUserDeleteRows="{Binding CanEditDocumentPositions}"
    CanUserInsertRows="{Binding CanEditDocumentPositions}"
    NewRowPosition="{Binding CanEditDocumentPositions, Converter={StaticResource BooleanToGridViewNewRowPositionConverter}}"
    ShowColumnFooters="True"
    >
 
<Style x:Key="EditableGridViewStyle" TargetType="{x:Type telerik:RadGridView}" BasedOn="{StaticResource RadGridViewStyle}">
    <Setter Property="ShowGroupPanel" Value="False"/>
    <Setter Property="AutoGenerateColumns" Value="False"/>
    <Setter Property="IsFilteringAllowed" Value="False"/>
    <Setter Property="GroupRenderMode" Value="Flat"/>
    <Setter Property="NewRowPosition" Value="Bottom"/>
</Style>



 

 

Lukasz
Top achievements
Rank 1
 answered on 20 Sep 2017
3 answers
156 views

Hey,

In my project, I'm using a ScheduleView to display all scheduled appointments within a range of days. Objective is to find an empty slot for a new appointment. However, I already know how long will be the new appointment and I would like to highlight the appropriate time range on mouse over.

The default behavior for the schedule view is to highlight only a single time slot on mouse over (using MouseOverHighlightStyle). In my case, I would like to display the full appointment length instead.

Moreover, if possible, I would like to change the background color of the highlight item if it overlaps another booking.

See attached file for basic mockups of expected behavior.

Regards,

Stefan
Telerik team
 answered on 19 Sep 2017
2 answers
624 views

Hi,

I am trying to disable 2-3 options from my combo box using converter. I do not want to use IsEnabled property as my data is dynamically populated. Therefore, I have created a converter for the same. 

However, when I am using <Style.Triggers> my combo box is coming blank.

PFB the xaml code used.

 

 <ScrollViewer.Resources>
        <converters:ComboboxDisableConverter x:Key="itemDisableconverter"/>
        <Style x:Key="EnableStyle" TargetType="telerik:RadComboBoxItem">
            <Setter Property="IsEnabled" Value="True"/>
        </Style>
        <Style x:Key="DisableStyle" TargetType="telerik:RadComboBoxItem">
            <Setter Property="IsEnabled" Value="False"/>
        </Style>

 

 <telerik:RadComboBox Grid.Row="0" Grid.Column="1" Name="MeterTypes"
                                     VerticalContentAlignment="Center"
                                     IsReadOnly="False"
                                     DisplayMemberPath="Name"
                                     ClearSelectionButtonVisibility="Visible"
                                    ItemsSource="{Binding MeterTypes}">
                        <!--SelectedItem ="{Binding MeterTypes, Converter={StaticResource itemDisableconverter}, ConverterParameter={StaticResource itemDisableconverter}, Mode=TwoWay}">-->

                        <telerik:RadComboBox.ItemContainerStyle>
                            <Style TargetType="{x:Type telerik:RadComboBoxItem}">
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding Path=Text,
                                        RelativeSource={RelativeSource Self}, Converter={StaticResource itemDisableconverter}, ConverterParameter={StaticResource itemDisableconverter}}" Value="true">
                                        <Setter Property="IsEnabled" Value="False"/>
                                    </DataTrigger>
                                </Style.Triggers>
                                <Setter Property="IsEnabled" Value="True"/>
                            </Style>
                        </telerik:RadComboBox.ItemContainerStyle>

 

Instead when I am using the commented SelectedItem, my ComboBox is populated but my options are not greyed out.

Can you please help me here.

Thanks.

 

Pankhuri
Top achievements
Rank 1
 answered on 19 Sep 2017
8 answers
411 views
Hi!

There seems to be a bug in RadAutoCompleteBox displayed in DataGridTemplateColumns. While editing the DataGrid row the Texts of SelectedItems aren't visible but on lost focus they are.

namespace WpfApplication.ViewModels
{
    public class ListViewModel
    {
        public ListViewModel()
        {
            this.ViewModels = new ObservableCollection<ViewModel>() { new ViewModel() };
        }
         
        public ObservableCollection<ViewModel> ViewModels { get; set; }
         
    }
 
    public class ViewModel
    {
        public ObservableCollection<Country> AvailableCountries { get; set; }
        public ObservableCollection<string> SelectedCountries { get; set; }
  
        public ViewModel()
        {
            this.AvailableCountries = new ObservableCollection<Country>()
            {
                new Country() { Name = "Australia" , Capital = "Canberra" },
                new Country() { Name = "Bulgaria", Capital = "Sofia" },
                new Country() { Name = "Canada" , Capital = "Ottawa" },
                new Country() { Name = "Denmark" , Capital = "Copenhagen" },
                new Country() { Name = "France" , Capital = "Paris" },
                new Country() { Name = "Germany" , Capital = "Berlin" },
                new Country() { Name = "India" , Capital = "New Delhi" },
                new Country() { Name = "Italy" , Capital = "Rome" },
                new Country() { Name = "Norway" , Capital = "Oslo" },
                new Country() { Name = "Russia" , Capital = "Moscow" },
                new Country() { Name = "Spain " , Capital = "Madrid" },
                new Country() { Name = "United Kingdom" , Capital = "London" },
                new Country() { Name = "United States" , Capital = "Washington, D.C." },
            };
  
            this.SelectedCountries = new ObservableCollection<string>();
  
        }
    }
}

<Window x:Class="WpfApplication.MainWindow"
        xmlns:local="clr-namespace:WpfApplication.ViewModels"
        Title="MainWindow"
        Width="525"
        Height="350">
    <Window.Resources>
        <local:ListViewModel x:Key="ListViewModel" />
    </Window.Resources>
    <Grid>
        <DataGrid AutoGenerateColumns="False" ItemsSource="{Binding ViewModels, Source={StaticResource ListViewModel}}">
            <DataGrid.Columns>
                <DataGridTemplateColumn Width="*">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <telerik:RadAutoCompleteBox DisplayMemberPath="Name"
                                                        ItemsSource="{Binding AvailableCountries}"
                                                        SelectedItems="{Binding SelectedCountries}" />
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
            </DataGrid.Columns>
        </DataGrid>
    </Grid>
</Window>

Could you check that please?
qui
Top achievements
Rank 1
 answered on 19 Sep 2017
2 answers
178 views
Hi ,

Is there any option to perform Multiple column sorting in Radgridview  without using SHIFT Press?

If i select column 'A' to sort then in a signle click  i need to sort Column 'B' . Right now Radgridview by pressing SHIFT key i can perform the multiple column sorting.But I need to do multiple column sorting in a single click on second column.



Thanks,
Ashwin.
Stefan
Telerik team
 answered on 15 Sep 2017
5 answers
152 views
I have searched high an low and cannot figure out how to Hide the LayoutModeSelectorName  on the  RadRichTextBoxStatusBar.  I do not want my users switching to a different word layout in my application, how can I do this?

Thanks

Marc
Top achievements
Rank 1
 answered on 15 Sep 2017
2 answers
103 views

Hi,

We have scenario, where we need two RadScheduleViews for user to be able to use drag and drop between them.
They are both bound to the same AppointmentsSource collection but each has different ResourceTypesSource collection and here is the issue: Both these RadScheduleViews instances behave like they had the same ResourceTypesSource collection.
So it seems to me like some strange bug, especially when I am moving this functionality from Silverlight to WPF and it works OK in the Silverlight version.

So is it possible to fix this problem?

This is quite a follow up of this thread:
http://www.telerik.com/forums/freezing-row-in-timeline-view-in-radscheduleview

We are using latest version of Telerik controls.

I have prepared a MCV example where it is possible to see it, it is only not available to attach it here, but I can send it somehow.

Thank you,
Jiri

Dilyan Traykov
Telerik team
 answered on 15 Sep 2017
3 answers
192 views

Hi.

I using RadDocking for several languages with Resouce dictionary(DynamicResource in xaml).

if I Switching languages at runtime without LoadLayout() function then it works.

But If i use LoadLayout() at startup then switching language not working.

(Switching Style at runtime is still works with LoadLayout() )

Can anybody help this problem?

Dilyan Traykov
Telerik team
 answered on 15 Sep 2017
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
Slider
Expander
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?