Telerik Forums
UI for WPF Forum
1 answer
106 views
Hi,

I am new to Telerik chart. Actually downloaded the wpf controls to try before purchasing. I have added the following
XAML:

 

 

<GroupBox Style="{DynamicResource NoTitledGroupBox}" Grid.Row="1" Margin="20,5,20,20">

 

 

 

     <telerikChart:RadChart x:Name="RadChart1">

 

 

 

     </telerikChart:RadChart>

 

 

 

</GroupBox>

 


Code:

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

Ves
Telerik team
 answered on 28 Apr 2010
3 answers
199 views
Hi,

I would like to ask for help, I tried to find a solution in emos and forum threads, but I failed.
I have a DataTable binded to a RadGridView. One of the columns in the binded DataTable is date and I want to display/edit it in a RadDatePicker. Somehow I didn't manage to bind it correctly. I binded the date field to the GridViewDataColumn with DataMemberBinding, but I can not pass it to the template. I can not even pass it to a TextBlock template. However I managed to display and edit with a non-templated GridViewDataColumn. But my goal is to display and edit the date values with RadDatePicker. I guess the main difference is with your provided demo thet here I want to bind a datatable and I must use DataMemberBinding for its field, but I can not use it inside a CellTemplate. I would be greateful if you could ge me a tip or sample code how to resolve this problem.  Here is a sample:

 

 

 

<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>

 

Ferenc Gál
Top achievements
Rank 1
 answered on 28 Apr 2010
12 answers
467 views
Hello

A few days ago I had the problem, that I was binding a GridViewDataColumn to a Property that does not necessary exist on the type of the associated DataContext but in subclasses it does. Here a little overview of my support ticket post:

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? 

The answer was, that somehow it is not possible with the Telerik GridView to bind to abstract classes and that I have to use a Converter to achieve this job. I did so and it worked although I was not 100% happy with this solution as in my opinion, databinding should be a lot softer. Now I'm confronted with the problem, that Grouping / Filtering does not really work as it gives me Exceptions - after searching this forum I found the following post that answers why it doesn't work:


Any other idea how I achieve what I want to achieve? (I was not able to answer the support ticket as my 60-Days-Support expired) 

Thanks
~NoRyb
Stefan Dobrev
Telerik team
 answered on 28 Apr 2010
2 answers
111 views
   hi, i am hu , I have download sales dashboard for wpf sourse, but I don't know how to use it and is there any chm or video about it.
haha 胡
Top achievements
Rank 1
 answered on 28 Apr 2010
1 answer
138 views
Currently I am setting the ItemsPerPage on the panel to get the look i want.  When I resize the window, the space between the items expands which is what I do not want.  To solve this, I bound the ItemsPerPage to a property on my MVVM to handle this and it works well in keeping my item spacing the way I want.  The problem is that the SelectedItem changes as I resize.  The ItemSource and the SelectedItem are bound to properties on my MVVM, and those 2 actual values never change, but what is displayed on the carousel as the SelectedItem does change.

How can I resize the carousel, keep the item spacing the same (by adding more items per page) AND keep the selected item to what it was before the resizing?

Thanks,
David Ribb
Milan
Telerik team
 answered on 27 Apr 2010
1 answer
137 views
We are currently using your wpf controls and have overriden the default styles on many of the controls.  Since upgrading our controls to your recent release, we are receiving numerous xaml errors regarding new parts the controls expect to find in the control templates.  I think our problems can be solved quickly if we had the style source for the recent release to compare whats missing in our existing control templates.  Where can I find the source for the themes you provide?  I have source for previous versions but I didnt find any in the zip files?

Thank you
Lawrence King
International Training Institute
Kalin Milanov
Telerik team
 answered on 27 Apr 2010
10 answers
152 views
Hi,

I am trying to get all checked items from the TreeView.
My problem is this:
i am using  MyTelerikTree.CheckedItems  to get a list of all the checked elements in the tree.
my tree has a 3 level deep hierarchy, and i am only interested in the checked items of the deepest level.


if the tree was never expended i only get the root element as "Checked"
I assume this is happening because the tree is using virtual elements created on the fly.
Now, if the root element is fully checked, then it would be safe to assume all children are selected, and that's fine.
However, if i select just one of the branches or leaves in the tree (so that the root is partially checked) i get it as part of the CheckedItems list.
This would have been fine as well if the tree was not vitrualizing - i could have simply looked at the deepest checked level.
the problem is that if the tree is collapsed and i check the root, i only get the root on the CheckedItems.

In short:
If i treat a checked element as if all it's children are checked, i will sometimes add unchecked elements
If i treat  only checked elements as checked (and not the children) i will miss the checked children..

So my question is - how do i bridge these conflicting issues?


Thanks,
Yossi.



Kiril Stanoev
Telerik team
 answered on 27 Apr 2010
1 answer
96 views
Hi,

I am using Q1 2010 of WPF RAD Controls.

I have a calendar where I need to use the DayTemplateSelector and a custom DayButtonStyle. The problem that I am having is that when I apply my custom DayTemplateSelector, my style goes back to the default style. Is this a bug or limitation?

Thanks,
Gus
Konstantina
Telerik team
 answered on 27 Apr 2010
0 answers
165 views
How to compile WPF VB examples in VS2010?

If you are already using the new VS2010 and want to compile WPF examples which are written and built in VS2008, you need to perform some additional actions to achieve clear compilation. When VS2010 converts all examples one unnecessary file is generated and others appear to be not correctly converted, all of them related with Northwind Data Sources which are used in RadGridView examples.

These are the steps for successful compilation:

1.   Replace “Global.Telerik.Windows.Examples.Properties.Settings.Default.NorthwindConnectionString” with “Settings.Default.NorthwindConnectionString”
2.   Import suggested adapters
3.   Rebuild solution

How to compile WPF C# examples in VS2010?

If you are already using the new VS2010 and want to compile WPF examples which are written and built in VS2008, you need to perform an additional action to achieve clear compilation. When VS2010 converts all examples one unnecessary file is generated (Northwind1.designer.cs), related with Northwind Data Sources which is used in RadGridView examples. Simple delete this file and the compilation will be successful.
Telerik Admin
Top achievements
Rank 1
Iron
 asked on 27 Apr 2010
4 answers
138 views
Hi Telerik,

Does Gridview provide multiple column sort functionality? If yes how can i achieve that functionality.

Thanks,
-Kranthi
Vlad
Telerik team
 answered on 27 Apr 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?