Private Sub AddContractYearColumns() Dim sPeriod As String = String.Empty Dim iIndex As Integer = 0 Try Dim Years = From Yrs In gdcRAD.vw_ProjectYears Select Yrs.Year For Each Yr As String In Years If Yr.ToInteger >= Year(Date.Today) Then iIndex += 1 sPeriod = "Period" & iIndex.ToString("00") Dim column As New GridViewDataColumn() With column .Header = Yr .UniqueName = Yr .DataMemberBinding = New Binding(sPeriod) .DataFormatString = "0.00" .TextAlignment = TextAlignment.Right End With gvContractYrs.Columns.Add(column) Dim f As New Telerik.Windows.Data.SumFunction f.SourceField = sPeriod gvContractYrs.Columns(Yr).AggregateFunctions.Add(f) End If Next Catch ex As Exception Throw New RadException("Add Contract Year Columns", ex.Message, ex.InnerException) End TryEnd SubPrivate Sub DisplayAvailableEquipYrs() Try Dim EquipList = (From Equipment In gdcRAD.usp_YearsAvailable(Date.Today, False, False) Select Equipment).ToList gvContractYrs.ItemsSource = EquipList Catch ex As Exception Throw New RadException("Display Available Equipment Years", ex.Message, ex.InnerException) End TryEnd SubHi,
I implemented a sortable collection to use like itemssource for my RadTreeview. Each item is editable and when item is validated the sortable collection sort well the item. Normal behavior would be
1 User start edit the item
2 User enter Enter key
3 Item is validated
4 Item is sorted in sortablecollection and RadTreeView is updated. IsInEditMode is false.
All works fine except if i decide to bind the IsInEditMode with a property of my model. When the IsInEditMode is binding (Mode TwoWay) the user must press twice Enter to complete the edit.
I join a sample here.
If you launch the sample and try to rename the 7ABC item in 0AAA, the item is well move to first position but stay in editmode. If you comment the following line in MainWindow.xaml
<Setter Property="IsInEditMode" Value="{Binding IsInEditMode,Mode=TwoWay}"/>public class MyCustomCommand : IImageCommand { public Telerik.Windows.Media.Imaging.RadBitmap Execute(Telerik.Windows.Media.Imaging.RadBitmap source, object context) { //My code here .... } }<telerik:ImageToolItem ImageKey="Custom" Text="Custom Command" Command="{Binding MyCustomCommand}"/><telerik:RadCartesianChart.Behaviors> <telerik:ChartPanAndZoomBehavior ZoomMode="Vertical" PanMode="Vertical"/> <telerik:ChartSelectionBehavior DataPointSelectionMode="Single" /> <telerik:ChartSelectionBehavior SelectionChanged="SelectionChanged" /></telerik:RadCartesianChart.Behaviors>
I have a Cartesian chart with DateTimeCategoricalAxis.
1- I want a free space added at the end of the horizontal axis, and extends it beyond the maximum date which now available on the horizontal chart.
2 Every time the chart is initialized, it previews entire data! Is there a way to show only the last 50 data points at first time initialization of chart?
<telerik:RadStackedDataBar Name="xStackedDataBar" Grid.Row="1" Grid.Column="1" Minimum="-20" Maximum="20" ValuePath="BarValue" ToolTipPath="ToolTipItem" Margin="10,5"> <telerik:RadStackedDataBar.BarBrushes> <databars:BrushCollection> <SolidColorBrush Color="SlateBlue" /> <SolidColorBrush Color="AntiqueWhite" /> <SolidColorBrush Color="Aqua" /> <SolidColorBrush Color="Green" /> <SolidColorBrush Color="Blue" /> </databars:BrushCollection> </telerik:RadStackedDataBar.BarBrushes></telerik:RadStackedDataBar>
