Telerik Forums
UI for WPF Forum
11 answers
388 views
I am using RadControls for WPF build 2010.1.416.35. I have a radchart and define the SeriesMappings in XAML and when it tries to render the XAML below in VS2008 or Blend 3 I get the error "Invalid property or field - 'TimeStamp' for type: Double" in design view.
<telerik:RadChart x:Name="hydroChart" Margin="8,34,0,0" ItemsSource="{Binding DataPoints, Mode=TwoWay}" HorizontalAlignment="Left" VerticalAlignment="Top" 
                          telerik:Theming.Theme="Summer">  
            <telerik:PointMark Size="1">  
                  
            </telerik:PointMark> 
            <telerik:RadChart.SamplingSettings> 
                <telerik:SamplingSettings SamplingFunction="KeepExtremes" SamplingThreshold="50"/>  
            </telerik:RadChart.SamplingSettings> 
            <telerik:RadChart.AnimationSettings> 
                <telerikChart:AnimationSettings ItemAnimationDuration="00:00:00" ItemDelay="00:00:00" DefaultSeriesDelay="00:00:00"/>  
            </telerik:RadChart.AnimationSettings> 
            <telerik:RadChart.DefaultView> 
                <telerik:ChartDefaultView>                    
                    <telerik:ChartDefaultView.ChartArea> 
                        <telerik:ChartArea NoDataString="No Data....." LegendName="chartLegend">  
                            <telerikChart:ChartArea.AdditionalYAxes> 
                                <telerikChart:AxisY AutoRange="False" AxisName="TEMPER" DefaultLabelFormat="#VAL F" MaxValue="110" MinValue="50" Step="20" Title="Temperature in F"/>  
                            </telerikChart:ChartArea.AdditionalYAxes> 
                            <telerikChart:ChartArea.AxisY> 
                                <telerikChart:AxisY AutoRange="False" MinValue="0" MaxValue="25000" Step="1000" Title="PSI" AxisName="PSI"/>  
                            </telerikChart:ChartArea.AxisY> 
                            <telerik:ChartArea.AxisX> 
                                <telerik:AxisX LabelRotationAngle="90" LabelStep="2" Title="Time" IsDateTime="True" DefaultLabelFormat="#VAL{hh:mm:ss}"/>  
                            </telerik:ChartArea.AxisX>                              
                        </telerik:ChartArea>                                
                    </telerik:ChartDefaultView.ChartArea>                      
                    <telerik:ChartDefaultView.ChartLegend> 
                        <telerik:ChartLegend x:Name="chartLegend" Header="In-Process Hydro" UseAutoGeneratedItems="True" ></telerik:ChartLegend> 
                    </telerik:ChartDefaultView.ChartLegend> 
                </telerik:ChartDefaultView> 
            </telerik:RadChart.DefaultView> 
            <telerik:RadChart.SeriesMappings> 
                <telerik:SeriesMappingCollection> 
                    <telerik:SeriesMapping LegendLabel="Inlet PSI">   
                        <telerik:SeriesMapping.SeriesDefinition> 
                            <telerik:LineSeriesDefinition AxisName="PSI" ShowItemLabels="False" ShowItemToolTips="True" 
                                                          PointMarkItemStyle="{StaticResource PointMarkStyle}">  
                                  
                            </telerik:LineSeriesDefinition> 
                        </telerik:SeriesMapping.SeriesDefinition> 
                        <telerik:SeriesMapping.ItemMappings> 
                            <telerik:ItemMapping DataPointMember="XValue" FieldName="TimeStamp" FieldType="sys:DateTime"/>  
                            <telerik:ItemMapping DataPointMember="YValue" FieldName="InletPressure"  /> 
                        </telerik:SeriesMapping.ItemMappings> 
                    </telerik:SeriesMapping> 
                    <telerik:SeriesMapping LegendLabel="Outlet PSI">  
                        <telerik:SeriesMapping.SeriesDefinition> 
                            <telerik:LineSeriesDefinition AxisName="PSI" ShowItemLabels="False" ShowItemToolTips="True" 
                                                          PointMarkItemStyle="{StaticResource PointMarkStyle}"/>  
                        </telerik:SeriesMapping.SeriesDefinition> 
                        <telerik:SeriesMapping.ItemMappings> 
                            <telerik:ItemMapping DataPointMember="XValue" FieldName="TimeStamp" FieldType="sys:DateTime"/>  
                            <telerik:ItemMapping DataPointMember="YValue" FieldName="OutletPressure" /> 
                        </telerik:SeriesMapping.ItemMappings> 
                    </telerik:SeriesMapping>      
                    <telerik:SeriesMapping LegendLabel="Ambient Temp">  
                        <telerik:SeriesMapping.SeriesDefinition> 
                            <telerik:LineSeriesDefinition AxisName="TEMPER" ShowItemLabels="False" ShowItemToolTips="True" 
                                                          PointMarkItemStyle="{StaticResource PointMarkStyle}"/>  
                        </telerik:SeriesMapping.SeriesDefinition> 
                        <telerik:SeriesMapping.ItemMappings> 
                            <telerik:ItemMapping DataPointMember="XValue" FieldName="TimeStamp" FieldType="sys:DateTime"/>  
                            <telerik:ItemMapping DataPointMember="YValue" FieldName="NewAmbientTemp" /> 
                        </telerik:SeriesMapping.ItemMappings> 
                    </telerik:SeriesMapping> 
                    <telerik:SeriesMapping LegendLabel="Fluid Temp In">  
                        <telerik:SeriesMapping.SeriesDefinition> 
                            <telerik:LineSeriesDefinition AxisName="TEMPER" ShowItemLabels="False" ShowItemToolTips="True" 
                                                          PointMarkItemStyle="{StaticResource PointMarkStyle}"/>  
                        </telerik:SeriesMapping.SeriesDefinition> 
                        <telerik:SeriesMapping.ItemMappings> 
                            <telerik:ItemMapping DataPointMember="XValue" FieldName="TimeStamp" FieldType="sys:DateTime"/>  
                            <telerik:ItemMapping DataPointMember="YValue" FieldName="NewFluidTempIn" /> 
                        </telerik:SeriesMapping.ItemMappings> 
                    </telerik:SeriesMapping> 
                    <telerik:SeriesMapping LegendLabel="Fluid Temp Out">  
                        <telerik:SeriesMapping.SeriesDefinition> 
                            <telerik:LineSeriesDefinition AxisName="TEMPER" ShowItemLabels="False" ShowItemToolTips="True" 
                                                          PointMarkItemStyle="{StaticResource PointMarkStyle}"/>  
                        </telerik:SeriesMapping.SeriesDefinition> 
                        <telerik:SeriesMapping.ItemMappings> 
                            <telerik:ItemMapping DataPointMember="XValue" FieldName="TimeStamp" FieldType="sys:DateTime"/>  
                            <telerik:ItemMapping DataPointMember="YValue" FieldName="NewFluidTempOut" /> 
                        </telerik:SeriesMapping.ItemMappings> 
                    </telerik:SeriesMapping> 
                </telerik:SeriesMappingCollection> 
            </telerik:RadChart.SeriesMappings> 
            <telerik:RadChart.DefaultSeriesDefinition> 
                <telerik:LineSeriesDefinition LegendDisplayMode="SeriesLabel" ShowItemLabels="False" ShowItemToolTips="True"/>  
            </telerik:RadChart.DefaultSeriesDefinition> 
        </telerik:RadChart> 

But when I only have 1 SeriesMapping everything works as expected. Is this a known bug, or am I missing something?

 Everything compiles fine, and when I run the program it renders properly. Any help is appreciated.

Thanks,
Ryan
Velin
Telerik team
 answered on 07 Sep 2010
3 answers
182 views

Hi,

I’m calling an asynchronous WCF service and adding the items into the RadComboBox.  I would like to call the same service as I am typing in the RadComboBox (text passed as a parameter to the service) and auto fill and display the results. Please advise.

Thanks
RJ

Konstantina
Telerik team
 answered on 07 Sep 2010
3 answers
240 views

Hello

In this point the  property  ValidatesOnDataErrors  available in SL only

When this will be available for WPF?

Best regards

Ehud

Nedyalko Nikolov
Telerik team
 answered on 07 Sep 2010
1 answer
250 views
Hello,

I have a little problem with editing value when ValueFormat is set to Percent. When control has no focus, the value I see is "250 %". When I focus the control to edit value, the value of control change to "2.5". Can the edited value be "250 %" instead of "2.5" ?

The control is set something like that: 

<telerik:RadNumericUpDown Value="{Binding Rate, Mode=TwoWay}" ValueFormat="Percentage" LargeChange="0.2" SmallChange="0.1">
<telerik:RadNumericUpDown.NumberFormatInfo>
<sysGlob:NumberFormatInfo PercentDecimalDigits="0"/>
</telerik:RadNumericUpDown.NumberFormatInfo>
</telerik:RadNumericUpDown>

 

 

 

 


Thanks in advance.

David
Boyan
Telerik team
 answered on 07 Sep 2010
1 answer
134 views
Hi,

This is probably some flag I am missing. But the behavior I see is:
When I select a child node in my tree view, the contents on the treeview shift to the left so that the left edge of the selected child item is a few pixels from the treeview edge. This causes the treeview to be partially obscured (till the selector arrow thing of the parent item has been shifted out of view.)

Oh and it stops doing that if I set my root node to have a set width that is less than the width of my treeview. But I dont want to do it since I do not know how big the nodes will be.

Any idea what I am doing wrong?

thanks,
JK
Hristo
Telerik team
 answered on 07 Sep 2010
4 answers
177 views
Hello I have a problem with RadCarousel, at runtime you can not add items to the carousel OpenDialog because when I connect my ItemSource with images not see it, I realized that if the images are not shown in project resources can not be seen ...
What I have to do to see the images that are not in the resources folder?

DataTemplate?

C # code?

thank you very much, sorry for my english

 

   
  
public partial class Window1 : Window 
    {
        List<Image> lista; 
        private const String Extension = "(*.jpg)|*.jpg|(*.png)|*.png"
  
        public Window1() 
        {
            InitializeComponent();
            lista = new List<Image>();
            Microsoft.Win32.OpenFileDialog dialog ;
         }
  
        private void button1_Click(object sender, RoutedEventArgs e) 
            {
  
                lista.Clear();
                dialog = new Microsoft.Win32.OpenFileDialog { RestoreDirectory = true, Filter = Extension, Multiselect = true }; 
            
       if (dialog.ShowDialog() == true
                    {
                         foreach (string Name in dialog.FileNames) 
                 {
                        Image Im = new Image()
                Im.Source = new BitmapImage(new Uri(fName, UriKind.Relative)); 
                         lista.Add(Im);
  
                }
  
            this.radCarousel1.ItemsSource = lista; 
   
            }
  
        }
  
    }
  
}

Vic
Top achievements
Rank 1
 answered on 06 Sep 2010
2 answers
133 views
I am using the MVVM design pattern and am attempting to add a button to perform an action on all items in a group. I have successfully added the button to the group header template and am attempting to find the view models of the group's rows with the following code:

private void validateGroupButton_Click(object sender, RoutedEventArgs e)
        {
            var sourceUIElement = (UIElement)sender;
            var group = sourceUIElement.ParentOfType<GridViewGroupRow>();
            var collectionViewGroup = (CollectionViewGroup)group.DataContext;
            var grid = sourceUIElement.ParentOfType<RadGridView>();
            var vm = (ManualDealsViewModel)grid.DataContext;
            var toValidate = collectionViewGroup.Items.Cast<ManualDealViewModel>().ToList();
              (.... perform action on toValidate enumeration ...)
            }

This basically works, however the toValidate enumeration only contains the rows that are currently visible in the group. 

Is there a way to retrieve all the view models that match the group, even if they are not presently visible?
David
Top achievements
Rank 1
 answered on 06 Sep 2010
1 answer
144 views
Hi guys.

What would be the best way in xaml to display a RadGridViewColumn only when data is available
e.g.
I have to column in my Radgridview. These columns are binding against an IEnumerable List of Materials (Type: MATERIAL)

If one column doesn not contain any data in all underlying rows, i would like not to display this column. (i only want to display columns with cell values)
How can this be done?
thanks for your help
<DataTemplate>
    <tcg:RadGridView x:Name="RadGridView1" CanUserFreezeColumns="False" AutoGenerateColumns="False" ItemsSource="{Binding MBEP}"  ShowGroupPanel="False" IsReadOnly="True">
        <tcg:RadGridView.Columns            
                <tcg:GridViewDataColumn DataMemberBinding="{Binding MATERIAL.Txt1}" Header="Material Descr."/>
                <tcg:GridViewDataColumn DataMemberBinding="{Binding MATERIAL.MatNr}" Header="Material No" Width="{Binding MATA.MatNr.Length}"/>
        </tcg:RadGridView.Columns>
    </tcg:RadGridView>
</DataTemplate>
Milan
Telerik team
 answered on 06 Sep 2010
2 answers
189 views

I have a RadGridView that is populated dynamically by a data table. Certain columns are calculated from other columns but the calculations are done by my own calculation engine. When one of the underlying columns is changed I pick up the event and check whether it is part of a calculation. If it is then I do the calculation and need to update the relevant cell/s.

 

My problem comes in when wanting to update the cell/s. Right now I am changing the data table data and then binding the data table back to the grid and calling refresh function.

 

DataTable source = ( DataTable ) this.gridLogsheetGrid.ItemsSource;

 

//Change cell data

 

this.gridLogsheetGrid.ItemsSource = source;

this.gridLogsheetGrid.Items.Refresh ( );

 

This works, however it refreshes the entire grid and is therefore expensive and the grid disappears for a second or two.

 

I have read the thread on applying using the INotifyPropertyChanged event but how will I use this on an individual column on a data table?

Chris
Top achievements
Rank 1
 answered on 06 Sep 2010
3 answers
136 views
Hi Team,

How can i expose RadTreeView.SelectedContainer property,  which will return my own custom type instead of RadTreeViewItem?

code:

 

 

public RadTreeViewItem SelectedContainer

 

{

 

 

get { return (RadTreeViewItem)TreeView.GetValue(RadTreeView.SelectedContainerProperty); }

 

 

 

set { TreeView.SetValue(RadTreeView.SelectedContainerProperty, value); }

 

}


instead of the above code i want to write something like this:

 

 

public TngTreeViewItem SelectedContainer

 

{

 

 

get { return (TngTreeViewItem )TreeView.GetValue(RadTreeView.SelectedContainerProperty); }

 

 

 

set { TreeView.SetValue(RadTreeView.SelectedContainerProperty, value); }

 

}

--------------------------------------------------------------------------------------------------------------------------------------------------------------------
TngTreeViewItem.cs

[

 

ContentProperty("Items")]

 

 

 

public class TngTreeViewItem : FrameworkContentElement

 

{

 

 

protected RadTreeViewItem _treeViewItem = new RadTreeViewItem();

 

#region

 

 

Constructors

 

 

 

static TngTreeViewItem()

 

{

DefaultStyleKeyProperty.OverrideMetadata(

 

typeof(TngTreeViewItem), new FrameworkPropertyMetadata(typeof(TngTreeViewItem)));

 

}

#endregion

#region

 

 

Internal Control

 

 

 

public RadTreeViewItem InternalControl

 

{

 

 

get

 

{

 

 

return _treeViewItem;

 

}

}

#endregion

 

#region

 

 

Property: Header

 

 

 

public virtual Object Header

 

{

 

 

get { return GetValue(HeaderProperty); }

 

 

 

set { SetValue(HeaderProperty, value); }

 

}

 

 

public static readonly DependencyProperty HeaderProperty =

 

 

 

DependencyProperty.Register(

 

 

 

"Header", typeof(Object), typeof(TngTreeViewItem),

 

 

 

new FrameworkPropertyMetadata

 

{

PropertyChangedCallback = (obj, e) =>

{

(obj

 

as TngTreeViewItem).UpdateHeader(e.NewValue);

 

}

});

 

 

private void UpdateHeader(Object sel)

 

{

_treeViewItem.Header = sel;

}

#endregion

}
}


Thanks,
-Manjurekar
Hristo
Telerik team
 answered on 06 Sep 2010
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
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
SplashScreen
Rating
Accessibility
Callout
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
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?