Telerik Forums
UI for WPF Forum
2 answers
114 views

 

I can't find how to make a 3D horizontal bar chart. Is there a series definition to do this? Or does anyone have instructions on how to make a Custom 3D model that can do this?

I'm using the document at

http://www.telerik.com/help/wpf/radchart-getting-started-create-data-bound-chart.html

to build a test application. I'm also using the code behind, so a piece of my code is:

{
[...]
 SeriesMapping seriesMapping = new SeriesMapping();
 seriesMapping.LegendLabel = "Product Sales";
 Bar3DSeriesDefinition def = new Bar3DSeriesDefinition();
 seriesMapping.SeriesDefinition = new Bar3DSeriesDefinition();//new HorizontalBarSeriesDefinition();//new SplineSeriesDefinition();
 seriesMapping.ItemMappings.Add(new ItemMapping("Month", DataPointMember.XValue));
 seriesMapping.ItemMappings.Add(new ItemMapping("Quantity", DataPointMember.YValue));
 seriesMapping.ItemMappings.Add(new ItemMapping("MonthName", DataPointMember.XCategory));
 radChart1.SeriesMappings.Add(seriesMapping);
 radChart1.ItemsSource = this.CreateData();
}

 
public class ProductSales
{
 public ProductSales(int quantity, int month, string monthName)
 {
  this.Quantity = quantity;
  this.Month = month;
  this.MonthName = monthName;
 }
 public int Quantity
 {
  get;
  set;
 }
 public int Month
 {
  get;
  set;
 }
 public string MonthName
 {
  get;
  set;
 }
}

private List<ProductSales> CreateData()
{
 List<ProductSales> persons = new List<ProductSales>();
 persons.Add(new ProductSales(154, 1, "January"));
 persons.Add(new ProductSales(138, 2, "February"));
 persons.Add(new ProductSales(143, 3, "March"));
 persons.Add(new ProductSales(120, 4, "April"));
 persons.Add(new ProductSales(135, 5, "May"));
 persons.Add(new ProductSales(125, 6, "June"));
 persons.Add(new ProductSales(179, 7, "July"));
 persons.Add(new ProductSales(170, 8, "August"));
 persons.Add(new ProductSales(198, 9, "September"));
 persons.Add(new ProductSales(187, 10, "October"));
 persons.Add(new ProductSales(193, 11, "November"));
 persons.Add(new ProductSales(212, 12, "December"));
 return persons;
}

thanks in advance

 

James
Top achievements
Rank 1
 answered on 08 May 2012
4 answers
122 views
I saw http://www.telerik.com/community/forums/wpf/chart/is-z-axis-supported-by-3d-chart.aspx some time ago, which implies that Z-Axis is not only supported, but used by default (at least for line series). However, I can not achieve this behavior using 3d bar charts. I have constructed a simple chart using multiple series, as indicated in the aforementioned post.  However, the bars from different series are drawn beside each other (instead of behind eachother), just as would be if the graph were 2d.

Is using the Z-Axis no longer the default behavior? How would I achieve an effect similar to what I've described? The files attached are the charts that currently get generated. Lines do draw on top of each other (desired), but bar charts draw beside each other (not desired).
James
Top achievements
Rank 1
 answered on 08 May 2012
5 answers
179 views
Hello!

We already set up a silverlight project using the DataServiceDataSource. But now, we have a project in WPF, and we are trying to implement the same scenario, but in this WPF project we are using Linq to SQL (.dbml) to generate the models.

This is a short description of the project structure:

APP (Views, ViewModels) WPF Application
Core(.dbml, partial classes, business logic etc) c# class library
Service(WCF for something that the project might have) WCF

My question is, with this architecture, how do i use the DataServiceDataSource? I realy need a service exposed to use it? it would be great if you explain it a little bit.

Looking forward to a answer.

Thanks
Missing User
 answered on 08 May 2012
2 answers
495 views
I have this defined to let each cell display it's value in a tooltip:
<Style TargetType="telerik:GridViewCell">
   <Setter Property="ToolTip" Value="{Binding Value,RelativeSource={RelativeSource Mode=Self}}" />
</Style>

It works, but for cells that have lots of content, it doesn't wrap the text. So I defined this ToolTipTemplate for the column that has lots of text:

<DataTemplate x:Key="GridViewToolTipTemplate">
   <TextBlock Text="{Binding Description, Converter={StaticResource LineBreaksConverter}}" TextWrapping="Wrap" MaxWidth="400" />
</DataTemplate>

The DataMemberBinding has the same expression as the Text of the Textblock, this just allows the text to wrap. It works well, but...

I'd like to reuse this template for another column, rather than having to define this template again. I'm just not sure what to bind the Text property to so that it works for whatever column I use it with.
Rayne
Top achievements
Rank 1
 answered on 08 May 2012
2 answers
161 views
Hi
 I would like to create a usercontrol that will allow me have a set a predefined columns within a GridView when bound to a collection of our DataContract classes.   What I would like to see is something on the order of the Data Template Selector... but instead, have that at the GridViewDataColumn level.   Here is an example

[DataContract]
public MyDataClass
{
Public SomeEnum EnumProperty {get;set;}
        Public SomeClass SomeClassProperty {get;set;}
Public int SomeIntProperty {get;set;}
}


Now  lets say I have a List<MyDataClass> and I want to bind this to a RadGridView control and have it auto generate the columns based on some defined logic. I know that I could probably do this in the Auto generate event handler in my code behind though a series of if logic or case staements.  But I would prefer it if there was a way that I can define some sort of a GridViewDataColumnSelector to have it automatically define both of the read only and editor templates. Something on the order of what we have for Data Template or Style Template selector except for the entire GridViewDataColumn.

For the example above.. I would like to auto-generate a Combobox for the Enum to provide a list of Enum possible values.  And for the SomeClass property.. I want to create a ComboBox with a list of values bound to collection of possible values. 
Michael C
Top achievements
Rank 1
 answered on 08 May 2012
10 answers
577 views
Hello

When setting the IsEnabled property of a RedNumericUpDown control to false, there is almost no visual change. Only the control does not change its border any more when hovering over it. But there is no gray background or anything like that.
When we experienced that, we tried to do it using a trigger and setting the Background property but the Background property does not seem to work.

Is there any simple solution to that apart from putting a whole new ControlTemplate?

Best regards

Christian
MATEUSZ
Top achievements
Rank 1
 answered on 08 May 2012
2 answers
213 views
Please provide me the code to remove the gradient effect on bar charts, I understand I have to create a custom style to get rid of the default mask but every example on here is either for pie charts or I haven't been able to get them to work.

Telerik WPF 2012_1_0326

Many thanks.

Craig Mellon
Top achievements
Rank 1
 answered on 08 May 2012
3 answers
267 views
I have a RadGridView that displays data from my database.  I have set up a DataTemplate for the RowDetails:

<DataTemplate x:Key="ReadRowDetailsTemplate">
    <Grid HorizontalAlignment="Center">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
                <Label Content="Alarms for this Read:"
                     FontSize="14"
                     FontWeight="Bold"
                     Grid.Column="0"
                     Grid.Row="0"
                     HorizontalAlignment="Center" />
                    <DataGrid AlternatingRowBackground="{DynamicResource AlternatingRowBackground}" 
                           AutoGenerateColumns="False" 
                           CanUserResizeColumns="True" 
                           CanUserSortColumns="False"
                           FontSize="14" 
                           FontWeight="Bold"
                           Grid.Column="0"
                           Grid.Row="1"
                           HorizontalAlignment="Center"
                           IsReadOnly="True"
                           ItemsSource="{Binding Path=Alarms, Mode=TwoWay}"
                           Margin="5" 
                           Name="AlarmsGrid" 
                           ScrollViewer.CanContentScroll="True"
                           ScrollViewer.HorizontalScrollBarVisibility="Auto" 
                           ScrollViewer.VerticalScrollBarVisibility="Auto"
                           SelectionChanged="AlarmsGrid_SelectionChanged"
                           SelectionMode="Single"
                           SelectionUnit="FullRow"
                           VerticalAlignment="Top">
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=AlarmClass}"
                                            Header="Alarm Class" />
                        <DataGridTextColumn Binding="{Binding Path=AlarmTime, Converter={StaticResource DateConverter}}"
                                            Header="Time"
                                            Width="150" />
                        <DataGridTextColumn Binding="{Binding Path=ListName}"
                                            Header="Source" />
                        <DataGridTextColumn Binding="{Binding Path=AlarmStatus}"
                                            Header="Alarm Status"/>
                        <DataGridTextColumn Binding="{Binding Path=AlarmRejectedReason}"
                                            Header="Reason" />
                    </DataGrid.Columns>
                </DataGrid>
            </Grid>
        </DataTemplate>
In order to speed loading of the data, I have implemented the following:

  1. I have implemented a class called CustomGridViewToggleRowDetailsColumn which descends from GridViewBoundColumnBase.  This class has properties that allow me to hide the GridViewToggleButton for a row if that row does not have any row details.  It also has a Click event that is raised whenever the user clicks on the GridViewToggleButton.
  2. In my class that populates the rows of the RadGridView, I have implemented INotifyPropertyChanged.
  3. In the window that has the RadGridView, I retrieve my data from the database but leave the Alarms property (which is bound to the DataGrid's ItemsSource property in the DataTemplate) set to null initially.  A bool property called HasAlarms is set to true if the row has Alarms associated with it.
  4. In the window that has the RadGridView, I have a Click event handler for the custom Click event I mentioned in #1.  This checks to see if the Alarms property for the row that was clicked is null.  If it is, it goes to the database and retrieves the Alarms.  Note that this event can't happen unless HasAlarms is set to true for that row.

This is all working, but the DataGrid remains empty after the RowDetails are displayed.  What am I missing to make this work?

Tony

Tony
Top achievements
Rank 1
 answered on 08 May 2012
10 answers
336 views
Hi,

actually with my VS2008 I use V2011.3.1220.35 and I'm trying to upgrade to V2012.1.326.35 and I have some questions. Actually
my "C:\Program Files (x86)\Telerik\RadControls for WPF Q3 2011 SP1" folder contain the following folders:

Binaries
Demos
LicenseAgreements
Themes
VSExtensions

and the new folder ("C:\Users\agosselin\AppData\Roaming\Telerik\Updates\RadControls_for_WPF_2012_1_0326_Dev_hotfix") created by Telerik download process contain the following folders:

Binaries
Binaries.NoXaml
LicenseAgreements
Themes.Implicit

the folders structure are not the same!!! I would like to know what should I do and consider to upgrade my current version of Telerik???

PS: In our development environment, we have a specific folder containing each Telerik versions regarding the one we use with the project we work on.

Thank's
Oliver
Top achievements
Rank 1
 answered on 07 May 2012
2 answers
322 views
I have a reference to an object that is in the RadGridView, but it is not necessarily the currently selected object in the RadGridView, and I need to find the object that immediately precedes or follows it.  I have an ObservableCollection of objects, but the order of the objects in the ObservableCollection does not always match the order of the rows in the RadGridView, since the user can sort the RadGridView.

Is there a way I can retrieve a reference to a collection of the RadGridView's items that is in the same order as the data currently is in the RadGridView?

Tony
Tony
Top achievements
Rank 1
 answered on 07 May 2012
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
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?