Telerik Forums
UI for WPF Forum
2 answers
88 views
Is it possible to set the schedule view to current month/week/day, The requirement is to have a button and when user clicks that month

- if the active view is month and lets say currently user is viewing Dec, on click of the button the view should automatically change to current month Oct
- same for week and day

Thanks
Vikas
  
Vikas
Top achievements
Rank 1
 answered on 23 Oct 2014
8 answers
362 views
I have a datagrid filled from an entity framework data model. 

One of the columns is a combobox and I need to bind the SelectedValue of the combobox to the navigation property of the entity and I need to bind the SelectedIndex to the ID. If I can't bind to both of those properties and keep them consistent (ID matches the value in the database) then Entity Framework is a pain to work with.

It's not hard to do with a standard WPF combobox as explained here:

http://www.codeproject.com/Articles/301678/Step-by-Step-WPF-Data-Binding-with-Comboboxes 

Here is the closes I've gotten: 

<telerik:GridViewComboBoxColumn Header="Units"                                                                                                                   ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}},Path=DataContext.UnitsOfMeasure}"                                                                                                                           DisplayMemberPath="Name"                                                                                                         DataMemberBinding="{Binding UnitOfMeasureID}"                                                                                     SelectedValueMemberPath="Id"/>

It Binds to the UnitsOfMeasure collection as the items source. It displays the name of the units as it should, and the UnitOfMeasureID in the datagrid row member is properly bound to the Id of the selected item from the combobox. The thing I can't seem to figure out is how to get the UnitOfMeasure object bound to the SelectedValue object of the combo box.

Thanks!

Eric
Top achievements
Rank 1
 answered on 23 Oct 2014
5 answers
197 views
I found this nice example on https://github.com/telerik/xaml-sdk about creating a Column Chooser for the GridView. However in my scenario I'm creating a GridView via custom control and I want to create the Column Chooser via RadWindow. I am unfortuantely unable to bind the Listbox ItemSource to the Columns property of the grid, am I missing something?
Below is my code to better explain:


Xaml:
<Window x:Class="WpfApplication1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        Title="MainWindow">
<Window.Resources>
        <DataTemplate x:Key="RadMenuContentTemplate">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="100" />
                </Grid.RowDefinitions>
                <TextBlock Text="Available columns:" />
                <ListBox Grid.Row="1" ItemsSource="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=telerik:RadGridView}, Path=Columns}">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <CheckBox Content="{Binding Header}" IsChecked="{Binding IsVisible, Mode=TwoWay}" />
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </Grid>
        </DataTemplate>
    </Window.Resources>
    <Grid>
        <telerik:RadGridView x:Name="RadGridView1" ItemsSource="{Binding View}" Grid.Row="1" ShowGroupPanel="False" />
    </Grid>
</Window>

Code-Behind:

public partial class MainWindow : Window
    {
        private readonly RadContextMenu defaultContextMenu = new RadContextMenu();

        public MainWindow()
        {
            InitializeComponent();
            var filterMenuItem = new RadMenuItem { Header = "Show/Hide Columns" };
            filterMenuItem.Click += this.FilterMenuItemClick;
            this.defaultContextMenu.Items.Add(filterMenuItem);
            RadContextMenu.SetContextMenu(this.RadGridView1, this.defaultContextMenu);
            
            DataContext = new MyDataContext();
        }

        private void FilterMenuItemClick(object sender, Telerik.Windows.RadRoutedEventArgs e)
        {
            var radWindow = new RadWindow
            {
                ContentTemplate = this.Resources["RadMenuContentTemplate"] as DataTemplate,
                CanClose = true,
                CanMove = false,
                ResizeMode = ResizeMode.NoResize,
                WindowStartupLocation = WindowStartupLocation.CenterScreen,
                HideMinimizeButton = true,
                HideMaximizeButton = true,
                MinHeight = 100
            };
            radWindow.ShowDialog();
        }
    }

Dongzhi
Top achievements
Rank 1
 answered on 23 Oct 2014
1 answer
163 views
I need to implement a radribbon view as MDI window.How can we set up a radribbon view as a MDI 
Martin Ivanov
Telerik team
 answered on 23 Oct 2014
1 answer
160 views
Hi Team,
Could you please clarify whether the below scenario is by Design / an issue

"Track Changes" is on by default, when Application is ready

Step 1) User aa logged in to Application and entered text :
        "This is a sample paragraph to verify with more users"

Step 2) User bb logged in to Application and entered text :
        "second bb"

Step 3) User bb deletes the words "with more users" (which is entered by User aa)
Now this delete operation is not marked with "Track Changes"

"Step 1 User aa.png"
"Step 2 User bb.png"
"Step 3 User bb.png"
Petya
Telerik team
 answered on 23 Oct 2014
8 answers
257 views
I've followed the tutorial on getting themes running. I have added the merged resource library to App.xaml and I can even apply themes listed in the theme files to my controls....but nothing happens.

For example, I have quite a few buttons and I do not have them themed, so according to the docs adding the merged resource library should start theming my buttons but it does not.

I went to an individual button and explicitly set the theme to the button style in the them file, and intellisence detected the them was there and everything but still no theme is applied. 

I do get the following error by all brush properties:

Object of type 'Telerik.Windows.Controls.VisualStudio2013ResourceKey' cannot be converted to type 'Telerik.Windows.Controls.VisualStudio2013ResourceKey'.

Maybe something didn't install properly? I've looked all over for those resources and I can't find them. 

Thanks!
Eric

Vanya Pavlova
Telerik team
 answered on 23 Oct 2014
1 answer
216 views
The content size becomes too small in the RadButton when I use Office2013 theme. (Telerik WPF library version 2014.2.729.45)
The content of the RadButton is an image by DrawingBrush (Please refer to following code snippet.),
the image is shown nicely with any themes except for Office2013.

<telerik:RadButton.Content>
 <Rectangle>
  <Rectangle.Fill>
   <DrawingBrush Stretch="Uniform">
    <DrawingBrush.Drawing>
     <GeometryDrawing Brush="Transparent" Geometry="M 25,121L 249,121L ...">
      <GeometryDrawing.Pen>
       <Pen Thickness="50" LineJoin="Round" Brush="Black"/>
      </GeometryDrawing.Pen>
     </GeometryDrawing>
    </DrawingBrush.Drawing>
   </DrawingBrush>
  </Rectangle.Fill>
 </Rectangle>
</telerik:RadButton.Content>

When I checked out with the Snoop tool, I learned the ContentPresenter Margin of the RadButton is a little big so the image was pushed in then it became small.
I explicitly set the height and width of the Rectagle to fix the image size though, the image was chopped out because the area was not large enough to display the whole image.

So is there a way to keep the image size consistent when Office2013 theme is selected?

Thanks...

Milena
Telerik team
 answered on 23 Oct 2014
3 answers
101 views
Hello,

I have a hierarchical radgridview and I would like to be able to copy / paste data from the grid to an excel spreadsheet either from the parent grid either from the child grid.
I use the rowdetailstemplate to load a view containing the child grid. The copy works for the parent grid, but selection is off and copy just does not work for the second grid.

Parent :
 
<telerik:RadGridView  x:Name="RadGridView1"    
                              Grid.Row="2"
                              ItemsSource="{Binding ResultsViewModelList}" AutoGenerateColumns="False"
                              custom:GridViewDataColumnsBehavior.BindableColumns="{Binding ColumnCollection}"
                              SelectionMode="Extended"
                              ScrollViewer.VerticalScrollBarVisibility="Visible"
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ColumnWidth="150" GroupRenderMode="Flat"
                              EnableColumnVirtualization="False"
                              ClipboardCopyMode="All"
                              >
            <telerik:RadGridView.RowDetailsTemplate>
                <DataTemplate >
                    <vw:ResultView DataContext="{Binding}"/>
                </DataTemplate>
            </telerik:RadGridView.RowDetailsTemplate>
        </telerik:RadGridView>

child:

<telerik:RadGridView Name="radGridView1" AutoGenerateColumns="True"   ItemsSource="{Binding Path=ItemsList}"
                          ColumnWidth="150" GroupRenderMode="Flat" EnableColumnVirtualization="False" EnableRowVirtualization="False"
                          ClipboardCopyMode="All" SelectionMode="Multiple" SelectionUnit="FullRow">
     </telerik:RadGridView>

Loic
Top achievements
Rank 1
 answered on 23 Oct 2014
5 answers
163 views
Hi,

I'm using Telerik V2012.2.912.35 on a Windows 7 OS and when I minimized my RadWindow to my taskbar, if I bring my mouse over the application on the taskbar I see a small window representing my RadWindow, If I click on the little red X in the upper right corner my application crash.

Here is the code I use to create an instance and display my RadWindow:

mSignatureFormOpened = new SignatureForm();
mSignatureFormOpened.ShowDialog();

When I close it, I have to following exception but when the WindowState is normal or maximized everything are fine:

System.InvalidOperationException was unhandled by user code
  Message="Impossible de définir Visibility à Visible ou d'appeler Show, ShowDialog ou Close lorsque la fenêtre est en cours de fermeture."
  Source="PresentationFramework"
  StackTrace:
       à System.Windows.Window.VerifyNotClosing()
       à System.Windows.Window.InternalClose(Boolean shutdown, Boolean ignoreCancel)
       à System.Windows.Window.Close()
       à Telerik.Windows.Controls.InternalWindow.WindowWithNoChromeWindowHost.Close() dans c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\InternalWindow\WindowWithNoChromeWindowHost.cs:ligne 60
       à Telerik.Windows.Controls.WindowBase.CloseHostImidiately() dans c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:ligne 1229
       à Telerik.Windows.Controls.WindowBase.OnCloseAnimationFinished() dans c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:ligne 1071
       à Telerik.Windows.Controls.WindowBase.PlayCloseAnimation() dans c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:ligne 1017
       à Telerik.Windows.Controls.WindowBase.TryClose(Boolean shouldCloseHost) dans c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:ligne 652
       à Telerik.Windows.Controls.WindowBase.Telerik.Windows.Controls.InternalWindow.IWindowDragAware.TryClose(Boolean shouldCloseHost) dans c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:ligne 1257
       à Telerik.Windows.Controls.InternalWindow.WindowWithNoChromeWindowHost.OnWindowClosing(Object sender, CancelEventArgs e) dans c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\InternalWindow\WindowWithNoChromeWindowHost.cs:ligne 251
       à System.Windows.Window.OnClosing(CancelEventArgs e)
       à System.Windows.Window.WmClose()
  InnerException:



Thank's
Alain
Kalin
Telerik team
 answered on 22 Oct 2014
4 answers
205 views
Hi Team,
I have a grid view with a Radio button to select the row. I select a row, but when i scroll down and again come to original position(to the selected row), the selection get deselected, and sometimes some other row get selected.
How can we handle such problem.

Also, If I had some rowdetails in a grid, and fetch data from the database when row details visibility change, to populate the row details. This creates problem when row virtualization is enabled. There were many validation handeled to track the data change in row detail visibility change event, which get fired when we scroll and when we come to original position again, data does not get populated and my changes are lost.

Please let me know how to overcome such scenarios, when we enable row virtualization.

Thanks.
Mladen
Top achievements
Rank 1
 answered on 22 Oct 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?