Telerik Forums
UI for WPF Forum
2 answers
272 views
I'm using a MVVM pattern to bind the column to a property on a viewmodel. When I enable grouping the combo boxes will now longer allow change of values. Also, the masked text box loses the text on grouping and sorting. Also on grouping a checkbox, if I give it a unique name it will not let me edit it, but if I don't give it a unique name I can't group on it.

FYI: After grouping then remove the grouping, the combo box property value is called 4 times on first select, then called twice on each change after that. Either case the property defaults back to the orignal value when control was created.

 Is it just me, or ithese real issues?

            <telerik:RadGridView  
                Name="RadGridPhoneList" HorizontalAlignment="Left"  
                IsReadOnly="True" 
                telerik:StyleManager.Theme="Simple"  
                RowIndicatorVisibility="Collapsed" AutoGenerateColumns="False"   
                ColumnsWidthMode="Fill"  
                CanUserFreezeColumns="False" 
                ItemsSource="{Binding Path=PersonPhoneViewModels}" 
            > 
                <telerik:RadGridView.Columns> 
                     
                    <telerik:GridViewDataColumn  
                        HeaderText="Phone Number"  
                        UniqueName ="PhoneNumber" 
                    > 
                        <telerik:GridViewColumn.CellTemplate> 
                            <DataTemplate> 
                                <telerik:RadMaskedTextBox 
                                    x:Name="TextBoxNumber"  
                                    Mask="(###) ### - ####"  
                                    Width="100" 
                                    Value="{Binding Path=PhoneNumber, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"             
                                /> 
                            </DataTemplate> 
                        </telerik:GridViewColumn.CellTemplate> 
                    </telerik:GridViewDataColumn> 
                     
                    <telerik:GridViewDataColumn  
                        HeaderText="Extension"  
                        DataMemberPath="Extension" 
                        UniqueName ="Extension" 
                    /> 
                     
 
                    <telerik:GridViewComboBoxColumn 
                        HeaderText="Phone Type"  
                        UniqueName ="PhoneType"
                        <telerik:GridViewColumn.CellTemplate> 
                            <DataTemplate> 
                                <ComboBox  
                                    VerticalAlignment="Center" 
                                    ItemsSource="{Binding Path=PhoneTypeOptions, Mode=OneTime}"  
                                    IsSynchronizedWithCurrentItem="true" 
                                    SelectedItem="{Binding Path=PhoneType}" 
                                /> 
                            </DataTemplate> 
                        </telerik:GridViewColumn.CellTemplate> 
                    </telerik:GridViewComboBoxColumn> 
                     
                     
                    <telerik:GridViewComboBoxColumn 
                        HeaderText="Phone Provider"  
                        UniqueName ="PhoneProviderType"
                        <telerik:GridViewColumn.CellTemplate> 
                            <DataTemplate> 
                                <ComboBox  
                                    VerticalAlignment="Center" 
                                    ItemsSource="{Binding Path=PhoneProviderOptions, Mode=OneTime}"  
                                    IsSynchronizedWithCurrentItem="true" 
                                    SelectedItem="{Binding Path=PhoneProviderType}" 
                                /> 
                            </DataTemplate> 
                        </telerik:GridViewColumn.CellTemplate> 
                    </telerik:GridViewComboBoxColumn> 
                                        
            <!-- allows gouping, but not edit --> 
                    <telerik:GridViewDataColumn  
                        HeaderText="Is Default"  
                        UniqueName="IsDefault"
                        <telerik:GridViewColumn.CellTemplate> 
                            <DataTemplate> 
                                <CheckBox  
                                    VerticalAlignment="Center" 
                                    IsChecked="{Binding Path=IsDefault}" 
                                /> 
                            </DataTemplate> 
                        </telerik:GridViewColumn.CellTemplate> 
                    </telerik:GridViewDataColumn> 
                     
            <!-- does not allows gouping, but can edit --> 
                    <telerik:GridViewDataColumn  
                        HeaderText="Is Default"
                        <telerik:GridViewColumn.CellTemplate> 
                            <DataTemplate> 
                                <CheckBox  
                                    VerticalAlignment="Center" 
                                    IsChecked="{Binding Path=IsDefault}" 
                                /> 
                            </DataTemplate> 
                        </telerik:GridViewColumn.CellTemplate> 
                    </telerik:GridViewDataColumn> 
                     
                    <telerik:GridViewDataColumn  
                        HeaderText="Note"  
                        IsCustomSortingEnabled="True"  
                        IsFilterable="True"  
                        DataMemberPath="Note">                         
                    </telerik:GridViewDataColumn> 
                     
                </telerik:RadGridView.Columns> 
 
            </telerik:RadGridView> 
 




Pavel Pavlov
Telerik team
 answered on 03 Jul 2009
1 answer
175 views

 I want to be able to change the hierarchy in a treeview based on user request.  For example,  I have a List<vehicles> like this (below) that I want to show in a TreeView.

Ford       Red        2-door  2002
Ford       Blue       2-door  2003
Jeep      Silver     4-Door  2005
Toyota  Gray      4-door  2008
Jeep      White    Hatch    2004
Toyota  White    2-door  2001

No big deal until I want to change the grouping, that is, allow make or color or #-doors or year to be the first level in the hierarchy.  I don’t see any way to parameterize the binding source in the HierarchicalDataTemplate or use code-behind.  What I’d like to end up with is a treeview like this:

                + Ford
                                Red
                                Blue
                + Jeep
                                Silver
                                White
                +Toyota
                                Gray
                                White

Or, by a user selection, regroup the treeview to this:

                +Red
                                Ford
                +Blue
                                Ford
                + Silver
                                Jeep
                +Gray
                                Toyota
                +White
                                Jeep
                                Toyota

All the data is in a Collection (objects of class vehicle in my example) and ideally, I’d like to be able to group and sort that list using LINQ (perhaps).  Any change of implementing this with TreeView?

Valentin.Stoychev
Telerik team
 answered on 03 Jul 2009
5 answers
319 views
Hi,

I have a requirement to refresh the carousel control every minute with data. I am using a custom entity to populate the carousel with data and have defined a data template for the same.
I have managed to refresh the carousel - however, after refresh the same item should be at the centre of the carousel as before the refresh. I am using the below code to do the bring the item into view, but it doesnt seem to work.

Telerik.Windows.Data.

Record objRec = rdcTasks.SelectedRecord;

 

RadCarouselPanel panel = this.rdcTasks.FindCarouselPanel(); 
this.rdcTasks.ItemsSource = this.CreateItemSource();
panel.BringDataItemIntoView(objRec);

In debug mode when I check the value of objRec, it shows the correct data record. However, it does not bring it to the centre. 

Also, I need to set a different colour for the data record at the centre of the carousel. How can I achieve this?

Thanks in advance.

 

 

 

Milan
Telerik team
 answered on 03 Jul 2009
7 answers
184 views
Hi,

I've just started looking at your WPF controls and have a few questions.

- How do I dissable column ordering?
- How do I have cells that show wrapped text?

Thanks

Guido Tapia
Nedyalko Nikolov
Telerik team
 answered on 03 Jul 2009
2 answers
760 views
So in a ListView I can do the following and in my View Model it would set the IsRowSelected property for each object when the row is selected. How can I do this with a RadGridView? We are using MVVM pattern and are trying to have little to no code in the xaml code behind.

Thanks

        <Style x:Key="RowItemStyle" TargetType="{x:Type ListViewItem}"
            <Setter Property="HorizontalContentAlignment" Value="Stretch" /> 
            <Setter Property="IsSelected" Value="{Binding Path=IsRowSelected, Mode=TwoWay}" /> 
            <Style.Triggers> 
                <MultiTrigger> 
                    <MultiTrigger.Conditions> 
                        <Condition Property="ItemsControl.AlternationIndex" Value="1" /> 
                        <Condition Property="IsSelected" Value="False" /> 
                        <Condition Property="IsMouseOver" Value="False" /> 
                    </MultiTrigger.Conditions> 
                    <Setter Property="Background" Value="#EEEEEEEE" /> 
                </MultiTrigger> 
            </Style.Triggers> 
        </Style> 
 
            <ListView  
                Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="5" 
                MaxHeight="200"  
                ScrollViewer.CanContentScroll="True" ScrollViewer.HorizontalScrollBarVisibility="Auto" 
                ItemContainerStyle="{StaticResource RowItemStyle}" 
                ItemsSource="{Binding Path=MasterList}" IsSynchronizedWithCurrentItem="True" 
                SelectionMode="Single" 
            > 
                <ListView.View> 
                    <GridView> 
                        <GridViewColumn Header="Item Name" Width="Auto" DisplayMemberBinding="{Binding Path=ItemName}" /> 
                    </GridView> 
                </ListView.View> 
            </ListView> 
 

Milan
Telerik team
 answered on 02 Jul 2009
1 answer
49 views
Hello,

I have a WPF user control that has many RadGridView controls, and the RAM is shooting up to 700 MB usage, and it's taking a long time to process.  A little bit about the process:

I have a part of my app which loads similar result sets together.  So a result set is bound to a RadGridView dynamically.  I query the related data, then loop through the collection of result sets, and dynamically add RadGridView's for each result set.  For one partular result set collection, I may have 20 or more result sets with not a lot of data.

But for some reason, it's chugging along, and RAM usage is through the roof...  any ideas on how to make it perform better?

Thanks.
Hristo
Telerik team
 answered on 02 Jul 2009
1 answer
117 views

Hello,

I have a grid connected to a DataTable.

The grid and datatable both have three columns and three rows.

I want to make a cell in column A uneditable based on a value in a cell in column B
(both cells are in the same row).

I know that I can use BeginningEdit event to cancel an edit attempt in a cell,
however I was wondering if I can reach the same result using XAML trigers
and perhaps just a small relevant class.

Thanks,

Erez

 

 

 

 

Stefan Dobrev
Telerik team
 answered on 01 Jul 2009
5 answers
162 views
I would like to have a grid like the GridView/HeiarchyPropertyHeirarchy demo example with the ability to edit, delete and insert child records. How can I accomplish this?
Vlad
Telerik team
 answered on 01 Jul 2009
1 answer
92 views
I just downloaded the WPF RadControls and they look great.

However, there are two elements I need to create an application that seem to be missing - Printing, and a RibbonBar.

For printing, there are needs such as printing the Calendar, printing reports from data etc. 

The RibbonBar is also nice, as it makes the app look like an Office 2007 type app. (Though a lot of end users still don't seem to like the ribbon.)

Any advice on this would be appreciated.  I would like to build an app around these WPF controls, but if I can't print, it's not going to be marketable.

Greg
Pavel Pavlov
Telerik team
 answered on 01 Jul 2009
1 answer
64 views
Hi,

I want to make the corners of my StackedBarSeries. 
Is there any way to remove the roundness?

Thank you,
Ruben.
Ves
Telerik team
 answered on 01 Jul 2009
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?