Telerik Forums
UI for WPF Forum
1 answer
538 views
Is there a way to get the current Text of the RadAutoCompletBox?  It appears to me that you currently need to bind to both SearchText and Selected Item which doesn't feel right to me.  Here is an example of my xaml

<telerik:RadAutoCompleteBox SelectionMode="Single" 
                                    ItemsSource="{Binding Items}" 
                                    SearchText="{Binding SearchText, Mode=TwoWay}" 
                                    SelectedItem="{Binding SelectedItem, Mode=TwoWay}" />

Items is just a List<string>

Say for instance we are looking for the string "telerik".  I type in "te" then hit tab key, the autocompletebox text is telerik.. however if i look at the SearchText it is just "te" and the SelectedItem is telerik.  Which leads me to have to check if SelectedItem is null then use SearchText else use SelectedItem.  Am i missing something here?  Seems like i should be able to just bind to the Text.

I am currently using RadControls for WPF v.2012.1224.40 (Dev)
Vladi
Telerik team
 answered on 07 Jan 2013
1 answer
192 views
Hi,

I am having difficulties in specifying the Expression property of the GridViewExpressionColumn in Xaml.
I have this column that I want to turn into a expression column :
<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Attributes.[PERCEELID]}" Header="PerceelId" DataType="{x:Type sys:Int32}" />
First step, make ik a GridViewExpressionColumn :
<telerik:GridViewExpressionColumn UniqueName="Opp" Header="Oppervlakte (ha)" Expression="Attributes[&quot;PERCEELID&quot;]" />
So far so good, this still displays the same result as my original column (nothing calculated so far).
But as soon as I want to do something with this value, nothing is shown and I receive errors in the output window.
This is about the simplest expression I can think of (multiplying by 2) :
<telerik:GridViewExpressionColumn UniqueName="Opp" Header="Oppervlakte (ha)" Expression="Attributes[&quot;PERCEELID&quot;] * 2" />
The column stays empty and the outpunt window shows :

A first chance exception of type 'System.ArgumentException' occurred in System.ComponentModel.DataAnnotations.dll

A first chance exception of type 'System.InvalidOperationException' occurred in System.Core.dll


I have tried to explicitely cast my value first before multiplying (Convert.ToInt32(Attributes[&quot;PERCEELID&quot;]) * 2); but no success.

If I do the same in code-behind, there is no problem :
    Expression<Func<Graphicdouble>> expression = g => (int)g.Attributes["PERCEELID"] * 2;
    var c = this.GevondenPercelenDataGrid.Columns["Opp"as GridViewExpressionColumn;
    c.Expression = expression;


The ToString() of this expression yields:

"g => Convert((Convert(g.Attributes.get_Item(\"PERCEELID\")) * 2))"

Using this string as value for "Expression" in the xaml is no solution either.





Can anyone give me some tips on building expressions in xaml ?



 





Kind regards,



















Martin



Rossen Hristov
Telerik team
 answered on 07 Jan 2013
3 answers
147 views

I have a RadCombox with IsFilteringEnabled =True and CanAutocompleteSelectItems = False
When I open the drop down, I can starting typing in the text box to filter the listing but nothing is selected until I press enter. If I decide to cancel the filtering by closing the drop down, the text that I typed stilled remains.

How can I get the text to revert back to the selected item?
I tried UpdateTarget in the code-behind but since the selection has not changed, this had no affect.

Yana
Telerik team
 answered on 07 Jan 2013
22 answers
481 views
I have a RadDatePicker in which I set IsTabStop="True" and TabIndex=4.
However, this does not work the way I expected it to.
As TabStop #4 The whole RadPicker is selected - and I can no "do" anything but move on - there's no way to type text in the TextBox or open the picker dialog.
However at the end of my hand-set-tab-order the tab jumps into the the RadDatePicker-TextBox to edit the date.

How can I make the RadDatePicker-TextBox be part of my TabOrder ??

I am using the RadControls for wpf 2009.Q2

yours,
Nils
Boyan
Telerik team
 answered on 07 Jan 2013
3 answers
257 views
Hi,

since my last Update with the "TelerikControlPanelSetup_2012_2_718", one menue item is missing im my visual studio 2010!
How can i restore it?

Missing Item:

Telerik - RadControls for WPF

Thanks
Best Regards
Rene
ITA
Top achievements
Rank 1
 answered on 07 Jan 2013
4 answers
125 views
I rebuilt my system and installed the latest controls I have access to:
RadControls_for_WPF_2012_2_0607_Dev.msi

However, the documentation is not installed even though it says it is. I don't see in the program files folder and it's not in the MSDN help collection. I download the zip file instead and there's no help files in there.

I downloaded help files from here:
http://www.telerik.com/documents/RadControlsForWpf-help3.zip

But no documenation appeared in MSDN. However my VS2008 MSDN no longer works after that:
"Microsoft Document Explorer cannot be shown because the specified help collection 'ms-help://MS.MSDNQTR.v90.en' is invalid."

The 'View_RadControls.For.WPF' shortcut does show the docs but not in the merged help. Please help. I don't recall having this issue with previous version. I have VS2008 and VS2010, although I only use 2008 for compact framework projects.
Andrey
Telerik team
 answered on 04 Jan 2013
1 answer
146 views
Hi,

I have two questions for the spell checker used in Radgrid view.

1. Is there anyway that it automatically shows the red wavy (a red curve line) under a incorrect word in the edit mode? I read the
documentation, the RichTextBox has this support, can we do that for the gridView columns?
2. If yes for 1, myy columns are generated dynamically with MVVM (Caliburn Micro), any sugestions to add the above
supports in code (for instance, add it in the grid columns)?

Thanks in advance.

Henry
Petya
Telerik team
 answered on 04 Jan 2013
2 answers
775 views
I have a radgrid set up that displays two columns which are NOT auto generated. Using some of your other examples, I have found a way to color an entire row if the value of the text in a particular column is set to a certain status, using a custom converter class.

I am at a loss however as to how to apply this only to a single column or the cells in that column. In other words how do I change the background color for cells in a single column rather than the entire row or every cell for that matter? This seems like it should be relatively simple, but I have not come across any supporting documentation with a straightforward example.

Here is the XAML I have currently for the grid that sets the entire row color:

My grid.resources definition where I reference my custom class:

<Grid.Resources>
                <local:StatusColorConverter x:Key="ColorConverter"></local:StatusColorConverter>
</Grid.Resources>


XAML For the RadGrid Itself:

<telerik:RadGridView Name="radGrid1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ShowGroupPanel="False" Margin="5,10,0,100" DataLoaded="radGrid1_DataLoaded" SelectionChanged="radGrid1_SelectionChanged" AutoGenerateColumns="False" IsFilteringAllowed="False" ItemsSource="{Binding}" EnableColumnVirtualization="False"  CanUserResizeColumns="False">
                <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding SerialNumber}" IsReadOnly="True" UniqueName="Name" ShowFilterButton="False" AllowDrop="False" FooterTextAlignment="Left" Width="Auto" />
                    <telerik:GridViewDataColumn Header="Status" DataMemberBinding="{Binding StatusDescription}" IsReadOnly="True" UniqueName="Status" ShowFilterButton="False" Width="Auto" />
                </telerik:RadGridView.Columns>               
                <telerik:RadGridView.RowStyle>
                    <Style TargetType="telerik:GridViewRow">
                        <Setter Property="Background" Value="{Binding Status,Converter={StaticResource ColorConverter}}"></Setter>
                    </Style>
                </telerik:RadGridView.RowStyle>
            </telerik:RadGridView>


Custom Color Converter Class:

public class StatusColorConverter: IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            Status status = (Status)value;
            SolidColorBrush color = null;
             
            switch (status)
            {
                case Status.Status_A:
                case Status.Status_B:
                 
                color =  new SolidColorBrush(Colors.Red);
 
                    break;
 
                case Status.Status_C:
                    color = new SolidColorBrush(Colors.Green);
                    break;
 
                default:
                    // No color by default.
                    color = new SolidColorBrush();
                    break;
            }
            return color;
        }

Again this works well for coloring the entire row, but I require only the cells in a single column to change color.

Any guidance would be appreciated.

Thank you in advance.
Justin
Top achievements
Rank 1
 answered on 04 Jan 2013
4 answers
227 views
Can someone post an example of how to detect that a radtileviewitem has been dragged outside of window it is contained in? 

I'm using the new DragDropManager and have already attached the events to the tileviewitem (draginitialize, dragleave, dragcompleted, etc.) but can't seem to figure out how to tell if the item is outside it's parent window from the args in the DragDropCompletedEventArgs eventargs. Dragleave seems to fire if the item has left the tileview container. I want to capture this if it has left it's parent window.

Many thanks..
Kevin
Top achievements
Rank 1
 answered on 04 Jan 2013
0 answers
158 views
Good Day 
 
I am missing something, in SL there is a media player control , don't we have it in WPF ? i remember searching for a such in this forum and someone from telerik said they will include in their big release, the post was for 2009. Do we have a media player in WPF ? 


Thanks 

Vuyiswa
Top achievements
Rank 2
 asked on 04 Jan 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?