Telerik Forums
UI for WPF Forum
1 answer
90 views

Hello,

I have 3 columns in my grid and need data validations in the first column.

I'm currently trying to achieve this through IDataErrorInfo.

I'm trying to trigger validation for all cells in the column when any one of the cells is updated or any row is added/deleted.

So far i could not see any generic method to make this work.

From this https://www.telerik.com/forums/trigger-grid-view-validation there is no way to do this?

Any help is appreciated.

Petar Mladenov
Telerik team
 answered on 21 Feb 2018
1 answer
91 views

Hi.

I will remove X close button from RadDocking , I tried different suggestion from web but the button still here. Can you please help me with this.

 

Martin Ivanov
Telerik team
 answered on 21 Feb 2018
7 answers
129 views
Hi,
I was trying to change the Value Cell Format like #.00 € (screenshot1.png) but it seems not working (screenshot2.png)
You can test it directly on your demo
Mattia
Top achievements
Rank 2
 answered on 21 Feb 2018
2 answers
1.1K+ views

I'm using version 2018.1.122.45 of RadGridView.  I'm trying to remove the validation red border for the row.  

I've tried everything possible by coping the entire fluent theme and changing everything to no success.  It seems this border is in the adorner layer.

Can you please provide me some direction on how to remove this border please?

Josh
Top achievements
Rank 1
 answered on 20 Feb 2018
2 answers
733 views

Greeting,

I am currently working on an MVVM application using a Radgridview to present information to the user. The data I have to present is in the form of a table (2D array) that I load from .CSV file.  Since the number of column changes depending on the loaded file, I use a DataTable and then bind it to my RadGridView with AutoGeneratingColumn. Up to there everything works fine.  The problem I have is that there is 2 columns in the DataTable that are always present and that I want to bind to a preexisting column inside the grid.  As you can see in the following code snippet, my 2 columns are called IsUsed (a boolean) and Status (also a bool)

<telerik:GridViewCheckBoxColumn
                        Name="colTest"
                        AutoSelectOnEdit="True"
                        DataMemberBinding="{Binding IsUsed, Mode=TwoWay}"
                        EditTriggers="CellClick">
                        <telerik:GridViewCheckBoxColumn.EditorStyle>
                            <Style BasedOn="{StaticResource GridViewCheckBoxStyle}" TargetType="telerik:GridViewCheckBox">
                                <Setter Property="Background" Value="{Binding Status, Converter={StaticResource BooltoColorConverter}}" />
                            </Style>
                        </telerik:GridViewCheckBoxColumn.EditorStyle>
                    </telerik:GridViewCheckBoxColumn>
 

 

Currently the columns are auto generated and the predefined binding does not work. Is there a way to do this binding? I tried intercepting the AutoGenerating event but I don't know what to do from there.

 

Thank you and have a great day!

François
Top achievements
Rank 1
 answered on 20 Feb 2018
1 answer
380 views

I'm not able to use german date format to filter my grid.

I've got a project that is set to german culture using

var Culture = new CultureInfo("de-DE");
//Culture.DateTimeFormat = DateTimeFormatInfo.CurrentInfo; // No effect on datetime parsing
Thread.CurrentThread.CurrentCulture = Culture;
Thread.CurrentThread.CurrentUICulture = Culture;

This is done in App.cs. Interestingly enough these options alone don't change the language of the grid, I have to add the following to my window:

this.Language = XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag);

 

So now the grid's in german and I'm trying to filter the Column "DateTime". After adding the data I'm using this code:

MyGrid.FilterDescriptors.Add(new Telerik.Windows.Data.FilterDescriptor("DateTime", Windows.Data.FilterOperator.IsEqualTo, "31.01.2018"));

 

Which throws an exception because obviously the Date "31.01.2018" can not be parsed.

Funny: Switching the month and day (without changing periods to slashes) works:

MyGrid.FilterDescriptors.Add(new Telerik.Windows.Data.FilterDescriptor("DateTime", Windows.Data.FilterOperator.IsEqualTo, "01.31.2018"));

Vladimir Stoyanov
Telerik team
 answered on 20 Feb 2018
2 answers
426 views

Adding a datatemplate to a listbox seems to break the automatic "startswith" search. I was hoping that overriding ToString() might help, but it doesn't seem to. 

Can anybody point me in the right direction?

 

Thanks

 

class ItemVM
    {
        public StyleDefinition Style { get; set; }
        public string TagText { get; set; }

        public override string ToString()
        {
            return Style.Description;
        }
    }

<telerik:RadListBox 
            SelectionMode="Single"
            TextSearchMode="StartsWith">
            <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                    <DockPanel>
                        <TextBlock Text="{Binding Style.DisplayName}" />
                        <TextBlock Text="{Binding TagText}" HorizontalAlignment="Right"/>
                    </DockPanel>
                </DataTemplate>
            </telerik:RadListBox.ItemTemplate>
        </telerik:RadListBox>

 


Michael
Top achievements
Rank 1
Veteran
 answered on 19 Feb 2018
0 answers
219 views

Are there any versions of the Telerik WPF Binaries that use a .NET Runtime of 4.5 or greater? All of the versions I currently have available appear to be targeting a Runtime Version of 4.0.30319. This is in Visual Studio 2015 on Windows 10. The versions of the Telerik WPF Binaries I have available are 2015.3.1104 and 2017.2.503. I have tried using the .45 versions of both binaries and both appear to be targeting 4.0.30319.

We are currently seeing this exception in the Windows Event log after our application runs for a period of time and searching has found that one of the causes of this issue is known in .NET 4.0 and has been resolved in .NET 4.5 and higher.

This is the information from the Windows Event log for the issue causing our application to crash:

Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Runtime.InteropServices.COMException
   at System.Windows.Media.Composition.DUCE+Channel.SyncFlush()
   at System.Windows.Interop.HwndTarget.UpdateWindowSettings(Boolean, System.Nullable`1<ChannelSet>)
   at System.Windows.Interop.HwndTarget.UpdateWindowPos(IntPtr)
   at System.Windows.Interop.HwndTarget.HandleMessage(MS.Internal.Interop.WindowMessage, IntPtr, IntPtr)
   at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

 

If anyone can point me to a version of Telerik UI for WPF that uses a runtime of 4.5 or greater (or a list of released versions and the targeted runtimes) so we can try to see if that resolves our issue it would be much appreciated!

Drew
Top achievements
Rank 1
 asked on 19 Feb 2018
6 answers
323 views

Hi, I have RadPropertyGrid with auto generated property definitions. Some of the properties are numeric, and when something like letters is input in those properties, I get 'Value cannot be converted.." message.

So this is a settings form, and I should be able to forbid saving those properties if such conversion issue exists, but how can I check that on code side?

Vladimir Stoyanov
Telerik team
 answered on 19 Feb 2018
2 answers
281 views

I have some  RadPathButtons (inside a WrapPanel) with attached commands.  When the commands are enabled, I want the paths to show up in black.    Instead they show up in grey, even though the attached commands are enabled and do execute when I click them.  See the first attached image ("before_style.png") to see what I mean

<WrapPanel x:Name="ViewPanel"
           Background="{StaticResource GsBackgroundDark}"
           VerticalAlignment="Top"
           HorizontalAlignment="Stretch"
           Margin="0"
            >
 
    <tk:RadPathButton Margin="10 10 0 0"
                      Height="40"
                      Width="40"
                      IsEnabled="True"
                      Foreground="Black"
                      PathGeometry="{StaticResource HeightMapPathGeometry}"
                      Command="{Binding ShowHeightMapCmd}"
        />
 
    <tk:RadPathButton Margin="10 10 0 0"
                      Height="40"
                      Width="40"
                      IsEnabled="True"
                      ToolTip="Show Scan Images"
                      PathGeometry="{StaticResource ImagesGeometry}"
                      Command="{Binding ShowImagesCmd}"                                 
    />
</WrapPanel>

 

 

So, following Telerik's advice, I added a style resource to use in each of the button's PathStyle Property

 

<WrapPanel.Resources>
    <Style x:Key="MyPathStyle" TargetType="{x:Type Path}">
        <Setter Property="Fill" Value="Black"/>
        <Setter Property="Stroke" Value="Black"/>
    </Style>
</WrapPanel.Resources>

 

Then I set this resource as the PathStyle for each of the buttons.   For example (see line #7 below)

01.<tk:RadPathButton Margin="10 10 0 0"
02.                  Height="40"
03.                  Width="40"
04.                  IsEnabled="True"
05.                  ToolTip="Show Scan Images"
06.                  PathGeometry="{StaticResource ImagesGeometry}"
07.                  PathStyle="{StaticResource MyPathStyle}"
08.                  Command="{Binding ShowImagesCmd}"                                 
09./>

 

But then when I run my application again, the button icons don't look even recognizable.  It's like they've expanded far beyond the boundaries of the button, when all I did was try to change the color.  Look at the the second attached image ("after_style.png") to see what I mean

Can you tell me what I am missing?  I never expected merely applying a color to the paths would change their geometry.

Martin
Telerik team
 answered on 19 Feb 2018
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?