Telerik Forums
UI for WPF Forum
3 answers
136 views
How can I add a combo-box to a single row's cell under a specific column?

I want a table like this:

| Property | Value |
| Name     | <string> |
| Config    | <comboboxList> |

The cell at row "Name", column "Value" is a simple text box editor.
How do I make the cell for row "Config", column "Value" a combo box?

Kind Regards,
Albert
Albert
Top achievements
Rank 1
 answered on 04 Dec 2012
2 answers
95 views
I have the following RadGridView defined (using .NET 4.5):

<telerik:RadGridView
                                 ScrollMode="Deferred"
                                 ColumnWidth="Auto"
                                 ActionOnLostFocus="None"
                                 AutoExpandGroups="False"
                                 SelectionMode="Extended"
                                 AutoGenerateColumns="False"
                                 EditTriggers="F2"
                                 IsSynchronizedWithCurrentItem="True"
                                 SelectionUnit="Mixed"
                                 ClipboardPasteMode="Default,AllSelectedCells,OverwriteWithEmptyValues"
                                    >
            <telerik:RadGridView.ChildTableDefinitions>
                <telerik:GridViewTableDefinition/>
            </telerik:RadGridView.ChildTableDefinitions>
           <telerik:RadGridView.HierarchyChildTemplate>
                <DataTemplate>
                 ...
               </DataTemplate>
            </telerik:RadGridView.HierarchyChildTemplate>
</telerik:RadGridView>

As of Q3 2012 SP1, I get the following two errors:

  1. The local property "IsSynchronizedWithCurrentItem" can only be applied to types that are derived from "DataControl".
  2. The specified value cannot be assigned to the collection. The following type was expected: "TableDefinition".

Any suggestions on how to resolve this?

Thank you.
Alan
Top achievements
Rank 2
 answered on 04 Dec 2012
1 answer
117 views
Hi,

I am trying to use the RadPaneGroup for WPF in a WPF application project but it is looking for the System.Windows dll.
If i include the dll, it has dulicate definitions from the PresentationFramework dll.

Am i missing soemthing here?

Regards,
SRini
George
Telerik team
 answered on 04 Dec 2012
0 answers
88 views
Hi,

I need to add a button to my WPF application that is touch enabled.  I'd like to use either a forward or home button that looks like a WinRT / Win8 touch button.  I've applied the Win8 touch theme to my application but I don't know where to go from here.

Teo
Teo
Top achievements
Rank 1
 asked on 04 Dec 2012
2 answers
133 views
Hi everyone,

I've just started testing out the Telerik components for WPF in search of a component bundle to purchase for
our development projects and have started out testing the GridView for WPF. A wonderful piece of work.

However, I have a question. How do I insert an image in a column based on the value of a checkbox that
resides in another column.

I.e, if the checkbox check state on column 0 is true I'd like to insert an image of a green tick icon (which I have as a .png file)
into column 1, etc.

Is there a simple way to achieve this?

I'm coming from Windows Forms development which makes all this XAML stuff a bit new to me so sorry for the newbie question.
Yoan
Telerik team
 answered on 04 Dec 2012
13 answers
516 views
Hello Together,
does anybody know if any print feature in Rad Grids exist. I have to evaluate the controls and couldn't find any Information about that.

Thanx an with best Regards
Jana
Vlad
Telerik team
 answered on 04 Dec 2012
0 answers
84 views
My docking definition contains one RadDocumentPane and several RadPane panes, as shown below.
Then, from UI, I'm switching between two docking pane layouts that contain no information about this RadDocumentPane. Still, it's there when deserialized.

<telerik:RadDocking.DocumentHost>
   <telerik:RadPaneGroup>
      <telerik:RadDocumentPane Visibility="Collapsed" CanFloat="False" CanUserClose="False"
                ContextMenuTemplate="{x:Null}" telerik:RadDocking.SerializationTag="MainPane">


How can I switch between two layouts and change the RadDocumentPane? As it is now, my document pane stays the same when I load different layouts - even though it's not even present in the serialized xml.

UPDATE
Solved it using the xml below. Used the wrong tags in my serialized xml. Sorry :)

<RadDocking>
  <DocumentHost>
    <RadSplitContainer>
      <Items>
        <RadPaneGroup SelectedIndex="0">
          <Items>
            <RadDocumentPane ... />
          </Items>
        </RadPaneGroup>
      </Items>
    </RadSplitContainer>
  </DocumentHost>
  <SplitContainers>
  ...
Kristoffer
Top achievements
Rank 1
 asked on 04 Dec 2012
5 answers
378 views

I tried to work with Demo Example: Grupping - Advanced, but it doesn´t work to me.I did small changes in code, but nothing difficult. The only thing which is working is Enable/disable groupping. When I uncheck a layer, layer is still visible in ScheduleView. Am I doing something wrong in my code?

MainWindow.xaml

<Window x:Class="TestScheduleView.MainWindow"
        Title="MainWindow" Height="500" Width="800"
        xmlns:telerikScheduler="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.ScheduleView"
        xmlns:telerikQuickStart="clr-namespace:Telerik.Windows.Controls.QuickStart;assembly=Telerik.Windows.Controls">
    <Window.Resources>
        <SolidColorBrush x:Key="MainBackground" Color="#FF000000" />
        <LinearGradientBrush x:Key="SubHeadingBackground" EndPoint="0.5,1" MappingMode="RelativeToBoundingBox"
                StartPoint="0.5,0">
            <GradientStop Color="#FF4B4B4B" Offset="1" />
            <GradientStop Color="#FF6E6E6E" />
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="SelectionOptionBackground" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FF1E1E1E" Offset="0" />
            <GradientStop Color="#FF040404" Offset="1" />
        </LinearGradientBrush>
        <SolidColorBrush x:Key="SelectionOptionBorderBrush" Color="#FF313132" />
        <Style x:Key="SelectionOptionStyle" TargetType="Border">
            <Setter Property="Background" Value="{StaticResource SelectionOptionBackground}" />
            <Setter Property="BorderBrush" Value="{StaticResource SelectionOptionBorderBrush}" />
            <Setter Property="BorderThickness" Value="1 0 1 1" />
            <Setter Property="MinHeight" Value="70" />
        </Style>
    </Window.Resources>
  
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="32" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="225" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Border Grid.RowSpan="2" Grid.ColumnSpan="2" telerikQuickStart:ThemeAwareBackgroundBehavior.IsEnabled="True" />
  
        <Border Background="#FF212121" Grid.RowSpan="2" />
  
        <Border Background="{StaticResource MainBackground}" Grid.ColumnSpan="2">
            <TextBlock Text="Grouping and Filtering"  FontFamily="Segoe UI"
                    HorizontalAlignment="Left" Foreground="#FFE5E2E2" Margin="13 0 0 0" FontSize="16" TextWrapping="Wrap"
                    VerticalAlignment="Center" />
        </Border>
  
        <StackPanel Grid.Row="1" Orientation="Vertical">
            <Border Background="{StaticResource SubHeadingBackground}" Height="32">
                <TextBlock Text="Select a Layer" TextWrapping="Wrap" FontSize="13" Foreground="#FFEBE9E9"
                        FontFamily="Segoe UI" VerticalAlignment="Center" Margin="13 0 0 0" />
            </Border>
            <Border Background="{StaticResource MainBackground}" Height="32">
                <CheckBox IsChecked="{Binding EnableGrouping}" Content="Enable Grouping"
                         Foreground="#FFA9A9A9" FontWeight="Normal"
                        Margin="13 0 0 0" VerticalAlignment="Center" />
            </Border>
  
            <Border Style="{StaticResource SelectionOptionStyle}" Height="32">
                <StackPanel Orientation="Horizontal" Margin="5">
                    <CheckBox IsChecked="{Binding ShowPresentationLayer}" Content="Fixed" IsEnabled="{Binding EnableGrouping}"
                              Foreground="#FFA9A9A9" VerticalAlignment="Center" Margin="10" Padding="10 0 0 0" />
                </StackPanel>
            </Border>
            <Border Style="{StaticResource SelectionOptionStyle}">
                <StackPanel Orientation="Horizontal" Margin="5">
                    <CheckBox IsChecked="{Binding ShowDataLayer}" Content="PeriodicFixed" IsEnabled="{Binding EnableGrouping}"
                              Foreground="#FFA9A9A9"  VerticalAlignment="Center" Margin="10" Padding="10 0 0 0"/>
                </StackPanel>
            </Border>
            <Border Style="{StaticResource SelectionOptionStyle}">
                <StackPanel Orientation="Horizontal" Margin="5">
                    <CheckBox IsChecked="{Binding ShowBusinessLayer}" Content="Periodical" IsEnabled="{Binding EnableGrouping}"
                              Foreground="#FFA9A9A9"  VerticalAlignment="Center" Margin="10" Padding="10 0 0 0"/>
                </StackPanel>
            </Border>
        </StackPanel>
  
        <telerikScheduler:RadScheduleView Grid.Column="1" Grid.Row="1" 
                                          SnapAppointments="True" 
                                          x:Name="radScheduler"
                AppointmentsSource="{Binding Appointments}" 
                GroupDescriptionsSource="{Binding GroupDescriptions}"
                ActiveViewDefinitionIndex="1">
  
            <telerikScheduler:RadScheduleView.ViewDefinitions>
                <telerikScheduler:DayViewDefinition GroupFilter="{Binding GroupFilter}" Orientation="Horizontal" DayStartTime="12:00:00" />
                <telerikScheduler:WeekViewDefinition GroupFilter="{Binding GroupFilter}" Orientation="Horizontal" DayStartTime="12:00:00" />
                <telerikScheduler:MonthViewDefinition GroupFilter="{Binding GroupFilter}" />
                <telerikScheduler:TimelineViewDefinition GroupFilter="{Binding GroupFilter}" />
            </telerikScheduler:RadScheduleView.ViewDefinitions>
  
  
            <telerikScheduler:RadScheduleView.ResourceTypesSource>
                <telerikScheduler:ResourceTypeCollection>
                    <telerikScheduler:ResourceType Name="Category">
                        <telerikScheduler:Resource ResourceName="Fixed" />
                        <telerikScheduler:Resource ResourceName="PeriodicFixed" />
                        <telerikScheduler:Resource ResourceName="Periodical" />
                    </telerikScheduler:ResourceType>
                </telerikScheduler:ResourceTypeCollection>
            </telerikScheduler:RadScheduleView.ResourceTypesSource>
        </telerikScheduler:RadScheduleView>
    </Grid>
</Window>

MainWindow.xaml.cs

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.Navigation;
using System.Windows.Shapes;
  
namespace TestScheduleView
{
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
  
            this.DataContext = new ViewModel();
        }
    }
}

ViewModel.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Telerik.Windows.Controls.ScheduleView;
using Telerik.Windows.Controls;
using System.ComponentModel;
  
namespace TestScheduleView
{
    class ViewModel : ViewModelBase
    {
        private bool showBusinessLayer = true;
        private bool showDataLayer = true;
        private bool showPresentationLayer = true;
        private bool enableGrouping = true;
        private GroupDescriptionCollection groupDescriptions;
        private Func<object, bool> groupFilter;
  
        public bool ShowBusinessLayer
        {
            get
            {
                return this.showBusinessLayer;
            }
            set
            {
                if (this.showBusinessLayer != value)
                {
                    this.showBusinessLayer = value;
                    this.OnPropertyChanged(() => this.ShowBusinessLayer);
                    this.UpdateGroupFilter();
                }
            }
        }
  
        public bool ShowDataLayer
        {
            get
            {
                return this.showDataLayer;
            }
            set
            {
                if (this.showDataLayer != value)
                {
                    this.showDataLayer = value;
                    this.OnPropertyChanged(() => this.ShowDataLayer);
                    this.UpdateGroupFilter();
                }
            }
        }
  
        public bool ShowPresentationLayer
        {
            get
            {
                return this.showPresentationLayer;
            }
            set
            {
                if (this.showPresentationLayer != value)
                {
                    this.showPresentationLayer = value;
                    this.OnPropertyChanged(() => this.ShowPresentationLayer);
                    this.UpdateGroupFilter();
                }
            }
        }
  
        public bool EnableGrouping
        {
            get
            {
                return this.enableGrouping;
            }
            set
            {
                if (this.enableGrouping != value)
                {
                    this.enableGrouping = value;
                    this.OnPropertyChanged(() => this.EnableGrouping);
  
                    this.UpdateGroupDescriptions();
                }
            }
        }
  
        public GroupDescriptionCollection GroupDescriptions
        {
            get
            {
                if (this.groupDescriptions == null)
                {
                    this.groupDescriptions = new GroupDescriptionCollection() { new DateGroupDescription() };
                    this.UpdateGroupDescriptions();
                }
                return this.groupDescriptions;
            }
        }
  
        public Func<object, bool> GroupFilter
        {
            get
            {
                return this.groupFilter;
            }
            private set
            {
                this.groupFilter = value;
                this.OnPropertyChanged(() => this.GroupFilter);
            }
        }
  
        private void UpdateGroupFilter()
        {
            this.GroupFilter = new Func<object, bool>(this.GroupFilterFunc);
        }
  
        private bool GroupFilterFunc(object groupName)
        {
            IResource resource = groupName as IResource;
  
            if (resource == null)
                return true;
  
            IEnumerable<string> enumerable = GetEnabledGroups();
  
            foreach (string str in enumerable)
            {
                if (str.ToLower().Equals(resource.ResourceName.ToLower()))
                    return true;
            }
  
            return false;
        }
  
        private ObservableAppointmentCollection appointments;
        public ObservableAppointmentCollection Appointments
        {
            get
            {
                return this.appointments;
            }
            set
            {
                this.appointments = value;
            }
        }
  
        public ViewModel()
        {
            appointments = new ObservableAppointmentCollection();
  
            Appointment appointment = new Appointment();
            appointment.Start = DateTime.Now;
            appointment.End = DateTime.Now.AddHours(1);
            appointment.Subject = "New appointment";
            Resource r = new Resource();
            r.ResourceName = "Periodical";
            r.ResourceType = "Category"; 
            appointment.Resources.Add(r);
            Appointments.Add(appointment); 
        }
  
        private IEnumerable<string> GetEnabledGroups()
        {
            List<string> enabledGroups = new List<string>();
  
            if (this.ShowPresentationLayer) enabledGroups.Add("Fixed");
            if (this.ShowDataLayer) enabledGroups.Add("PeriodicFixed");
            if (this.ShowBusinessLayer) enabledGroups.Add("Periodical");
  
            return enabledGroups;
        }
  
        private void UpdateGroupDescriptions()
        {
            if (this.EnableGrouping)
            {
                ResourceGroupDescription groupDescription = new ResourceGroupDescription();
                groupDescription.ResourceType = "Category";
                this.GroupDescriptions.Add(groupDescription);
            }
            else
            {
                this.GroupDescriptions.RemoveAll((GroupDescription g) => g is ResourceGroupDescription);
            }
        }
    }
}

Paolo
Top achievements
Rank 1
 answered on 04 Dec 2012
1 answer
122 views
Hi,

I am using a RadGridView control and I assign a List to ItemsSource propriety.
Now I want to modify the color of the cells of one column, depending on it content. So, if in a cell content is "X" I want to color with red, if it is "Y" I want to color with blue, ... (please see attachment)

Thanks
Vlad
Telerik team
 answered on 04 Dec 2012
1 answer
179 views
Hi,

I have a RadDataPager which shows in order to page a RadGridView content.
The PageSize is fixed, but I would like that it changes depending on height of a RadGridView, i.e., depending of screen resolution. The height for RadGridView is defined as "Auto", so I would like that the number of items that I have in each page is the maximum number of items that can feet without it has a scroll.

Any idea?

Rossen Hristov
Telerik team
 answered on 04 Dec 2012
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?