Telerik Forums
UI for WPF Forum
4 answers
340 views
Hello sir,

I found something strange when I use RadGridView.
I'm using GridViewDataColumn and RadComboBox for my grid. and I also use CellStyle to enble/disble columns.

My code is as below.


<telerik:RadWindow x:Class="NetworkDesignTool.CameraSettingsPane"
                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"
                xmlns:primitives="clr-namespace:Telerik.Windows.Controls.Diagrams.Primitives;assembly=Telerik.Windows.Controls.Diagrams"
                xmlns:local="clr-namespace:NetworkDesignTool"
                Header="Video setup"
                ResizeMode="CanMinimize"
                WindowStartupLocation="CenterScreen"   
                Height="350" Width="600">
 
    <telerik:RadWindow.Resources>
        <Style x:Key="GridViewCellStyle" TargetType="telerik:GridViewCell" />
        <Style x:Key="OneClickComboBox" TargetType="telerik:RadComboBox">
            <Setter Property="OpenDropDownOnFocus" Value="True"/>
        </Style>
 
        <Style x:Key="disabledStyle" TargetType="telerik:GridViewCell">
            <Setter Property="IsEnabled" Value="{Binding IsActive, Mode=TwoWay}"/>
        </Style>
         
    </telerik:RadWindow.Resources>
     
     
    <Grid>
        <telerik:RadGridView RowIndicatorVisibility="Collapsed"
                             ShowGroupPanel="False"
                             AutoGenerateColumns="False"
                             CanUserFreezeColumns="False"
                             IsFilteringAllowed="False"
                             ItemsSource="{Binding VideoProfiles}">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding ID}"
                                            Header="ID" IsSortable="False" IsReadOnly="True"/>
 
                <telerik:GridViewDataColumn DataMemberBinding="{Binding IsActive}"
                                            Header="Use"
                                            IsReadOnly="True">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <CheckBox IsChecked="{Binding IsActive, Mode=TwoWay}"/>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
                 
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"
                                            Width="150"
                                            Header="Profile Name" IsSortable="False"
                                            CellStyle="{StaticResource disabledStyle}"
                                            />
 
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Codec, Mode=TwoWay}"
                                            Width="*"
                                            IsReadOnly="True"
                                            Header="Codec" IsSortable="False">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <telerik:RadComboBox SelectedValuePath="Codec"
                                                 SelectedValue="{Binding Codec}"
                                                 ItemsSource="{Binding CodecsRange}"
                                                 IsEnabled="{Binding IsActive, Mode=TwoWay}"
                                                 DisplayMemberPath="Name" />
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
 
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Resolution, Mode=TwoWay}"
                                            Width="*"
                                            IsReadOnly="True"
                                            Header="Resolution" IsSortable="False">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <telerik:RadComboBox SelectedValuePath="Resolution"
                                                 SelectedValue="{Binding Resolution}"
                                                 ItemsSource="{Binding ResolutionsRange}"
                                                 IsEnabled="{Binding IsActive, Mode=TwoWay}"
                                                 DisplayMemberPath="Name" />
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
 
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Framerate, Mode=TwoWay}"
                                            Width="*"
                                            IsReadOnly="True"
                                            Header="Framerate" IsSortable="False">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <telerik:RadComboBox SelectedValuePath="Framerate"
                                                 SelectedValue="{Binding Framerate}"
                                                 ItemsSource="{Binding FrameratesRange}"
                                                 IsEnabled="{Binding IsActive, Mode=TwoWay}"
                                                 DisplayMemberPath="Name" />
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
 
 
 
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
 
    </Grid>
</telerik:RadWindow>


And I am attaching a picture about this one.
Hyunho
Top achievements
Rank 1
 answered on 29 Apr 2013
2 answers
108 views
Hi,
Does RadEntityFrameworkDataSource of OpenAccess ORM fully supports? Or just EntityFramework support? If there's an example please upload. Thanks.
Steve
Top achievements
Rank 1
 answered on 29 Apr 2013
6 answers
152 views
I'm new to Open Access, WPF and XAML.
My problem is I'm using an OpenAccess reverse-modelled table as the source for a WPF DataForm.
Everything works great as long as I 'Edit' rows but...
 - can't Add (button is disabled)
 - can't Delete (button is disabled)
 - can't Cancel an edit (button is disable)
Committing an Edit works great.  Navigation works Great.

Am I missing a setting in my Model, WPF or in XAML?

Thanks...
Hiwa
Top achievements
Rank 2
 answered on 29 Apr 2013
1 answer
170 views
Hi,

i would like to use the RadTileList for the selection of single files from a Recently Used File list. How can I attach a command which gets executed when the users selects a tile?

I know that in the way Modern UI works there should be a separate action list with all the available actions. I just want that a single action is executed.

Right now I am using a separate button which is not intuitive especially within a touch based UI.

Regards,
Peter
Maya
Telerik team
 answered on 29 Apr 2013
1 answer
222 views
I've searched for a while but cannot seem to find a clear answer that works for the issue. I have a datagrid that is entirely auto generated. To this I added a context menu for right clicks when the cell is not in editable mode (see below). I would like to use the same menu when the cell is in edit mode i.e. I want to override the default context menu. I've tried various options including adding a CellEditTemplate in the code behind but this does not work because I need to reference the instance of the context menu in a non static (not sealed) context and templates only appear to want to work in a static/sealed context. What should I be doing?

<telerik:RadGridView x:Name="dataGridView" Margin="5,10,5,5"
    AutoGenerateColumns="True"
    AutoGeneratingColumn="DataGridView_AutoGeneratingColumn"
    ...other options....>
    <telerik:RadGridView.ContextMenu>
        <ContextMenu x:Name="gridContextMenu">
            <MenuItem x:Name="clearCellMenuItem" Header="Clear Cell" />
            <MenuItem x:Name="clearRowMenuItem" Header="Clear Row" />
            <MenuItem x:Name="clearAllMenuItem" Header="Clear All" />
            <Separator x:Name="separatorMenuItem" />
            <MenuItem x:Name="copyMenuItem" Command="Copy" Header="_Copy" />
            <MenuItem x:Name="pasteMenuItem" Command="Paste" Header="_Paste" />
        </ContextMenu>
    </telerik:RadGridView.ContextMenu>
</telerik:RadGridView>

Thanks

Colin
Yoan
Telerik team
 answered on 29 Apr 2013
2 answers
353 views
Hello,

I was trying to build up the DataTemplate for the HierarchyChildTemplate in my code.

As example the one from the online documentation http://www.telerik.com/help/wpf/gridview-how-to-access-child-gridview.html
<telerik:RadGridView Name="gridView" ItemsSource="{Binding Person}">
<telerik:RadGridView.ChildTableDefinitions>
<telerik:GridViewTableDefinition />
</telerik:RadGridView.ChildTableDefinitions>
<telerik:RadGridView.HierarchyChildTemplate>
<DataTemplate>
<telerik:RadGridView ItemsSource="{Binding Children}" Name="childGrid" ShowGroupPanel="False" />
</DataTemplate>
</telerik:RadGridView.HierarchyChildTemplate>
</telerik:RadGridView>

I tried something like:
gridView.HierarchyChildTemplate =
                new DataTemplate(
                        new RadGridView
                        {
                            ShowGroupPanel = false,
                            IsReadOnly = true,
                            ItemsSource = new Binding("Children")
                        });

But i set the dataType in that constructor and not same property like in the xaml. What's the property i need to set?

Thanks.


Jerome
Top achievements
Rank 1
 answered on 29 Apr 2013
3 answers
141 views
Hi,

I use ScheduleView in a WPF Application and I've got a problem running it on a Tablet PC : When the application starts, an exception is thrown indefinitely :
System.ArgumentNullException: La valeur ne peut pas être null.
Nom du paramètre : collection
   Ã  System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   Ã  System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   Ã  Telerik.Windows.Automation.Peers.RadDateTimePickerAutomationPeer.GetChildrenCore()
   Ã  System.Windows.Automation.Peers.AutomationPeer.EnsureChildren()
   Ã  System.Windows.Automation.Peers.AutomationPeer.UpdateChildren()
   Ã  System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   Ã  System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   Ã  System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   Ã  System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   Ã  System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   Ã  System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   Ã  System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   Ã  System.Windows.ContextLayoutManager.fireAutomationEvents()
   Ã  System.Windows.ContextLayoutManager.UpdateLayout()
   Ã  System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   Ã  System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
   Ã  System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   Ã  System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   Ã  System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   Ã  System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
   Ã  System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)

I use the 2012.2.0912.35 version of telerik components on Framework 3.5.

Can you help me with this ?

Thanks
Philippe
Ventzi
Telerik team
 answered on 29 Apr 2013
4 answers
82 views
is this telerik tilelist can be resize and the position is it can be preserved after the closed? any option..
Juzailie
Top achievements
Rank 2
 answered on 29 Apr 2013
2 answers
126 views
Hi,

Is there a property to control the size of the filter window?.  The buttons at the bottom (i.e. Clear Filter) as not visible.  It appears that there are to many item shown in the list with the check boxes.  I am using a split screen with the gridview getting about half the space.  If I give the grid more screen space it works ok.  Of course this is not acceptable.  For your information I am using a Dynamic Class Object for ItemsSource and creating the columns programatically.

Thanks
Rich
Richard Harrigan
Top achievements
Rank 1
 answered on 28 Apr 2013
10 answers
226 views
Was hoping the forum users could put a few different needle styles out here.
MarkInTexas
Top achievements
Rank 1
 answered on 27 Apr 2013
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?