Telerik Forums
UI for WPF Forum
2 answers
225 views

Hi,

I have RadGridView with defined RowDetailsTemplate as below:

<telerik:RadGridView.RowDetailsTemplate>
                <DataTemplate>  
                    <telerik:RadTabControl>
                        <telerik:RadTabItem Header="Tab1">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="100" />
                                    <RowDefinition Height="50" />
                                </Grid.RowDefinitions>
 
                                <TextBlock Grid.Row="0" Text="TestVar1" />
                                <TextBlock Grid.Row="1" Text="TestVar2" />
                            </Grid>
                        </telerik:RadTabItem>
                    </telerik:RadTabControl>
                     
                </DataTemplate>
            </telerik:RadGridView.RowDetailsTemplate>

When I expand row details, scroll down until details are not visibile and then go back to see again row details - a scrollbar jumps in strange way just before details shows. You can easy reproduce this behavior because there is no binding or anything. I found that when i comments out RadTabControl from details template as below:

<telerik:RadGridView.RowDetailsTemplate>
                <DataTemplate>  
                    <!--<telerik:RadTabControl>
                        <telerik:RadTabItem Header="Tab1">-->
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="100" />
                                    <RowDefinition Height="50" />
                                </Grid.RowDefinitions>
 
                                <TextBlock Grid.Row="0" Text="TestVar1" />
                                <TextBlock Grid.Row="1" Text="TestVar2" />
                            </Grid>
                        <!--</telerik:RadTabItem>
                    </telerik:RadTabControl>-->
                     
                </DataTemplate>
            </telerik:RadGridView.RowDetailsTemplate>

there is no problem with jumping scroll. Can you help me guys?

Thanks

Jakub
Top achievements
Rank 1
 answered on 20 Aug 2015
3 answers
137 views
Hello

I am using ScheduleView and have a few questions regarding resources.
I have multiple resource types (users, rooms, etc).
Preferrably I would like to group these resources by date.

This is possible using the following programming:

<schedule:RadScheduleView.GroupDescriptionsSource>
    <schedule:GroupDescriptionCollection>
        <schedule:DateGroupDescription />
        <schedule:ResourceGroupDescription ResourceType="Rooms" />
        <schedule:ResourceGroupDescription ResourceType="User" />
    </schedule:GroupDescriptionCollection>
</schedule:RadScheduleView.GroupDescriptionsSource>


The result is shown in image 1.

However, I would like to have all resources on one shared level and not grouped below one another - see image 2.

I would also like to keep the option to have several resource-types with individual resources. Because the selection of resources in the edit-window should be done via separate combo-box selecting options - view image 3.

Thank you very much for your help and information,

Sincerely,
A. Kasar
Kalin
Telerik team
 answered on 20 Aug 2015
4 answers
212 views

Space is premium on my TreeListView.  I removed the Row Selector but I still seem to have a column reserved for it.  Is there a way to set that column to zero width or eliminate it all together?

Thanks for your help,

Joel.

Data Templates:

<DataTemplate
    x:Key="TreeNodeTemplate">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="auto"/>
            <ColumnDefinition Width="auto"/>
        </Grid.ColumnDefinitions>
 
        <Image
            Grid.Column="0"
            Source="{Binding Image, Mode=TwoWay}"
            ToolTip="{Binding Barcode, Mode=TwoWay}"/>
 
        <Image
            Grid.Column="0"
            Height="20"
            Width="20"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            Margin="-20,0,0,0"
            Source="{Binding StatusImage, Mode=TwoWay}"
            ToolTip="{Binding StatusName, Mode=TwoWay}"/>
 
        <TextBlock
            Grid.Column="1"
            Text="{Binding Name, Mode=TwoWay}"
            Margin="5"
            ToolTip="{Binding Description}"/>
    </Grid>
</DataTemplate>
<DataTemplate
    x:Key="TreeNodeEditTemplate">
 
    <StackPanel
        Orientation="Horizontal">
 
        <StackPanel
            Orientation="Vertical">
 
            <Image
                Height="20"
                Width="20"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Source="{Binding StatusImage, Mode=TwoWay}"
                ToolTip="{Binding StatusName, Mode=TwoWay}"/>
 
            <Image
                Source="{Binding Image, Mode=TwoWay}"
                VerticalAlignment="Top"/>
        </StackPanel>
 
        <Grid
            Margin="5"
            Background="Cornsilk">
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
            </Grid.RowDefinitions>
 
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="125"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
 
                <Grid.RowDefinitions>
                    <RowDefinition Height="28"/>
                    <RowDefinition Height="28"/>
                    <RowDefinition Height="28"/>
                    <RowDefinition Height="28"/>
                    <RowDefinition Height="auto"/>
                </Grid.RowDefinitions>
 
                <Label
                    Content="ID:"
                    Grid.Column="0"
                    Grid.Row="0"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Center"/>
 
                <TextBlock
                    Grid.Column="1"
                    VerticalAlignment="Center"
                    Text="{Binding ID, Mode=TwoWay}"/>
 
                <Label
                    Content="Name:"
                    Grid.Column="0"
                    Grid.Row="1"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Center"/>
 
                <TextBox
                    Grid.Column="1"
                    Grid.Row="1"
                    VerticalAlignment="Center"
                    Text="{Binding Name, Mode=TwoWay}"
                    IsEnabled="{Binding IsEditableStatus}"
                    IsReadOnly="{Binding IsEditableStatus, Converter={StaticResource BoolToOppositeBoolConverter}}"/>
 
                <Label
                    Content="Description:"
                    Grid.Column="0"
                    Grid.Row="2"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Center"/>
 
                <TextBox
                    Grid.Column="1"
                    Grid.Row="2"
                    VerticalAlignment="Center"
                    Text="{Binding Description, Mode=TwoWay}"
                    IsEnabled="{Binding IsEditableStatus}"
                    IsReadOnly="{Binding IsEditableStatus, Converter={StaticResource BoolToOppositeBoolConverter}}"/>
 
                <Label
                    Content="Barcode:"
                    Grid.Column="0"
                    Grid.Row="3"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Center"/>
 
                <TextBox
                    Grid.Column="1"
                    Grid.Row="3"
                    VerticalAlignment="Center"
                    Text="{Binding Barcode, Mode=TwoWay}"/>
            </Grid>
 
            <GroupBox
                Header="Status"
                Grid.Row="4"
                Margin="5">
 
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="125"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
 
                    <Grid.RowDefinitions>
                        <RowDefinition Height="28"/>
                        <RowDefinition Height="28"/>
                    </Grid.RowDefinitions>
 
                    <Label
                        Content="CRUD Status:"
                        Grid.Column="0"
                        Grid.Row="0"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"/>
 
                    <TextBlock
                        Grid.Column="1"
                        Grid.Row="0"
                        VerticalAlignment="Center"
                        Text="{Binding StatusName, Mode=TwoWay}"/>
 
                    <Label
                        Content="Inspect Status:"
                        Grid.Column="0"
                        Grid.Row="1"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center"/>
 
                    <TextBlock
                        Grid.Column="1"
                        Grid.Row="1"
                        Text="{Binding InspectStatusName, Mode=TwoWay}"
                        VerticalAlignment="Center"/>
                </Grid>
            </GroupBox>
 
        </Grid>
    </StackPanel>
</DataTemplate>

 

Control Configuration:

<telerik:RadTreeListView
    x:Name="treeListView"
    AutoGenerateColumns="False"
    HorizontalAlignment="Stretch"
    VerticalAlignment="Stretch"
    CanUserFreezeColumns="False"
    CanUserReorderColumns="False"
    SelectionMode="Single"
    Grid.Row="1"
    Margin="5"
    IsReadOnly="{Binding IsReadOnly}"
    ItemsSource="{Binding Hierarchy, Mode=TwoWay}"
    SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
    IsExpandedBinding="{Binding IsExpanded, Mode=TwoWay}"
    AutoExpandItems="True"
    ShowGroupPanel="False"
    IsFilteringAllowed="False"
    ShowColumnHeaders="False"
    EditTriggers="F2"
    HierarchyIndent="12"
    MinColumnWidth="12"
    RowIndicatorVisibility="Hidden"
    MouseDoubleClick="treeListView_MouseDoubleClick"
    PreviewMouseLeftButtonDown="treeListView_PreviewMouseLeftButtonDown">
 
    <telerik:RadTreeListView.ChildTableDefinitions>
        <telerik:TreeListViewTableDefinition 
            ItemsSource="{Binding Children}"/>
    </telerik:RadTreeListView.ChildTableDefinitions>
    <telerik:RadTreeListView.Columns>
 
        <telerik:GridViewDataColumn
            DataMemberBinding="{Binding Name, Mode=TwoWay}"
            CellTemplate="{StaticResource TreeNodeTemplate}"
            CellEditTemplate="{StaticResource TreeNodeEditTemplate}"
            IsReadOnly="False"
            Width="*"/>
 
        <telerik:GridViewComboBoxColumn
            x:Name="itemTypeColumn"
            Header="Item Type"
            DataMemberBinding="{Binding ItemTypeID, Mode=TwoWay}"
            DisplayMemberPath="Name"
            SelectedValueMemberPath="ID"
            SortMemberPath="Order"
            SortingState="Ascending"
            ItemsSource="{Binding TypeModel.Items, Mode=TwoWay}"
            IsReadOnly="True"
            Width="150"/>
 
        <telerik:GridViewDataColumn
            DataMemberBinding="{Binding IsActive, Mode=TwoWay}"
            Header="Include"/>
 
    </telerik:RadTreeListView.Columns>
</telerik:RadTreeListView>

Joel Palmer
Top achievements
Rank 2
 answered on 19 Aug 2015
2 answers
185 views

 When I use this control or the numeric control I can only type 3 digits and 2 are positioned after the decimal, if I keep typing digits it just overwrites the last decimal place.  Initial value is zero, decimal property, version 2015.2.623.45.

<telerik:RadMaskedCurrencyInput Width="100"
                                InputBehavior="Replace"
                                Mask="c9.2"
                                SelectionOnFocus="SelectAll"
                                Value="{Binding TotalAmount}"
                                Culture="en-CA"
                                Grid.Column="5"
                                Grid.Row="1"
                                HorizontalContentAlignment="Right"
                                HorizontalAlignment="Left"
                                VerticalAlignment="Top" />

public decimal TotalAmount
{
    get
    {
        return workDetail.Total;
    }
    set
    {
        if (workDetail.Total != value)
        {
            workDetail.Total = value;
            OnPropertyChanged("TotalAmount");
        }
    }
}
Patrick
Top achievements
Rank 1
 answered on 19 Aug 2015
3 answers
213 views

Hi,

 I'm using the latest version of Telerik and I created a UserControl which contain a RadImageEditorUI. My UserControl contain a property named "Image" of type "Stream" and I would like to know how I can display it in the editor and I would like to know also how I can take the image in the editor and transform it as a stream?

 

Thank's

Alain

Todor
Telerik team
 answered on 19 Aug 2015
4 answers
642 views

Hi, I would like to use RadTreeView to display a flat list, but all items have significant indentation.

I could have used a RadListBox, but since I have the same nodes in a hierarchically TreeView another place in the application, I thought using the same control would be the easiest way to get the same look and functionality (context menu, click etc).

 

My idea was to set the ItemTemplate of the treeview to a normal DataTemplate or a HierarchicalDataTemplate without specifying ItemSource. It works as I want, except that there is an indention of all the items, leaving a lot of space to the left.

I have also tried to set the ExpanderStyle to a style containing a collapse template, but it only seems to affect the indentation of child items.

Philip
Top achievements
Rank 1
 answered on 19 Aug 2015
1 answer
116 views

I would like to find out if there is a good way of applying DTED information on top of the RadMap so that whenever a user clicks on the

Map location the elevation information can be retrieved. Currently it seems to me that the RadMap can read data from shape files only.

Possible to convert DTED to raster base information to be applied on RadMap?

Martin Ivanov
Telerik team
 answered on 18 Aug 2015
2 answers
381 views
Hi, does the RadDocking control use virtualization? And can I disable it? To be more specific, after a user action, I add a new Pane to a PaneGroup and set its Content and DataContext to a new ViewModel. In my App.xaml, I have a DataTemplate so that this ViewModel is shown as a certain UserControl. This works great, except that the UserControl is being reused. I can see that because I'm only entering the constructor once. Subsequent adds of ViewModels won't add new UserControls.

My real situation is a little more complex (an MVVM pattern, and a command I need to execute when each UserControl is loaded), but you can reproduce it with this setup:

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Button Click="ButtonBase_OnClick" Grid.Row="0">Click</Button>
        <telerikDocking:RadDocking Grid.Row="1">
            <telerikDocking:RadDocking.DocumentHost>
                <telerikDocking:RadSplitContainer>
                    <telerikDocking:RadPaneGroup x:Name="TheRadPaneGroup">
                        <telerikDocking:RadPaneGroup.ItemTemplate>
                            <DataTemplate>
                                <telerik:RadPane>
                                    <Style TargetType="telerik:RadPane">
                                        <Setter Property="ContentTemplate">
                                            <Setter.Value>
                                                <DataTemplate>
                                                    <!--<userControlEvents:UserControl1></userControlEvents:UserControl1>-->
                                                    <ContentControl Content="{Binding}"></ContentControl>
                                                </DataTemplate>
                                            </Setter.Value>
                                        </Setter>
                                    </Style>
                                </telerik:RadPane>
                            </DataTemplate>
                        </telerikDocking:RadPaneGroup.ItemTemplate>
                    </telerikDocking:RadPaneGroup>
                </telerikDocking:RadSplitContainer>
            </telerikDocking:RadDocking.DocumentHost>
        </telerikDocking:RadDocking>
    </Grid>

Putting the UserControl explicitly in the DataTemplate (and no longer relying on the App.xaml) makes no difference. Putting x:Shared="False" on the Style and/or the DataTemplate makes no difference either.

From what I've read on the interent, this has to do with Virtualization. Is there a way to disable this?

I've made a simple project and put it here. You can see a new ViewModel is added every time (because the milliseconds change for every RadPane that is added), but the second piece of text (the current date, with seconds) does not change, so the UserControl is being reused. I want it to create a new UserControl every time.
Peter
Top achievements
Rank 1
 answered on 18 Aug 2015
1 answer
172 views

If this isn't possible, telling me "no" would be fully acceptable but I must ask:

  • Is there a way to​ separate the column order from the drop down order?
  • Is there a way to eliminate the Match Case button and never have it try to match the case?
  • Is there a way to only allow a top level filter?  So, don't have the + button on a lower level.
  • Can I default to "Contains" instead of "Is equal to"?

Thanks for your help,

Joel

Stefan
Telerik team
 answered on 18 Aug 2015
1 answer
179 views

I have thisRadDataPager

 <telerik:RadDataPager x:Name="radDataPager" Grid.Row="1" Source="{Binding ItemCollection}" DockPanel.Dock="Bottom" PageSize="400" DisplayMode="First, Last, Next, Previous, Text" />

 I bind to it in the ItemsSource of a RadGridView:

  <Controls:RadGridView x:Name="_rgvAdSales"
                              SelectedItem="{Binding Selected​Item, Mode=TwoWay}"
                              ItemsSource="{Binding PagedSource, ElementName=radDataPager}"
                              EnableRowVirtualization="False"
                              AutoGenerateColumns="False"
                              SelectionMode="Extended">...​

 

My columns look like this:

       <Controls:GridViewDataColumn Header="Name" DataMemberBinding="{Binding ​Name}" IsReadOnly="True" />

 

Resharper draws a lin​e under Name (the path of the binding in the column) and says this:

    Cannot resolve property 'Name' in data context of type 'Telerik.Windows.Data.IPagedCollectionView'

 

I have tried to add d:DataContext, but I cannot get that to work.

 

 â€‹

If I bind the ItemsSource of RadGridView directly to the ItemCollection on the ViewModel, then resharper does not give any warnings.

Do you know of any good way (ie. not causing performance loss) to tell resharper the datatype of the ItemSource or datacontext of the column?


Thanks,

 

      
​

Ivan Ivanov
Telerik team
 answered on 18 Aug 2015
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?