Telerik Forums
UI for WPF Forum
5 answers
102 views

Hello

I tried putting  the 2009q2 dlls in the GAC and got the following error for the
"Telerik.Windows.Controls.Scheduler.Design.dll":

---------------------------
Assembly Cache Viewer - Install failed
---------------------------
Assembly 'Telerik.Windows.Controls.Scheduler.Design.dll' is required to be strongly named.



Thanks,

Erez
Teodor
Telerik team
 answered on 18 Aug 2009
2 answers
139 views

Hi,

I was wondering whether RadControls for WPF support UI Automation...

So I created very simple WPF application: I dragged four Rad controls on a form (RadDatePicker, RadTimePicker, RadMaskedTextBox and RadNumericUpDown). Then I assigned AutomationProperties.AutomationId for each of Rad controls (for RadDatePicker it was "datePicker", for RadTimePicker "timePicker", for RadMaskedTextBox "maskedTextBox" and for RadNumericUpDown "numUpDown").

Now in c# (in Program.cs to be precise) I written code like this (mainWindow is a AutomationElement which represents main application window):

PropertyCondition datePickerCondition =   
   new PropertyCondition(AutomationElement.AutomationIdProperty, "datePicker");  
AutomationElement datePicker =   
   mainWindow.FindFirst(TreeScope.Element | TreeScope.Descendants, datePickerCondition); //It doesn't find anything  
AutomationPattern[] datePickerPattrens =   
   datePicker.GetSupportedPatterns(); 

FindFirst method does not find anything, however It should if RadControls for WPF would support UI Automation. Out of four controls I've tested only RadNumericUpDown was found this way.

I've also checked my test application window using UISpy - only RadNumericUpDown had AutomationId properly assigned.

So my question are: 

Am I doing something wrong?

If no, when will RadControls for WPF fully support UI Automation?

RadControls for WPF version used in sample application: 2009.2.701.35

Thanks for help

Boyan
Telerik team
 answered on 18 Aug 2009
1 answer
199 views
I use the chart to display some data, but the labels can become very long.
Now I want to use the Default LabelFormat but I do not seem to get it work

I use the following      #LABEL{[a-zA-Z]{0,10}...}

But my string always stays as long as it is. I want the string to be a max of 15 chars and if longer have the tree dots after it
Velin
Telerik team
 answered on 18 Aug 2009
1 answer
220 views
I'm adding items to a treeview programmatically and have set the tag property to a unique value.  How can I loop the items and when I come to my value select the item and then exit the loop.  I'm using


 

For Each item As RadTreeViewItem In RadTreeView1.Items

 

 

If CInt(item.Tag) = 3 Then

 

item.IsSelected =

True

 

 

Exit For

 

 

End If

 

 

Next

However I need to get the child items to the first treeview item

Thanks

 

Valentin.Stoychev
Telerik team
 answered on 18 Aug 2009
2 answers
122 views
I need to get the value of the selectedItem NumeroIncidencia column, I looked at the examples and following the steps that detail does not work, I can help.

Thank you.

 

A simulation code to see what I'm doing

<Grid>   
    <Button Height="36" HorizontalAlignment="Right" Margin="0,11,177,0" Name="cmdBuscar" VerticalAlignment="Top" Width="36">   
        <Image Source="iconos/buscar.gif" Name="Image5" />   
    </Button>   
    <ListBox Height="100" Margin="0,40,245,0" Name="ListBox1" DisplayMemberPath="NumeroIncidencia" VerticalAlignment="Top" />   
    <telerik:RadGridView x:Name="BuscarGrid" Margin="0,160,0,0" AutoGenerateColumns="False">   
        <telerik:RadGridView.Columns >   
            <telerik:GridViewDataColumn IsReadOnly="True" Header="Numero Incidencia" UniqueName="NumeroIncidencia" Width="150"/>   
            <telerik:GridViewDataColumn IsReadOnly="True" Header="Procedencia" UniqueName="DescripcionProcedencia" Width="120"/>   
            <telerik:GridViewDataColumn IsReadOnly="True" Header="Observaciones" UniqueName="Observaciones" Width="300"/>   
        </telerik:RadGridView.Columns>   
    </telerik:RadGridView>   
</Grid> 
 
 
Private Sub cmdBuscar_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles cmdBuscar.Click   
    Dim rd As New ReturnData.ReturnDataSoapClient   
    Dim ds As DataSet   
    ds = rd.ReturnDataset("SELECT NumeroIncidencia, DescripcionProcedencia,  Observaciones FROM Incidencias")   
    Me.BuscarGrid.ItemsSource = ds.Tables(0)   
    Me.ListBox1.ItemsSource = Me.BuscarGrid.SelectedItems   
End Sub   
 
I have no ListBox1 in the desired value
Carles Vazquez
Top achievements
Rank 1
 answered on 17 Aug 2009
0 answers
71 views

 

 

 

 Resolved.

Hemal
Top achievements
Rank 1
 asked on 17 Aug 2009
3 answers
124 views
I can display the data how I want it with my custom column headers and such. However, I have some columns in my child tables I'd like to have aggregates on and display in a footer in the child table. Can this be done?

Thanks,
Byron
Vlad
Telerik team
 answered on 17 Aug 2009
3 answers
251 views
Hello,
I'm having troubles with the aggregate functions. On the examples that I have found when you group a column the collapsed row has whatever caption is on the GroupFooters and they seem to be left justified.
on the one I'm working with they display but they seem to be pushed to the right. I can't seem to find a way to position them to the left.

<telerik:RadGridView   
                Name="rgv"    
                Grid.Row="1"   
                Margin="10,5,10,5" 
                telerik:StyleManager.Theme="Office_Blue"   
                ShowColumnFooters="True"   
                ShowGroupFooters="True" 
                IsReadOnly="True"   
                AutoGenerateColumns="False" 
                ColumnsWidthMode="Auto" 
                ItemsSource="{Binding Source={StaticResource DataProvider}}">  
                <telerik:RadGridView.Columns> 
                    <telerik:GridViewDataColumn Header="ID" DataMemberPath="ID"  > 
                        <telerik:GridViewColumn.AggregateFunctions> 
                            <telerik:CountFunction Caption="Count:" /> 
                        </telerik:GridViewColumn.AggregateFunctions> 
                    </telerik:GridViewDataColumn> 
                    <telerik:GridViewDataColumn Header="Desc" DataMemberPath="Desc"  /> 
                    <telerik:GridViewDataColumn Header="Purchase Date" DataMemberPath="Purch_Date"  DataFormatString="{}{d}" /> 
                    <telerik:GridViewDataColumn Header="Purchase Price" DataMemberPath="Purch_Price" DataFormatString="{}{0:c}" > 
                        <telerik:GridViewColumn.AggregateFunctions> 
                            <telerik:SumFunction Caption="Sum:" ResultFormatString="{}{0:c}" SourceField="Purch_Price" /> 
                        </telerik:GridViewColumn.AggregateFunctions> 
                    </telerik:GridViewDataColumn> 
                    <telerik:GridViewDataColumn Header="Disposal Date" DataMemberPath="Disp_Date" DataFormatString="{}{d}" /> 
                    <telerik:GridViewDataColumn Header="Disposal Price" DataMemberPath="Disp_Price" > 
                        <telerik:GridViewColumn.AggregateFunctions> 
                            <telerik:SumFunction Caption="Disp Sum:" ResultFormatString="{}{0:c}" SourceField="Disp_Price" /> 
                        </telerik:GridViewColumn.AggregateFunctions> 
                    </telerik:GridViewDataColumn> 
                    <telerik:GridViewDataColumn Header="Type" DataMemberPath="Type" /> 
                    <telerik:GridViewDataColumn Header="Tax" DataMemberPath="Tax" /> 
                    <telerik:GridViewDataColumn Header="Status" DataMemberPath="Status" /> 
                    <telerik:GridViewDataColumn Header="Property Type" DataMemberPath="Property_Type" /> 
                </telerik:RadGridView.Columns> 
            </telerik:RadGridView> 

After grouping the type column i get somthing like
1503                                                           |  Count: 56                        |  Sum: $1,978.1     and the rest is cut off

Thanks much,
~Boots
Missing User
 answered on 14 Aug 2009
7 answers
743 views
I have a RadTreeView with HierarchicalDataTemplate as follows:

<HierarchicalDataTemplate DataType="Category" ItemsSource="{Binding XPath=Category}"
   <TextBlock x:Name="tbCategoryName" Text="{Binding XPath=@Name}" MouseRightButtonUp="tbCategoryName_MouseRightButtonUp" 
                           MouseDown="tbCategoryName_MouseDown"
   </TextBlock> 
</HierarchicalDataTemplate> 

I need access to the RadTreeViewItem so that I can call methods and properties such as BeginEdit, ExpandAll, and IsExpanded.
This is my RadTreeView declaration:

        <telerik:RadTreeView ItemsSource="{Binding Source={StaticResource CategoriesXML}}" Margin="105,64,0,0"  
                             Name="tvOntology" HorizontalAlignment="Left" VerticalAlignment="Top" Width="200" 
                             IsEditable="True" IsEnabled="True" IsExpandOnDblClickEnabled="False"  
                             IsExpandOnSingleClickEnabled="True"
        </telerik:RadTreeView> 
 
It works fine but I'm not able to get the RadTreeViewItem. Could someone tell me how, please?
Tim
Top achievements
Rank 1
 answered on 14 Aug 2009
10 answers
382 views
Hello,
I encountered a problem with the GridView WPF-Control. When I use a Converter in the DataMemberBinding of a column and group by that column, the result will be grouped by the unconverted value.

To show the problem, i set up a small test project with a small "Person" class with "Name" (string), "Age" (int) and "Status" (int) properties.
In the test project, three persons-objects will be created and bound to a GridView. Each property in a seperate column.
The "Status" column uses a converter for the DataMemberBinding:
<Window x:Class="RadGridViewColumnTest.Window1" 
    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:System="clr-namespace:System;assembly=mscorlib"         
    xmlns:local="clr-namespace:RadGridViewColumnTest" 
    Title="Window1" Height="300" Width="300"
    <Grid> 
        <Grid.Resources> 
            <local:StatusConverter x:Key="StatusConverterResource"
            </local:StatusConverter> 
        </Grid.Resources> 
        <telerik:RadGridView x:Name="grid" AutoGenerateColumns="False" Grouping="grid_Grouping"
            <telerik:RadGridView.Columns> 
                <telerik:GridViewDataColumn HeaderText="Person" DataMemberBinding="{Binding .Name}" DataType="{x:Type System:String}"
                </telerik:GridViewDataColumn> 
                <telerik:GridViewDataColumn HeaderText="Age" DataMemberBinding="{Binding .Age}" DataType="{x:Type System:Int32}"/> 
                <telerik:GridViewDataColumn HeaderText="Status" DataMemberBinding="{Binding  Path=Status, Converter={StaticResource StatusConverterResource}}" IsSortable="True" DataType="{x:Type System:Int32}" IsGroupable="True"/> 
            </telerik:RadGridView.Columns> 
        </telerik:RadGridView> 
    </Grid> 
</Window> 
 

public class StatusConverter : IValueConverter 
    { 
        #region IValueConverter Members 
 
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 
        { 
            if ((int)value < 256) 
            { 
                return "< 256"
            } 
            else 
                return ">= 256"
 
        } 
 
        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 
        { 
            throw new NotImplementedException(); 
        } 
        #endregion 
    } 

The Status of the three persons are 122, 123, 321, and they appear correctly converted in the list.
Obviously the result, after a group by Status, should show the persons with Status 123 and 123 in one group because their Status is below 256.
But it seems the converter won't be used for grouping and every person appear in a single group.
Is there a solution for this problem ?

Thanks,  Michael
Michael
Top achievements
Rank 1
 answered on 14 Aug 2009
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?