Telerik Forums
UI for WPF Forum
1 answer
103 views
Hello All,

   In the private bool Telerik.Windows.Controls.GridView.GridViewDataControl.Move(FocusNavigationDirection navigationDirection) method, there is an unchecked condition in the FocusNavigationDirection.Next and Previous switch condition that throws a NullRefereceException.  Below is the code snippet:

      switch (navigationDirection)  
      {  
        case FocusNavigationDirection.Next:  
        case FocusNavigationDirection.Previous:  
          if (!this.CurrentCell.IsInEditMode)  
          { //...  
 

I know its a bug because just below that is the proper form of the condition that checks this.CurrentCell for null:
        case FocusNavigationDirection.Left:  
        case FocusNavigationDirection.Right:  
        case FocusNavigationDirection.Up:  
        case FocusNavigationDirection.Down:  
          currentCellContainer = this.OnArrowKeyDown(this.CurrentCell, navigationDirection);  
          if ((this.CurrentCell != null) && this.CurrentCell.IsInEditMode)  
          { //...  
 

- Rashad Rivera
  omegusprime.com
Vlad
Telerik team
 answered on 15 Apr 2010
6 answers
346 views
Default setting for the EditTriggers in the DataGrid is "Mouse DoubleClick". However I want to be able to edit the cells if either of the following events happen:

1. Enter Key Press
2. Mouse DoubleClick
3. F2 Key Press

Can you tell me how to do this? I didn't find anything in the documentation regarding this.
Nedyalko Nikolov
Telerik team
 answered on 14 Apr 2010
9 answers
121 views
Hi There,

I'm trying to find a way to have a text appear in the body of the GridView (where the background color appears) whenever the grid does not contain any rows (something like "The list is empty, click on XXX to add something!"). I could think of a few ways to do this, but was wondering if there is some kind of recommended way.

What do you guys say?

Thanks,
yonadav
Pavel Pavlov
Telerik team
 answered on 14 Apr 2010
6 answers
101 views
Hello!

I have problem with RadGridView grouping.

<telerikGrid:RadGridView x:Name="InmattVolymGridView" Language="sv-SE" AutoGenerateColumns="False"         
                                         ShowColumnFooters="True"
                                         VerticalAlignment="Top"
                                         ItemsSource="{Binding InmattaVolymer, ValidatesOnDataErrors=True, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
                                         Validation.ErrorTemplate="{DynamicResource validationTemplate}"
                                         ToolTip="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors).CurrentItem.ErrorContent}" >
                   
                    <telerikGrid:RadGridView.Columns>
                        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding Sortiment}" Header="Sortiment" Width="85"/>
                        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding InmattM3F}" Header="m3f Inmätt" Width="100" >
                            <telerikGrid:GridViewDataColumn.AggregateFunctions>
                                <telerikData:SumFunction SourceField="InmattM3F" />
                            </telerikGrid:GridViewDataColumn.AggregateFunctions>
                        </telerikGrid:GridViewDataColumn>
                        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding SortimentTyp}" Header="Sortimenttyp" Width="85"/>
                    </telerikGrid:RadGridView.Columns>
                    <telerikGrid:RadGridView.GroupDescriptors>
                        <telerikData:GroupDescriptor SortDirection="Ascending" Member="SortimentTyp">
                            <telerikData:GroupDescriptor.AggregateFunctions>
                                <telerikData:CountFunction Caption="Total volym:" />
                            </telerikData:GroupDescriptor.AggregateFunctions>
                        </telerikData:GroupDescriptor>
                    </telerikGrid:RadGridView.GroupDescriptors>
                 </telerikGrid:RadGridView>

I get 'Invalid Property or Field' on Member in GroupDescription. How should I connect the grouping to the column.

Best regards / Anna
Rudis
Top achievements
Rank 1
 answered on 14 Apr 2010
1 answer
106 views
Two questions into one....

1: Can I customize the style of the scrollbars when using the scrolling/zooming features
2: Can I make it so that the width of the bars are fixed?

I'm trying to make a chart where there are a larger number elements that can be scrolled through (keeping the Y-Axis fixed).

Thanks!

Sia
Telerik team
 answered on 14 Apr 2010
2 answers
401 views
Hi,

I'm trying to bind the background of a GridViewDataColumn to a property in my ViewModel:
<radGrid:GridViewDataColumn Header="State" Width="090" Background="{Binding Path=State, Converter={StaticResource StateToColorConverter}}" DataMemberBinding="{Binding Path=State}"/> 

Based on the value of the State property the background should change: if State = new, the background should be green, if State = rejected the value should be red, and so on.
However, if I bind the State property to the Background, i get a BindingExpression path error stating that my State property is not found on my object, while the same databinding works fine on the DataMemberBinding.
Anyone got a clue what is wrong here?

The Xaml:
<radGrid:RadGridView ItemsSource="{Binding Orders}" > 
     <radGrid:RadGridView.Columns> 
          <radGrid:GridViewDataColumn Header="State" Width="090" 
                                     
Background="{Binding Path=State, Converter={StaticResource StateToColorConverter}}" 
                                     
DataMemberBinding="{Binding Path=State}"/>  
     </radGrid:RadGridView.Columns> 
</radGrid:RadGridView> 

and the code from the viewModel:
private ObservableCollection<SingleOrder> _orders = new ObservableCollection<SingleOrder>()  
public ObservableCollection<SingleOrder> Orders { get { return _orders; } }  
 
public class SingleOrder   
        : ViewModelBase  
{  
        private Instrument _instrument;  
        public Instrument Instrument  
        {  
            get { return _instrument; }  
            set 
            {  
                if (!Instrument.Equals(_instrument, value))  
                {  
                    _instrument = value;  
                    this.OnPropertyChanged("Instrument");  
                }  
            }  
        }  
 
        private System.String _state;  
        public System.String State  
        {  
            get { return _state; }  
            set 
            {  
                if (!String.Equals(_state, value))  
                {  
                    _state = value;  
                    this.OnPropertyChanged("State");  
 
                }  
            }  
        }  
}  
 

Thanks a lot!

Hans
Hans Smit
Top achievements
Rank 1
 answered on 14 Apr 2010
1 answer
373 views
Not a question this time. I just thought I might post this in case it is of help to others playing with the RadMap.
 
This is how to add images to the radmap map with a bit more control over the image than is available by simply adding a bitmap using the pinpoint method.

        // Set provider
                BingMapProvider provider = new BingMapProvider(MapMode.Aerial, true, "YOUR CODE GOES HERE");
                provider.IsTileCachingEnabled = true;
                mWindow.radmap.Provider = provider;

        // Create information layer
                iLayer = new InformationLayer();
                iLayer.MapControl = mWindow.radmap;
                mWindow.radmap.Items.Add(iLayer);

        // Create a new image object and add it to bing map.
                Uri uri = new Uri(@"" + imageName, UriKind.Relative);

                BitmapImage bitmap = new BitmapImage();
                bitmap.BeginInit();
                bitmap.UriSource = uri;
                bitmap.EndInit();

                Image image = new Image();
                image.Source = bitmap;
                image.Opacity = 0.85;
                image.Width = imageWidth;
                image.Height = imageHeight;
                image.Stretch = Stretch.UniformToFill;
                image.SnapsToDevicePixels = true;
                image.Name = Name;

        // When added to map, centre image over Lat/Long rather than use upper left corner for placement
                image.VerticalAlignment = VerticalAlignment.Center;
                image.HorizontalAlignment = HorizontalAlignment.Center;

        // Add the image to the map
                MapLayer.SetLocation(image, new Location(dLatitude, dLongitude));
                iLayer.Items.Add(image);

Andrey
Telerik team
 answered on 14 Apr 2010
1 answer
90 views

Hello!

I’m working with your Chart, and I found it working incorrectly.

<QuickStart:ExampleControl x:Class="Telerik.Windows.Examples.Chart.WPF.TwoDimensional.Bar.Example"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:QuickStart="clr-namespace:Telerik.Windows.QuickStart;assembly=Telerik.Windows.QuickStart"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
    <Grid>     
        <telerik:RadChart x:Name="RadChart1"/>
    </Grid>
</QuickStart:ExampleControl>

As a result I expect to see a Chart of 0x0 size, but instead it’s 800x600.
I do not understand where this size comes from, because it’s not written anywhere.
How can I solve that problem?
The matter is crucial for me, since in my application I need to implement the floating layout.
Thank you very much.

RadarSoft

Velin
Telerik team
 answered on 14 Apr 2010
1 answer
85 views
Out of the blue, I have started getting an assembly error when i try to debug my application. I am utilizing RadControls for WPF Q1 2010 in VS 2008:

Error   1   Could not load type 'Microsoft.Windows.Design.Metadata.ProvideMetadataAttribute' from assembly 'Microsoft.Windows.Design.Extensibility, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Line '1' Position '491'.   C:\Documents and Settings\akedzier\My Documents\Visual Studio 2008\Projects\CCMB_WPF\WpfApplication1\panels\Panel_04.xaml   12   13   CCBM_Wpf

Here is the code it tags as problematic. It is almost verbatim from the Telerik example:
            <ControlTemplate x:Key="NewGaugeBackground"  TargetType="{x:Type ContentControl}"
                <Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"
                    <Grid.ColumnDefinitions> 
                        <ColumnDefinition Width="20"/> 
                        <ColumnDefinition Width="*"/> 
                        <ColumnDefinition Width="20"/> 
                    </Grid.ColumnDefinitions> 
                    <Grid.RowDefinitions> 
                        <RowDefinition Height="20"/> 
                        <RowDefinition Height="*"/> 
                        <RowDefinition Height="20"/> 
                    </Grid.RowDefinitions> 
                    <Ellipse Stretch="Fill" Grid.ColumnSpan="3" Grid.RowSpan="3"
                        <Ellipse.Fill> 
                            <ImageBrush ImageSource="pack://application:,,,/images/bronze.jpg" /> 
                        </Ellipse.Fill> 
                        <Ellipse.BitmapEffect> 
                            <BevelBitmapEffect BevelWidth="20" 
                                EdgeProfile="BulgedUp" 
                                Relief="0.5" 
                                Smoothness="0.3" /> 
                        </Ellipse.BitmapEffect> 
                    </Ellipse> 
                    <Ellipse Grid.Row="1" Grid.Column="1" Stretch="Fill" Fill="White" /> 
                    <Ellipse Grid.Row="1" Grid.Column="1" Height="48" Width="48"
                        <Ellipse.Fill> 
                            <ImageBrush ImageSource="pack://application:,,,/images/bronze.jpg" /> 
                        </Ellipse.Fill> 
                        <Ellipse.BitmapEffect> 
                            <BevelBitmapEffect BevelWidth="5" 
                                EdgeProfile="BulgedUp" 
                                Relief="0.5" 
                                Smoothness="0.3" /> 
                        </Ellipse.BitmapEffect> 
                    </Ellipse> 
                </Grid> 
            </ControlTemplate> 

This has compiled and run just fine previously. Not sure what changed to cause the error.


Andrey
Telerik team
 answered on 14 Apr 2010
1 answer
128 views
        I have seen the instruction about Map and know it supports Bing's map.  Now I wanna know if it supports Google's map.  If the answer is YES, how to do it?
Nikolay
Telerik team
 answered on 14 Apr 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
Rating
SplashScreen
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
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?