Telerik Forums
UI for WPF Forum
1 answer
149 views

Hi,
below is a stripped down version of my rowdetail editor using a raddataform with a rowdetails template.
I tried adding CommandButtonsVisibility="All" but it did nothing. I want to show add, delete, edit etc. I'm only getting the edit button.

Some more issues.

1. The OK and Cancel Buttons are not picking up the global button style I have set in app.xaml.

2. Is it possible to have the OK button fire the RowEditEnded event?

3. The cancel button does not cancel the changes made in the dataform. Changes made to the form are immediately reflected in the
     RadGridView. I would have expected the cancel button to set things back to their original values. Am I missing something?

4. How do I get the radform to default to edit mode so that the user does not have to hit the edit button in the upper right corner first?

I've attached a screen shot.

Any help would be GREATLY appreciated.

Thanks ... Ed

 


<Grid.Resources>
    <DataTemplate x:Key="RowDetailsTemplate">
        <telerik:RadTabControl x:Name="SamplesTab"   HorizontalAlignment="Left"
                                    Margin="8" VerticalAlignment="Center">
            <telerik:RadTabItem Header="Sample Details" DataContext="{Binding}">

                <Grid Width="Auto" HorizontalAlignment="Stretch">
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="auto" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>

                    <telerik:DataFormDataField    Grid.Row="0" Grid.Column="0"
                                                    Label="Client Sample Id:"
                                                    DataMemberBinding="{Binding Sample.ClientSampleID, Mode=TwoWay }"
                                                    VerticalAlignment="Top"  />

                    <telerik:DataFormComboBoxField Grid.Row="1" Grid.Column="0" Label="Priority:"
                                                    ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor,
                                                            AncestorType={x:Type UserControl} },
                                                            Path=DataContext.Priorities}"
                                                    DisplayMemberPath="Value"
                                                    SelectedValuePath="Key"
                                                    DataMemberBinding="{Binding Sample.PriorityID, Mode=TwoWay }">

                    </telerik:DataFormComboBoxField>
                </Grid>
            </telerik:RadTabItem>
        </telerik:RadTabControl>

    </DataTemplate>
</Grid.Resources>



<telerik:RadGridView.RowDetailsTemplate>
    <DataTemplate>

        <telerik:RadDataForm CurrentItem="{Binding}" AutoGenerateFields="False"
            EditTemplate="{StaticResource RowDetailsTemplate}"
            NewItemTemplate="{StaticResource RowDetailsTemplate}"
            ReadOnlyTemplate="{StaticResource RowDetailsTemplate}"
                />
    </DataTemplate>
</telerik:RadGridView.RowDetailsTemplate>

 

Dilyan Traykov
Telerik team
 answered on 30 Nov 2016
0 answers
132 views

Hi,

I use the RadScheduleView and I try to add an command to the TimeRuler line (on each date). I implement custom TimeRulerItemTemplateSelector like this : 

TimeRulerItemTemplateSelector="{StaticResource CustomTimeRulerItemTemplateSelector}"

 

In this template, I use the HorizontalTimelineGroupTemplate with an TextBlock to format the text. This works great. I want to add an command to this TextBlock (or a button), but the command is never raised.

I have try with the InputBinding :

<selectors:CustomTimeRulerItemTemplateSelector.HorizontalTimelineGroupTemplate>
    <DataTemplate>
        <TextBlock  TextAlignment="Left" Padding="2,0">
            <TextBlock.Text>
                <MultiBinding Converter="{StaticResource DateToStringFormatConverter}">
                    <Binding Path="DateTime" />
                    <Binding Path="DataContext.PlanningHelper.GroupHeaderStringFormat" RelativeSource="{RelativeSource AncestorType={x:Type ucPlanning1:PlanningList}}" />
                </MultiBinding>
            </TextBlock.Text>
            <TextBlock.InputBindings>
                <MouseBinding Command="{Binding DataContext.TestCommand, RelativeSource={RelativeSource AncestorType={x:Type ucPlanning1:PlanningList}}}" MouseAction="LeftClick" />
            </TextBlock.InputBindings>
        </TextBlock>
    </DataTemplate>
</selectors:CustomTimeRulerItemTemplateSelector.HorizontalTimelineGroupTemplate>

 

And with telerik:EventToCommandBehavior.EventBindings :

<selectors:CustomTimeRulerItemTemplateSelector.HorizontalTimelineGroupTemplate>
    <DataTemplate>
        <TextBlock  TextAlignment="Left" Padding="2,0">
            <TextBlock.Text>
                <MultiBinding Converter="{StaticResource DateToStringFormatConverter}">
                    <Binding Path="DateTime" />
                    <Binding Path="DataContext.PlanningHelper.GroupHeaderStringFormat" RelativeSource="{RelativeSource AncestorType={x:Type ucPlanning1:PlanningList}}" />
                </MultiBinding>
            </TextBlock.Text>
            <telerik:EventToCommandBehavior.EventBindings>
                <telerik:EventBinding Command="{Binding DataContext.TestCommand, RelativeSource={RelativeSource AncestorType={x:Type ucPlanning1:PlanningList}}}" EventName="MouseEnter" />
            </telerik:EventToCommandBehavior.EventBindings>
        </TextBlock>
    </DataTemplate>
</selectors:CustomTimeRulerItemTemplateSelector.HorizontalTimelineGroupTemplate>

 

But my TestCommand is never call.

What's wrong with my code? How to implement command inside the TimeRuler?

Thanks for your help.

Johann
Top achievements
Rank 1
 asked on 30 Nov 2016
0 answers
40 views

Hello,

I want to Change Deadline forecolor to Blue of Telerik Gantt view. Now it is in Red color.

Please help me.

Thanks in advance

soham
Top achievements
Rank 1
 asked on 30 Nov 2016
7 answers
328 views

Hi,

I have a fairly complex setup as shown below. I am using row details to act as an editor for the selected row in the gridview. I have Expand mode set to single so only one row can be expanded at a time. My question is how to validate data before the move to another row, or try to navigate elsewhere, or close the app, etc.? As you can see from the xaml, I tried wiring up the RowEditEnded command to the RowEditEnded event, but it doesn't seem to ever fire.

Any guidance would be greatly appreciated.

Thanks ... Ed

 

 

<telerik:RadGridView  x:Name="ssSamples"
    AutoGenerateColumns="False"  IsReadOnly="True"
    ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor,
                                                AncestorType={x:Type UserControl} },
                                                Path=DataContext.Samples}"
    SelectedItem="{Binding SelectedRow}"
    MaxHeight="500" RowIndicatorVisibility="Visible" RowDetailsVisibilityMode="VisibleWhenSelected"  
    >
    <telerik:EventToCommandBehavior.EventBindings>
        <telerik:EventBinding Command="{Binding RowDetailsVisibilityChangingCommand}" EventName="RowDetailsVisibilityChanging"  PassEventArgsToCommand="True"/>
        <telerik:EventBinding Command="{Binding RowEditEndedCommand}" EventName="RowEditEnded"  PassEventArgsToCommand="True"/>
 
    </telerik:EventToCommandBehavior.EventBindings>
    <telerik:RadGridView.Columns>
        <telerik:GridViewToggleRowDetailsColumn  ExpandMode="Single" />
        <telerik:GridViewDataColumn Width="auto" Header="Sample Key" DataMemberBinding="{Binding Sample.Sample_Key}"/>
        <telerik:GridViewDataColumn Width="auto" Header="Client Sample Id" DataMemberBinding="{Binding Sample.ClientSampleID}"/>
        <telerik:GridViewDataColumn Width="auto" Header="Arrival" DataMemberBinding="{Binding ArrivalDesc}"/>
        <telerik:GridViewDataColumn Width="auto" Header="Status" DataMemberBinding="{Binding Sample.Status}"/>
    </telerik:RadGridView.Columns>
    <telerik:RadGridView.RowDetailsTemplate>
        <DataTemplate>
            <Grid Width="Auto" HorizontalAlignment="Stretch">
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition  />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition  />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
 
                <Label Grid.Row="0" Grid.Column="0" Content="Client Sample Id:" VerticalAlignment="Top"  />
                <TextBox x:Name="txtSampleId" Grid.Row="0" Grid.Column="1"
                                        HorizontalAlignment="Left" Text="{Binding Sample.ClientSampleID}" Width="250" />
                <Label Grid.Row="1" Grid.Column="0" Content="Priority:" VerticalAlignment="Top" />
                <telerik:RadComboBox x:Name="ddlPriority" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Left"
                                        VerticalAlignment="Top" Width="250"
                                        SelectedValuePath="Tag"
                                        SelectedValue="{Binding Sample.Priority, UpdateSourceTrigger=PropertyChanged }"
                                        SelectedIndex="0"
                                >
                    <telerik:RadComboBoxItem  Content="Low" Tag="Low"/>
                    <telerik:RadComboBoxItem  Content="Medium" Tag="Medium"/>
                    <telerik:RadComboBoxItem  Content="High" Tag="High"/>
                </telerik:RadComboBox>
                <Label Grid.Row="2" Grid.Column="0" Content="Arrival:" VerticalAlignment="Top" />
                <telerik:RadComboBox x:Name="ddlArrival" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left"
                                    VerticalAlignment="Top" Width="250" SelectedValuePath="Tag"
                                    SelectedValue="{Binding Sample.Arrival, UpdateSourceTrigger=PropertyChanged }"
                                    SelectedIndex="0"
                                >
                    <telerik:RadComboBoxItem  Content="No" Tag="0"/>
                    <telerik:RadComboBoxItem  Content="Park" Tag="1"/>
                    <telerik:RadComboBoxItem  Content="Returned" Tag="2"/>
                    <telerik:RadComboBoxItem  Content="Discarded" Tag="3"/>
                </telerik:RadComboBox>
                <Label Grid.Row="3" Grid.Column="0" Content="Status:" VerticalAlignment="Top" />
                <telerik:RadComboBox x:Name="ddlStatus" Grid.Row="3" Grid.Column="1" HorizontalAlignment="Left"
                                        VerticalAlignment="Top" Width="250"
                                        SelectedValuePath="Tag"
                                        SelectedValue="{Binding Sample.Status, UpdateSourceTrigger=PropertyChanged }"
                                        SelectedIndex="0"
                                >
                    <telerik:RadComboBoxItem Content="Incomplete" Tag="Incomplete"/>
                    <telerik:RadComboBoxItem Content="Complete" Tag="Complete"/>
                </telerik:RadComboBox>
                <Label Grid.Row="4" Grid.Column="0" Content="Description:" VerticalAlignment="Top" />
                <TextBox x:Name="txtSampleDesc" Grid.Row="4" Grid.Column="1" Grid.ColumnSpan ="2"
                                    Text="{Binding Sample.SampleDescription }" Height="60" Width="250" HorizontalAlignment="Left"
                                    TextWrapping="WrapWithOverflow" AcceptsReturn="True"  VerticalScrollBarVisibility="Auto"
                                    VerticalAlignment="Top" VerticalContentAlignment="Top"                 
                                />
 
                <Label Grid.Row="5" Grid.Column="0" Content="Comments:" VerticalAlignment="Top" />
                <TextBox x:Name="txtSampleComments" Grid.Row="5" Grid.Column="1"  Grid.ColumnSpan ="2"
                                        Text="{Binding Sample.Comments }" Height="60" Width="250" HorizontalAlignment="Left"
                                        TextWrapping="WrapWithOverflow" AcceptsReturn="True"
                                        VerticalScrollBarVisibility="Auto" VerticalAlignment="Top" VerticalContentAlignment="Top"                 
                            />
                <Label Content="Associated Techniques:" Grid.Row="0" Grid.Column="2" HorizontalAlignment="Left" HorizontalContentAlignment="Left"  Width="350" Height="auto"/>
                <StackPanel Orientation="Vertical" Grid.Row="1" Grid.Column="2" Grid.RowSpan ="5" MaxHeight="210" >
                    <ItemsControl x:Name ="lstTechniques" ItemsSource="{Binding AssociatedTechniques, Mode=TwoWay }"
                                                Margin="5,0,0,0"
                                                >
                        <ItemsControl.ItemsPanel>
                            <ItemsPanelTemplate>
 
                                <support:UniformGridWithOrientation Orientation="Vertical"  Columns="4"  />
                            </ItemsPanelTemplate>
                        </ItemsControl.ItemsPanel>
                        <ItemsControl.ItemTemplate>
                            <DataTemplate >
                                <CheckBox Content="{Binding TechniqueID}"
                                                        IsChecked="{Binding IsSelected, Mode=TwoWay}"
                                                        ToolTip="{Binding TechniqueName}"
                                      
                                                >
                                </CheckBox>
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>
 
                </StackPanel>
            </Grid>
        </DataTemplate>
    </telerik:RadGridView.RowDetailsTemplate>
</telerik:RadGridView>
Randy Hompesch
Top achievements
Rank 1
 answered on 29 Nov 2016
6 answers
522 views

Hello
Because some action on my window alters datacontext attached to a radigridview, I need to reset applied filter when datasource is altered.
I tried to launch command myGried.FilterDescriptors.Clear(); on SourceUpdated, DatacontextChange and DataLoaded event, but the first 2 aren't raised when RaisePropertyChange is raised, the last one (DataLoaded event) is raised but when I tried to clear FilterDescriptors, I got error that I can't alter datasource when loading.

Any idea how can I clear FilterDescriptors when datacontext change?

Thanks

JC
Top achievements
Rank 1
 answered on 29 Nov 2016
1 answer
94 views
I have a GridView whose ItemsSource binding to an ObservableCollection. The item in the collection implements INotifyPropertyChanged. After I update a property in the item code behind for example 'Price', the related SumFunction in GridViewDataColumn doesn't update. I don't want to call GridView.CalculateAggregates method. Is there any way to solve this problem.
Stefan
Telerik team
 answered on 29 Nov 2016
3 answers
219 views

Directory: UI for WPF R3 2016/Binaries.NoXaml/WPF45.

I noticed that Telerik.Windows.Documents.xxx assemblies e. g.

  • Telerik.Windows.Documents.Core.dll
  • Telerik.Windows.Documents.Spreadsheet.dll
  • Telerik.Windows.Documents.Flow.dll
  • etc.

all have a version number of 2016.3.1021.40 where I had actually expected 2016.3.1021.45. At least in former releases these assemblies ended in .40/.45. Now they have the same version number as the assemblies under /WPF40. This is somewhat confusing and can lead to errors.

Regards
Heiko

Martin Ivanov
Telerik team
 answered on 29 Nov 2016
1 answer
409 views

I am trying to color the Background of the TextBox within the RadComoboBox to be Pink is the search typed in fails.

<Style TargetType="TextBox" x:Key="CustomComboTextBoxStyle"  >
    <Style.Triggers>
        <DataTrigger Binding="{Binding SearchFailed}" Value="true">
            <Setter Property="Background" Value="LightPink" />
        </DataTrigger>
        <DataTrigger Binding="{Binding SearchFailed}" Value="false">
            <Setter Property="Background" Value="White" />
        </DataTrigger>
    </Style.Triggers>
</Style>

 

When I run, the SearchFailed is false and the background is white and that appears to work.  But when SearchFailed is true, the background does not change.

public bool SearchFailed
{
    get { return _searchFailed; }
    set
    {
        _searchFailed = value;
        NotifyPropertyChanged( "SearchFailed" );
    }
}

Is there something I need to do to tell the RadComboBox to update?

Mark
Top achievements
Rank 1
 answered on 28 Nov 2016
2 answers
73 views

Since updating to the latest R3 2016 I get exceptions when loading a XAML form/window/control in these three assemblies from VS ShadowCache:

  • Telerik.Windows.Controls.GridView.Design.5.0.dll
  • Telerik.Windows.Controls.Pivot.Design.5.0.dll
  • Telerik.Windows.Controls.PivotFieldList.Design.5.0.dll

I cleared the whole ShadowCache folders, deleted all assemblies from my project/bin folder and did a clean rebuild, but the error message still appears. There is no specific error message except "Exception has been thrown by the target of an invocation". I can still work with VS but the error messages are very annoying.

Regards
Heiko

Heiko
Top achievements
Rank 1
Iron
Veteran
 answered on 28 Nov 2016
4 answers
155 views

I have used telerik control for RadGridView in our application . With one application (Windows forms) it is behaving properly (windows 10 anniversary update)i.e it is getting dragged and droped but when i am trying the same thing in some other application we do not see the same behavior.

Description:

In second (WPF) application in UI we are not able to drag /drop the grid ( in windows 10 anniversary update) while in windows 8 we are able to perform both drag and drop operations. 

The Telerik version which we are using is 2011.3.1220.40

.Net version of the Components- 4.0

 Below are the properties used in telerik grid:

<telerik:RadGridView x:Name="SrResultsGridView"
Controls:StyleManager.Theme="Office_Blue"
AutomationProperties.AutomationId="SrResultsGridView"
AutoGenerateColumns="False"
AutoExpandGroups="True"
CanUserFreezeColumns="False"
AllowDrop="True"
CanUserDeleteRows="False"
ActionOnLostFocus="None"
AreRowDetailsFrozen="True"
CanUserInsertRows="False"
ClipToBounds="True"
IsScrolling="False"
UseLayoutRounding="True"
SelectionMode="Extended"
ClipboardPasteMode="Default"
IsReadOnly="True"
IsFilteringAllowed="False"
VirtualizingStackPanel.IsVirtualizing="True"

Can you help me with this if it is compatibality issue with win 10 Anniversary update or some code changes need to be done so that it works properly.

Regards,

Md Ahtesham

 

Stefan
Telerik team
 answered on 28 Nov 2016
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?