Telerik Forums
UI for WPF Forum
4 answers
160 views
Hi all,

I'm writing an app the MVVM way and have set up a ViewModel to bind to a view, which is a user control that contains a RadGridView. The data binds correctly and am able to see this however there are 3 group descriptors I wish to add and when I add this programmatically, the grid duplicates my rows, so now, my grid contains a duplicate or of each row. One type of the rows containing the full grouping while the other only with 2 of my 3 groupings. If I remove the groupings manually from the grid and re-add these they work perfectly (without duplicate rows). I am adding the group descriptions on the RadGridView_Load event. In the same event I also programmatically create columns.

Any help would be great.

Cheers,

Tim.
TSRG - IT
Top achievements
Rank 1
 answered on 23 Mar 2010
5 answers
415 views
Hi,

after trying around for quite a while, I decided to post a message here because I just don't get the meaning of the different properties of a GridViewComboBoxColumn.

I have a MainViewModel with an ICollectionView property called "ItemsView" which is used as ItemsSource for my RadGridView. The ICollectionView contains items of type PersonViewModel. PersonViewModel has several properties, one of them is called "AgeGroup" and has the type EnumViewModel<EAgeGroup>. The EnumViewModel<TEnum> class has an object property called "LocalizedValue". The MainViewModel also has a property "AvailableAgeGroups" of type ObservableCollection<EnumViewModel<EAgeGroup>> which contains EnumViewModels for all available enum values of type EAgeGroup.

Here is some sample code showing all these classes and properties:

public class MainViewModel 
    public ICollectionView ItemsView { /* ... */ } 
 
    public ObservableCollection<EnumViewModel<EAgeGroup>> AvailableAgeGroups { /* ... */ } 
 
public class PersonViewModel  
{  
    public EnumViewModel<EAgeGroup> AgeGroup  
    {  
        get { /* ... */ }  
        set { /* ... */ }  
    }  
}  
  
public class EnumViewModel<TEnum>  
{  
    public object LocalizedValue { /* ... */ }  

As you can imagine, the EnumViewModel class serves as a "string/localization provider" for enums.

Now, I want to create a ComboBoxColumn which uses the "AvailableAgeGroups" collection as the ItemsSource for the ComboBoxes. The relevant property in the PersonViewModel is, of course, "AgeGroup". So, this property should decide which of the age groups is selected. But, the displayed value should be taken from the "LocalizedValue" property of the value from the "AgeGroup" property. To sum it up, I want to display "PersonViewModel.AgeGroup.LocalizedValue", but the actual item should be "PersonViewModel.AgeGroup".

Now, from what I know from typical .NET controls, I created this column as follows:
<telerik:GridViewComboBoxColumn 
    UniqueName="AgeGroup" 
    ItemsSource="{Binding AvailableAgeGroups}" 
    DisplayMemberPath="LocalizedValue" 
    SelectedValueMemberPath="AgeGroup" 
    Header="Age Group" 
    IsFilterable="True"/> 

But nothing is displayed in the column, only empty cells. However, when I click the Filter button in the header, all possible values are displayed, so it somehow knows the values. Not everything is wrong, it seems. :)

Any advice on this one?
Thanks.
Pavel Pavlov
Telerik team
 answered on 22 Mar 2010
1 answer
284 views
How do I control the selection box item template for a combobox when the SelectionBoxItemTemplate is read only? This seems to contradict the help documentation: http://www.telerik.com/help/wpf/radcombobox-populating-with-data-selectionbox.html
Valeri Hristov
Telerik team
 answered on 22 Mar 2010
1 answer
231 views
There appears tp be a bug in the RadTabControl when the TabStripPlacement is on the left. The TabOrientation is reversed. The following XAML displays tabs vertically. The tabs also are appear to be ordered backwards, from bottom to top of the tab strip rather than top to bottom.

        <telerikNav:RadTabControl TabOrientation="Horizontal" TabStripPlacement="Left">  
            <telerikNav:RadTabItem Header="Tab1"  /> 
            <telerikNav:RadTabItem Header="Tab2" /> 
        </telerikNav:RadTabControl> 
 

I will also submit a support ticket.

Thanks.
Bobi
Telerik team
 answered on 22 Mar 2010
6 answers
176 views
hello,

i'm having a problem collapsing a details grid from within the details grid. the master grid has a GridViewToggleRowDetailsColumn to display details and close them. the problem is, there is a button in the details grid (of type RowDetailsTemplate) which does some operation and afterwards should close the details automatically. i'm using event LoadingRowDetails so using a HierarchyChildTemplate is a problem.
how can i collapse the details grid with the button inside?




since the documention is very poor on wpf controls i'm having difficulties figuring out which property and which method does what. examples (how to's) are really appreciated.


thanks,
Milan
Telerik team
 answered on 22 Mar 2010
0 answers
76 views

Hi.. again...
I have GridViewComboColumn in a GridView. How can I programatically set focus the combox in the current row and open it?
I have button on a form that addes a new row... so I want to set focus to the combobox so the user can begin entereing.... thanks again

<
telerikPresentation:GridViewComboBoxColumn DisplayMemberPath="comm_name" SelectedValueMemberPath="comm_name" DataMemberBinding="{Binding comm_name}" Header="Commodity" Width="175" />

 

Jon
Top achievements
Rank 1
 asked on 22 Mar 2010
2 answers
142 views
Hi

I am having serious problems performing something that seems quite simple.
I want a RadScheduler filling the form, and a RadExpander to the right of it. When I expand the Expander, the Scheduler should decrease its size accordingly.
When I try this with the Expander on top, it works as intended, but when I put the expander to the right, the scheduler just will not stretch over the form. It stretches well vertically, but not horizontally.
I believe I have altered the directions etc on the components as I should, but without any luck.

This is my very small form:
<Page x:Class="RadControlsWpfBrowserApp2.Page1" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Title="Page1" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">  
    <Grid> 
        <StackPanel Orientation="Horizontal">  
            <telerik:RadScheduler Name="radScheduler1" HorizontalAlignment="Stretch" /> 
            <telerik:RadExpander ExpandDirection="Left" HorizontalAlignment="Right">  
                <telerik:RadExpander.Header> 
                    <Grid HorizontalAlignment="Stretch">  
                        <Grid.ColumnDefinitions> 
                            <ColumnDefinition Width="Auto" /> 
                            <ColumnDefinition Width="*" /> 
                        </Grid.ColumnDefinitions> 
                        <TextBlock Text="Header" /> 
                        <Rectangle Grid.Column="1" Margin="5,0,0,0" VerticalAlignment="Center" Height="2" Fill="Gray" /> 
                    </Grid> 
                </telerik:RadExpander.Header> 
                <StackPanel Orientation="Vertical" > 
                    <Ellipse Width="33" Height="33" Margin="5" Fill="Yellow" /> 
                    <Ellipse Width="33" Height="33" Margin="5" Fill="Blue" /> 
                    <Ellipse Width="33" Height="33" Margin="5" Fill="Red" /> 
                </StackPanel> 
            </telerik:RadExpander> 
        </StackPanel> 
    </Grid> 
</Page> 

See attached screen shot.
Rappen
Top achievements
Rank 1
 answered on 22 Mar 2010
1 answer
166 views
Hi,

First of all let me tell you that We are using Q1 2009 Telerik controls.

I have a Time Picker in my window,Its showing proper 12 hour format when i select from time from Time Picker, Now When i say like radTimePicker.SelectedTime=new TimeSpan(23,05,00) it showing 24 hour format..

Another thing, its working fine with "Page" but not with  window and usercontrol.

Thanks,
Ravi Lakhani
Kaloyan
Telerik team
 answered on 22 Mar 2010
1 answer
189 views
Hi,

I have added a RadGridView and populated some data. Now i am giving an option to the user to select the column, i.e. when the user selects a column, we would make that record as selectedItem and scroll to that record.
I have used the following code :

this

 

.radGridView1.SelectedItem = radGridView1.Items[RecordNumber-1];

 

 

 

this.radGridView1.ScrollIntoView(this.radGridView1.SelectedItem);

 

 


The correct item is selected, but the scroller is still pointing to the first one.
I am attaching the screen shot for reference.  

Regards,
Prithvi
Rossen Hristov
Telerik team
 answered on 22 Mar 2010
1 answer
57 views
The RadTreeViewItem.RootItem property used to return an item's highest ancestor node (as of version 2009.1103), but in the current version (2010.0309) it always returns a reference to itself. Does anyone else see this behavior?

Here's a very simple example:
    <StackPanel> 
        <telerikNavigation:RadTreeView x:Name="tree"/> 
        <TextBlock x:Name="msg"/> 
    </StackPanel> 
 

And the code behind:
        private void Window_Loaded(object sender, RoutedEventArgs e) 
        { 
            RadTreeViewItem item1 = new RadTreeViewItem() { Header = "item1" }; 
            RadTreeViewItem item2 = new RadTreeViewItem() { Header = "item2" }; 
            RadTreeViewItem item3 = new RadTreeViewItem() { Header = "item3" }; 
 
            tree.Items.Add(item1); 
            item1.Items.Add(item2); 
            item2.Items.Add(item3); 
 
            // item3.RootItem returns item1 in 2009.1103 version (CORRECT) 
            // item3.RootItem returns item3 in 2010.0309 version (WRONG) 
            msg.Text = "item3.RootItem is " + item3.RootItem.Header.ToString(); 
 
            tree.ExpandAll(); // <-- This also doesn't seem to be working 
            item1.ExpandAll(); // <-- Neither does this 
        } 
 

Tihomir Petkov
Telerik team
 answered on 22 Mar 2010
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?