Telerik Forums
UI for WPF Forum
1 answer
95 views

So, I have a RadDock setup. In the hosting main window there is a radmenu followed by a  radtoolbar where I have a toolbarbutton for saving. Below that I have a raddocking that has a pane that hosts my usercontrol that contains, among other things a the RadDateTimePicker shown below. It works great except in one odd condition. If the txtClosedDate has a valid value and the user blanks it out and then hit's the button in the toolbar without clicking or tabbing to another field, the null value is not bound back to the source and my viewmodel receives the original date value instead of null. If, however, the user goes to any other field on the user control, thereby forcing a lost focus event the correct binding happens. I have hacked around the problem with the following code, but I think you boys need to fix this on your side.

Thanks ... Ed

 

// this is a awful hack to work around a bug where, when the raddatetimepicker's text is cleared and the
// user clicks on the save button in the toolbar (which is outside the usercontrol), the bound value does not get updated properly.
// it works fine when going from an empty state to a valid date, just not the other way around.
private void txtClosedDate_KeyUp(object sender, KeyEventArgs e)
{
    if (string.IsNullOrWhiteSpace(this.txtClosedDate.CurrentDateTimeText ))
    {
        this.txtClosedDate.SelectedValue = null;
        var binding = this.txtClosedDate.GetBindingExpression(RadDateTimePicker.SelectedValueProperty);
        binding.UpdateSource();
    }
}

 

<telerik:RadDateTimePicker x:Name="txtClosedDate" Width="175" Grid.Row="2" Grid.Column="3"
      HorizontalAlignment="Left"     CalendarStyle="{StaticResource calendarStyle}"
          InputMode="DatePicker" SelectedValue="{Binding Request.ClosedDate, Mode=TwoWay,
     UpdateSourceTrigger=PropertyChanged }"
           KeyUp="txtClosedDate_KeyUp"
/>

 

NOTE THAT THIS STYLE IS AT THE APP RESOURSE LEVEL. I Doubt it has anything to do with the problem.

<Style x:Key="calendarStyle" TargetType="telerik:RadCalendar" BasedOn="{StaticResource RadCalendarStyle}">         <Setter Property="AreWeekNumbersVisible" Value="False" ></Setter>     </Style>
Kalin
Telerik team
 answered on 13 Feb 2017
3 answers
87 views

Hi,

I have a tree that is bound and load on demand.

For simplicity say I had:

 

Randy Hompesch
Top achievements
Rank 1
 answered on 13 Feb 2017
1 answer
106 views

Hi,

Is there a quick way to expand a branch to the leaves programmatically for a load on demand scenario?

Thanks ... Ed

 

Martin Ivanov
Telerik team
 answered on 13 Feb 2017
9 answers
411 views
Hi,

I want to split the progress bar. i.e Upto particular point i want one color, remaining will be another color.

For example with following code

<

 

 

telerik:RadProgressBar x:Name="pb" Width="220" Height="15" Minimum="0" Maximum="100" Value="10" Margin="40,4,0,4" />

 

 

 

Upto say value=30 i want grey color and above that point i need default color.

Please suggest/provide sample code.

Regards

Sreeju

 

Arvind
Top achievements
Rank 1
 answered on 12 Feb 2017
5 answers
258 views

Hi,

I have two questions:

1- is it possible to set the default value of the zoomcontroller to "automatic" instead of 100 %?  if possible in XAML, or in code-behind is necessary

 

2- is there a way (documented or code snippet) so I can filter the export format (i.e.: I only want PNG files)

 

Thanks

Louis-Guillaume
Top achievements
Rank 1
 answered on 11 Feb 2017
1 answer
99 views

Hey,

Is there way to disable cutting letters from PDF? When I am loading PDF file it is cutting polish words, is there any chance to avoid this?

 

 

 

Dinko | Tech Support Engineer
Telerik team
 answered on 10 Feb 2017
3 answers
123 views

I have a radgridview with a bunch of columns. Each column has defined how to group and sort.

For instance:

  • The data: MeetingDate is a of a custom type, which has a Tostring()-override that returns the datetime as date only (and implements IComparable<T>, IEquatable<T>
  • GroupHeaderTemplate: Writes the date if there is one. Writes "None" otherwise
<telerik:GridViewDataColumn x:Name="_meetingDateColumn" IsReadOnly="True"
                                Header="Meeting date"
                                DataMemberBinding="{Binding MeetingDate.TheDateTime, UpdateSourceTrigger=PropertyChanged}"
                                GroupHeaderTemplate="{StaticResource GridDateColumnGroupHeaderTemplate}"
                               Width="SizeToCells"
                                GroupMemberPath="MeetingDate">
                                <telerik:GridViewDataColumn.HeaderCellStyle>
                                    <Style TargetType="telerik:GridViewHeaderCell">
                                        <Setter Property="ToolTipService.ToolTip" Value="Date when meeting is taking place"/>
                                        <Setter Property="ToolTipService.ShowDuration" Value="{x:Static Member=system:Int32.MaxValue}" />
                                    </Style>
                                </telerik:GridViewDataColumn.HeaderCellStyle>
  
                                <telerik:GridViewDataColumn.CellTemplate>
                                    <DataTemplate >
                                        <TextBlock VerticalAlignment="Top"
                                                Text="{Binding MeetingDate.TheDateTime, StringFormat={}{0:g}}"
                                                ToolTipService.Placement="Center" />
                                    </DataTemplate>
                                </telerik:GridViewDataColumn.CellTemplate>
                            </telerik:GridViewDataColumn>


I have around 20 columns, some are dates like the one above. One is industry, which groups by the category (http://ec.europa.eu/competition/mergers/cases/index/nace_all.html) but the column sorts by the entire industry name. Others are completely different - most have special handling of grouping and sorting.

The user is supposed to play around with grouping and sorting to find interesting stuff. However  - in addition - I would like to provide a few preset options, which the user should be able to choose in a drop down and have the grid re-arrange itself accordingly.

I would hate to implement all 20 grouping and sorting again - is there any way I can reuse the defination of sort and group from the columns in the gridview - and apply them to the radgridview group panel programatically ?

 

Thanks,

 

Stefan
Telerik team
 answered on 10 Feb 2017
18 answers
1.0K+ views
I am trying to chart a variable number of series, any of which can either be displayed as point series (using bar series) or line series. I've managed to get TypePath to work to successfully vary the series type dynamically. However, I have 2 questions:

1. How can I apply Styles to the two different types of series? CategoricalSeriesDescriptor only takes a single Style, and that Style only accepts Properties of the specified TargetType; I can't figure out how to set styles for each series type.

2. (How) can I use a converter to supply the ChartView with the Series Type so that the ViewModel in MVVM doesn't have to supply telerik types to the View? TypePath doesn't allow a binding (I get "System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element." if I try) so I can't apply the "Converter" tag.

If there's a better way to display variable numbers of series using 2 different series types please do point it out as well.

Thanks,
Louis
Johannes
Top achievements
Rank 1
 answered on 10 Feb 2017
3 answers
155 views
TiledMapSource GetTile method using bitmap source
How can I change the Uri for Bitmap Source?
Dinko | Tech Support Engineer
Telerik team
 answered on 10 Feb 2017
3 answers
196 views

I'm using the RadCartesianChart and the ScatterPointSeries for the chart view and was wondering if there is a way to permanently show the origin (0,0) on the axis.

I have the Minimum and Maximum of each axis defined by the points that are being plotted... so for instance it can occasionally display something like

X-Axis: min -0.034... to max 0.02...
Y-Axis: min -0.04... to max 0.035... etc.

The major grid lines obviously tries to account for the spacing between the min and max to produce equally spaced lines. This sometimes obscures the origin axis lines. I have been able to mitigate this is some situations by forcing the min and max to be equal absolute values... 

Taking my earlier example for instance, making:

X-Axis: min -0.04 to max 0.04
Y-Axis: min -0.04 to max 0.04

[See attached image "Test Working"]

Sometimes depending on the min/max and the spacing decided, the axis origin is still being hidden.

[See attached image "test Not Working"]

I was wondering if there is any way to force the origin (0,0) to be displayed at all times, i'm unable to find an option in the documentation, perhaps as a major grid line etc.

Sam
Top achievements
Rank 1
 answered on 10 Feb 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?