<GroupBox Style="{DynamicResource NoTitledGroupBox}" Grid.Row="1" Margin="20,5,20,20">
<telerikChart:RadChart x:Name="RadChart1">
</telerikChart:RadChart>
</GroupBox>
RadChart1.DefaultView.ChartArea.AxisX.DefaultLabelFormat =
"{0:F2}"
RadChart1.DefaultView.ChartArea.AxisX.MaxValue = 1000
RadChart1.DefaultView.ChartArea.AxisX.MinValue = 0
RadChart1.DefaultView.ChartArea.AxisX.[Step] = 100.0
RadChart1.DefaultView.ChartArea.AxisY.ExtendDirection = AxisExtendDirection.Smart
RadChart1.DefaultView.ChartArea.AxisX.Step = 100.0
RadChart1.DefaultView.ChartArea.AxisY.Title =
"Head"
RadChart1.DefaultView.ChartArea.AxisX.Title =
"GPM"
'RadChart1.DefaultView.ChartArea.AxisY.AxisStyles.TitleStyle = TryCast(Resources("CustomAxisTitleStyle"), Style)
Dim dsSeries As DataSeries = GenerateSeries(obj.getAdjustedHeadCalc, obj.getAdjustedCapacity)
dsSeries.LegendLabel =
"Head"
dsSeries.Definition =
New LineSeriesDefinition
RadChart1.DefaultView.ChartArea.DataSeries.Add(dsSeries)
I have about 17 points. The YAxis draws the labels fine but I see some missing tick marks. I want 10 ticks on the XAxis but it keeps drawing 17 ticks and the labels are all messed up. Is there anything I am doing wrong?
I have attached the produced chart with the above code.
Regards,
Boaz
<Window.Resources>
<bl:TimeBand x:Key="timeBands"/>
</Window.Resources>
...
<telerik:RadGridView Name="grTimeBand" AutoGenerateColumns="False" ActionOnLostFocus="CommitEdit" ShowGroupPanel="False" ItemsSource="{Binding Source={StaticResource timeBands}, Path=TimeBandTable, debug:PresentationTraceSources.TraceLevel=High}">
<telerik:RadGridView.Columns>
<telerik:GridViewComboBoxColumn Header="InclAllSpecDays" Width="100" ItemsSourceBinding="{Binding Source={StaticResource booleanValues}, Path=BooleanValueList}" DataMemberBinding="{Binding INCLUSIVE_ALL_SPECIAL_DAYS}" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding START_TIME}">
<telerik:GridViewDataColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding START_TIME, debug:PresentationTraceSources.TraceLevel=High}" /> ?????
</DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>
<telerik:GridViewDataColumn.CellEditTemplate>
<DataTemplate>
<telerikInput:RadDatePicker SelectedDate="{Binding START_TIME, Mode=TwoWay}" />
</DataTemplate>
</telerik:GridViewDataColumn.CellEditTemplate>
</telerik:GridViewDataColumn>
<telerik:GridViewDataColumn Header="EndTime" Width="100" DataMemberBinding="{Binding END_TIME}"/>
...
</telerik:RadGridView.Columns>
</telerik:RadGridView>
I'm trying to replace my DataGrid with a RadGridView from Telerik. My control has a ViewModel as DataContext which has a property "DbObject". It is of the type "DbBaseObject". Now there could be any descendant of this type filled into the GridView. Some of them may have a property "Name", some may not. The standard WPF-Controls are pretty soft when evaluating a property that doesn't exist -> they just show an empty value. The RadGridView gives me Exceptions: |
ArgumentException "Property with name Name cannot be found on type DbBaseObject" |
and afterwards |
Invalid property or field - 'Name' for type: DbBaseObject |
This is true, the DbBaseObject doesn't have a property "Name" but this shouldn't be a reason not to show a column. Is there anything I can do to soften this behavior up? |