Telerik Forums
UI for WPF Forum
3 answers
236 views
I have implemented a hierarchical grid based on the example provided on the Telerik site. This works fine.

However, I am having difficulties binding to properties in my viewmodel from the code behind and the example given seems to bind only to objects in the top level RadGridView's ItemsSource. Although I can continue working in the code behind I would like to see an example of not using the DataLoading eventhandler and sticking with XAML to define the columns for the child rows.

I am unable to find any example of placing the   

 

<telerik:RadGridView.Columns>

 

or its equivalent section within the ChildTableDefinitions. Surely this must be possible, as these child rows in my case, anyway, contain merely a subset of the columns in the main RadGridView control.

So basically, what I am asking is to be able to do something like the following, where I can handle the table's columns in XAML...

<telerik:RadGridView.ChildTableDefinitions>
    <telerik:GridViewTableDefinition>
        <telerik:GridViewTableDefinition.Relation>
            <telerik:TableRelation IsSelfReference="True">
                <telerik:TableRelation.FieldNames>
                    <telerik:FieldDescriptorNamePair 
                ParentFieldDescriptorName="BankStatementTranID" 
                ChildFieldDescriptorName="ParentStatementTranID"/>
                </telerik:TableRelation.FieldNames>
            </telerik:TableRelation>
        </telerik:GridViewTableDefinition.Relation>
  
        <telerik:RadGridView.Columns>
         ...My XAML column code here...
        </telerik:RadGridView.Columns>
    </telerik:GridViewTableDefinition>
</telerik:RadGridView.ChildTableDefinitions>

 

 

 

 

 

 

 

 

 

 

Rob
Top achievements
Rank 1
 answered on 09 May 2011
1 answer
120 views
Hi Telerik,

When end user resizes appointment's start/end datetime, how can I constraint its time increment interval to, for example 30mins or 1 hour, instead of 1 min interval, so it always "snaps" to the timeslot of the scheduleview?

Thanks,
Cheau
Cheau-Long
Top achievements
Rank 1
 answered on 09 May 2011
1 answer
378 views
hey guys,

This one might be pretty simple, but i cant for the life of me work out how to impliment this.

I have a RadTreeView (defined below)

What i would like to do with this is Reverse the order of it, in this example i have 0 - 12 possible controls within my TreeView,

so if i have 4 controls,

1
2
3
4
(is how they are being presented just now)

i want them to display top heavy, so

4
3
2
1

Is this possible? but only on the display, i still want them ordered 1 - 4 in the collection in the code behind? I really hope this is possible!! :)

<StackPanel VerticalAlignment="Top">
                                        <telerikNavigation:RadTreeView HorizontalContentAlignment="Stretch" x:Name="uiActionersList" IsDragDropEnabled="True" DragEnded="uiActionersList_DragEnded"
                                                HorizontalAlignment="Stretch" SelectionMode="Multiple" ScrollViewer.HorizontalScrollBarVisibility="Hidden" dragDrop:RadDragAndDropManager.AllowDrop="True"
                                                                               IsDragPreviewEnabled="True"  IsDragTooltipEnabled="True" SelectionChanged="uiActionersList_SelectionChanged"
                                                ItemsSource="{Binding ActionerModelViewCollection, NotifyOnSourceUpdated=True, NotifyOnTargetUpdated=True,Mode=TwoWay}" Margin="0,0,-5,0" >
                                            <telerikNavigation:RadTreeView.ItemTemplate>
                                                <DataTemplate>
                                                    <pmControls:ActionerControl x:Name="ItemsHost" />
                                                </DataTemplate>
                                            </telerikNavigation:RadTreeView.ItemTemplate>
                                        </telerikNavigation:RadTreeView>
                                    </StackPanel>

Petar Mladenov
Telerik team
 answered on 09 May 2011
2 answers
97 views
Hello,

I need to know the X and Y coordinates of the X axis and Y axis and I think it would benice if I could get "AxisX.AxisLine" and "AxisY.AxisLine"in order to know the limits of myPlotArea.

How can I do to have these coordinates X and Y.


Thank
Missing User
 answered on 09 May 2011
3 answers
182 views
Hi,

I am trying to get a print preview of a RadRichTextBox as follows:

RadRichTextBox tb = new RadRichTextBox();
tb.Document = CreateCodeBehindDocumentWithTable(); // <- from demo project, inserts some stuff
tb.PrintPreview();

I dont get any exceptions, but nothing happens.
A thread in the Silverlight forum says I have to refrence Telerik.Windows.Document and Telerik.Windows.Documents.FormatProviders.Html, but the problem is still present.

Any help would be highly appreciated

Best Regards,
Matthias

Boby
Telerik team
 answered on 09 May 2011
1 answer
127 views
When exporting a chart, I first create a print friendly chart (a new instance of RadChart) where the legend, title, etc differs from the on-screen chart. The print friendly chart is then shown in a hidden window with a DocumentViewer. Should the chart be exported or saved before the print friendly chart is fully rendered, the saved bitmap is incorrect and incomplete. How can one determine that a RadChart has been completely rendered? Is there an event to which an event handler can be hooked?  
Evgenia
Telerik team
 answered on 09 May 2011
0 answers
71 views
I need to use AutoCompleteTextBox in my project.Is there any property of textbox in WPF for the same ...
swati
Top achievements
Rank 1
 asked on 09 May 2011
3 answers
92 views
In the grid control, you have sorting, filtering and group by capabilties. I know they work by using Mouse. Can these work using "Keyboard" as well i.e without using Mouse?
Vanya Pavlova
Telerik team
 answered on 09 May 2011
1 answer
106 views
Hey again guys, i have another query regarding the TreeView control, at present i use the Tree View to display a list of people, but i have a custom control that displays its contents, but i use the drag and drop functionality of the Tree View, I also have a Contextual RIbbon Bar that is activated when an Item in the RadTreeView is Clicked...

The Problem i have is the control is only selected when a user clicks on the white space between button / Combo box's, clicking on the actual combo boxes, buttons doesnt actually select the TreeViewItem,

Is there any functionality to allow this to happen? as i would really love to keep using the TreeView.

See Below for my Code, Thanks in advance and look forward to your response!!
Kev.

Definition of my Tree View :
<telerikNavigation:RadTreeView HorizontalContentAlignment="Stretch" x:Name="uiActionersList" IsDragDropEnabled="True" DragEnded="uiActionersList_DragEnded"
                                                HorizontalAlignment="Stretch" SelectionMode="Multiple" ScrollViewer.HorizontalScrollBarVisibility="Hidden" dragDrop:RadDragAndDropManager.AllowDrop="True"
                                                                               IsDragPreviewEnabled="True"  IsDragTooltipEnabled="True" SelectionChanged="uiActionersList_SelectionChanged"
                                                ItemsSource="{Binding ActionerModelViewCollection, NotifyOnSourceUpdated=True, NotifyOnTargetUpdated=True,Mode=TwoWay}" Margin="0,0,-5,0" >
                                            <telerikNavigation:RadTreeView.ItemTemplate>
                                                <DataTemplate>
                                                    <pmControls:ActionerControl x:Name="ItemsHost" />
                                                </DataTemplate>
                                            </telerikNavigation:RadTreeView.ItemTemplate>
                                        </telerikNavigation:RadTreeView>


Definition of Actioner Control :

<Grid Background="White">
        <StackPanel>
            <Grid>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Height="25" Margin="0">
                <telerikControls:RadButton Name="dragHandle" Height="24" Width="11" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0,0,3,0">
                    <telerikControls:RadButton.Content>
                        <Grid>
                            <Line X1="0" Y1="0" X2="3" Y2="0" Stroke="Black" StrokeThickness="1"></Line>
                                <Line X1="0" Y1="5" X2="3" Y2="5" Stroke="Black" StrokeThickness="1"></Line>
                                <Line X1="0" Y1="10" X2="3" Y2="10" Stroke="Black" StrokeThickness="1"></Line>
                        </Grid>
                    </telerikControls:RadButton.Content>
                </telerikControls:RadButton>
                    <Image Width="25" Height="25" Source="{Binding SelectedActioner, Converter={StaticResource ReturnImageBasedOnTypeConverter}, Mode=OneWay, UpdateSourceTrigger=PropertyChanged, NotifyOnTargetUpdated=True}">
                         
                    </Image>
                    <DockPanel Width="300" LastChildFill="True" Margin="3,1,0,0">
                        <StackPanel DockPanel.Dock="Right" Orientation="Horizontal" Name="uiCreationButtons" Visibility="{Binding HasGotThisJobOrGroup, Converter={StaticResource CollapsedOnTrueConverter}}">
                            <telerikControls:RadButton Content="New Group" Width="70" Margin="0,0,3,0" Padding="0" HorizontalAlignment="Right" Click="ActionerGroupButton_Click" />
                            <telerikControls:RadButton Content="New Job" Width="70" Margin="0" Padding="0" HorizontalAlignment="Right" Click="ActionerJobButton_Click"/>
                        </StackPanel>
                        <telerikControls:RadComboBox Name="uiActionerNamesComboBox" IsEditable="True"
                        IsReadOnly="False" Margin="0,0,3,0" ItemsSource="{Binding AllAgilityJobDocs}" SelectedValue="{Binding SelectedActioner, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnTargetUpdated=True}"
                        KeyUp="uiActionerNamesComboBox_KeyUp"  telerikControls:TextSearch.TextPath="Title" HorizontalAlignment="Stretch" EmptyText="{Binding ThisActioner.Position, Converter={StaticResource EmptyActionerTextConverter}}">
                            <telerikControls:RadComboBox.FontWeight>
                                <MultiBinding Converter="{StaticResource ActionerBoldTextMultiBindingConverter}" Mode="OneWay">
                                    <Binding Path="SelectedActioner"/>
                                    <Binding Path="NewAgilityJobDocs"/>
                                </MultiBinding>
                            </telerikControls:RadComboBox.FontWeight>
                            <telerikControls:RadComboBox.ItemTemplate>
                                <DataTemplate>
                                    <StackPanel Orientation="Horizontal">
                                        <Image Height="16" Width="16">
                                            <Image.Style>
                                                <Style TargetType="Image">
                                                    <Style.Triggers>
                                                        <DataTrigger  Binding="{Binding ItemType}" Value="Job" >
                                                            <Setter Property="Source" Value="{StaticResource JobDocImage}"/>
                                                        </DataTrigger>
                                                        <DataTrigger Binding="{Binding ItemType}" Value="Group" >
                                                            <Setter Property="Source"  Value="{StaticResource GroupImage}"/>
                                                        </DataTrigger>
                                                    </Style.Triggers>
                                                </Style>
                                            </Image.Style>
                                        </Image>
                                        <TextBlock Text="{Binding Title}" FontWeight="Normal" VerticalAlignment="Center" Margin="5,0,0,0"/>
                                    </StackPanel>
                                </DataTemplate>
                            </telerikControls:RadComboBox.ItemTemplate>
 
                        </telerikControls:RadComboBox>
                    </DockPanel>
                    <Canvas Margin="4,0,0,0" Height="23" Width="23" Visibility="{Binding ActionerCount, Converter={StaticResource HiddenIfActionerDoesntExistConverter}, ConverterParameter=11}">
                        <Image Source="{StaticResource PMActionerRectangle}" Height="23" Width="23" Panel.ZIndex="100"/>
                        <Rectangle Height="21" Width="21" Margin="1,1,0,0" RadiusX="3" RadiusY="3" Panel.ZIndex="99">
                            <Rectangle.Fill>
                                <SolidColorBrush Color="{Binding SelectedColor, UpdateSourceTrigger=PropertyChanged,  Converter={StaticResource ColourConverter}}" />
                            </Rectangle.Fill>
                        </Rectangle>
                    </Canvas>
 
 
                </StackPanel>
            </Grid>
        </StackPanel>
    </Grid>

Petar Mladenov
Telerik team
 answered on 09 May 2011
2 answers
326 views
How can I disable the auto scroll feature of the RadGridView?

I'm using drag and drop between two gridviews that are stacked vertically. The user will NOT drag and drop rows within the gridviews (to reorder or something) so I do not want the gridviews to auto scroll when I'm dragging rows. It seems to be a built in feature though so I would like to disable it. Otherwise, whenever I drag a row from my upper gridview to the lower the upper one will scroll to the bottom.
haagel
Top achievements
Rank 1
 answered on 09 May 2011
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
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
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
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
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
Iron
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?