Telerik Forums
UI for WPF Forum
7 answers
549 views
What is the trick for binding Errors to the tooltips of GridViewDataColumns and GridViewComboboxColumns?

This is what I have and it only displays the default red line.

  <UserControl.Resources> 
        <Style TargetType="{x:Type telerik:GridViewColumn}">  
            <Style.Triggers> 
                <Trigger Property="Validation.HasError" Value="true">  
                    <Setter Property="ToolTip" 
                        Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/>  
                </Trigger> 
            </Style.Triggers> 
        </Style> 
    </UserControl.Resources> 

 <telerik:RadGridView Name="wellsRadGridView" AutoGenerateColumns="False" ItemsSource="{Binding GetWells}" 
                             AddingNewDataItem="radGridView_AddingNewDataItem">  
            <telerik:RadGridView.Columns> 
                <telerik:GridViewDataColumn Header="WellID" DataMemberBinding="{Binding ID, ValidatesOnDataErrors=True, UpdateSourceTrigger=LostFocus}"/>  
                <telerik:GridViewDataColumn Header="X Coordinate" DataMemberBinding="{Binding XCoordinates}"  /> 
                <telerik:GridViewDataColumn Header="Y Coordinate" DataMemberBinding="{Binding YCoordinates}"  /> 
                <telerik:GridViewDataColumn Header="Top of Screen Elevation" DataMemberBinding="{Binding TopOfScreen, ValidatesOnDataErrors=True}"  /> 
                <telerik:GridViewDataColumn Header="Bottom of Screen Elevation" DataMemberBinding="{Binding BottomOfScreen, ValidatesOnDataErrors=True}"  /> 
                <telerik:GridViewDataColumn Header="Aquifier/Zone" DataMemberBinding="{Binding Zone}"  /> 
                <telerik:GridViewDataColumn Header="Functional Category" DataMemberBinding="{Binding FunctionalCategory}"  /> 
                <telerik:GridViewComboBoxColumn Header="Current Sampling Frequency" 
                                                DisplayMemberPath="Name"   
                                                SelectedValueMemberPath="ID" 
                                                DataMemberBinding="{Binding Frequency}" 
                                                ItemsSource="{Binding FrequencyCategories}"/>  
                <telerik:GridViewComboBoxColumn Header="Risk to Receptors"   
                                                DisplayMemberPath="Name" 
                                                SelectedValueMemberPath="ID" 
                                                DataMemberBinding="{Binding RiskReceptors}" 
                                                ItemsSource="{Binding RiskReceptors}" /> 
                <telerik:GridViewComboBoxColumn Header="Predictability of COC Concentrations"   
                                                DisplayMemberPath="Name" 
                                                SelectedValueMemberPath="ID" 
                                                DataMemberBinding="{Binding Predictability}"    
                                                ItemsSource="{Binding Predictability}" /> 
                <telerik:GridViewDataColumn Header="Notes" DataMemberBinding="{Binding Notes}"  /> 
            </telerik:RadGridView.Columns> 
        </telerik:RadGridView> 


thanks in advance.
Gene.
Nedyalko Nikolov
Telerik team
 answered on 11 Nov 2010
4 answers
196 views
I have the need to lock a grouped column... in other words, to not allow the user to close (un-group) the selected column.  Is this possible?

Take for instance grouping by the demo column "Title".  I do not want to also then display the "Title" column seeing that it is now shown in the group.  However, if you hid the "Title" column, and then programmatically group by that column... and then if the user closes that group - Oops! No "Title" column shown to re-group by later.

Thanks!
Vanya Pavlova
Telerik team
 answered on 11 Nov 2010
3 answers
73 views
I'm using the Windows 7 Theme for my WPF controls with the following code:

public Shell() {
  InitializeComponent();
 
  Telerik.Windows.Controls.StyleManager.ApplicationTheme = new Telerik.Windows.Controls.Windows7Theme();
}

The controls use the theme as expected at runtime.  However, when viewing the controls at design-time in Expression or Visual Studio they show up with the default (Office Black?) theme.  How do I select WIndows 7 (or any other theme) at design time?

Cheers,
Mike
Vanya Pavlova
Telerik team
 answered on 11 Nov 2010
4 answers
345 views
Hi..
How can I programmatically create a TreeView with several nodes as Hyperlinks that can be clicked?
Say I want to have the Mac Node as hyperlink and nav to  a URL.
thx

Fruit
    Apples
         -  Mac
         -  etc...
    Oranges
         - 
Jon
Top achievements
Rank 1
 answered on 11 Nov 2010
2 answers
80 views
Hello,

I have a trouble whith the color of the numericindicator in my application namely altough the foreground  is setted to blue and it is the same color like scale, color of th numericindicator darker.

Could please check code below and screenshot.

Thnx

Daniel
<telerik:IndicatorList>
                            <telerik:Needle x:Name="needleRPM"
                                 Value="{Binding Path=RPM}"
                                 Style="{DynamicResource NeedleStyle1}"                                 
                                 >
                                <telerik:Needle.ArrowBackground>
                                    <LinearGradientBrush EndPoint="0,0.5" StartPoint="1,0.5" MappingMode="RelativeToBoundingBox">
                                        <GradientStop Color="#FFFFD25A" Offset="0.6"/>
                                        <GradientStop Color="#FFFF2222" Offset="1"/>
                                        <GradientStop Color="#FFFFD25A"/>
                                        <GradientStop Color="Red" Offset="0.323"/>
                                    </LinearGradientBrush>
                                </telerik:Needle.ArrowBackground>
                            </telerik:Needle>
                            <telerik:NumericIndicator x:Name="Speed"
                                Panel.ZIndex="-1000"                          
                                CornerRadius="10"
                                Top="0.17"
                                Left="0.33"
                                RelativeHeight="0.35"
                                RelativeWidth="0.7"
                                TemplatePrefix="HexagonalSevenSegs"
                                Foreground="{Binding BigGaugeScaleColor}"
                                Background="{x:Null}"                             
                                Format="{}{0:F0}"
                                Value="{Binding Path=Speed}"                               
                                >
                                <telerik:NumberPosition CornerRadius="25" Margin="1,3,0,3" Background="{x:Null}"/>
                                <telerik:NumberPosition CornerRadius="25" Margin="1,3" Background="{x:Null}"/>
                                <telerik:NumberPosition CornerRadius="25" Margin="1,3,0,3" Background="{x:Null}"/>
                            </telerik:NumericIndicator>
                            <telerik:RadialBar x:Name="radialBar"
                                UseRangeColor="True"
                                RangeColorMode="Default"
                                Value="0" VerticalAlignment="Top"
                            />                          
                        </telerik:IndicatorList>
Daniel Ruehle
Top achievements
Rank 1
 answered on 11 Nov 2010
9 answers
220 views
Hi,

I'm using the RadTreeView in a MVVM scenario.
Depending on the model's IsSelectable property the corresponding item should be either selectable by the user or not.
Since this doesn't seem to be supported by the RadTreeViewItem container itself (which would be a nice new feature ;)),
the only way I found in this case is to listen on the container's PreviewSelected event and setting the "e.Handled" value to "true" if the item shouldn't be selectable.
So it looks like:

void RadTreeView_PreviewSelected(object sender, RadRoutedEventArgs e)
{
  var item = e.GetItem<IMyModel>(); // extension helper method
 
  // check item that will be selected   
  if (item != null && !item.IsSelectable)
    e.Handled = true;


But this results in a major drawback:
Upon canceling selection of the new item 'X', i'm loosing the currently selected item.
Afterwards the item 'X' has the focus rectangle and the selected item is null.
So the question is:
Is there a possiblity to cancel the selection of a new item without loosing the previous selection ?

It tried to hook the PreviewSelected, PreviewUnselected, Unselected, Selected events.
But even if set an additional flag on "PreviewSelected" which indicates that I want to revert/ignore the next unselection, I'm out of luck.
- PreviewUnselected is called before PreviewSelected => I can't determine whether to cancel or not since i don't know the future ;)
- Unselected gets actually called directly after PreviewSelected, but the RadTreeView's SelectedItem is still unchanged.
  Setting the "e.Handled" value to "true" won't change anything.
 
The second question would be:
Upon the "Unselected"-Event shouldn't the treeview's currently selected item be either the next selected item or null ?

Thanks in advance

Thorsten Klingert

Hristo
Telerik team
 answered on 11 Nov 2010
5 answers
152 views
Hi,

I've just recently started using the Telerik tools and I'm rapidly becoming a fan.

I have one feature request though;

I have a chart which can be seen in the attached file, currentgraph.png. As you can see, I'm using the Marked Zones feature - which is great - but what I would really like to see, is the option of doing what I've done in the other attached file, newgraph.png (made in Paint, but I'm sure you get the idea).

This way, I don't have to stare at the ugly red block of background all the time, and when something red appears on my chart, I know it needs my attention.

Is there a feature that I don't know or is there any hope of seeing this feature in a future release?
Yavor
Telerik team
 answered on 11 Nov 2010
6 answers
178 views
hi
how can i Get Value of Cell from Selected Item in RadGridView .
davood ramezani
Top achievements
Rank 1
 answered on 11 Nov 2010
3 answers
291 views
I have an ObservableCollection of POI's that I bind to an InformationLayer. The results are that I get a bunch of silver balloons with a red dot in the middle. How can I control the color inside the balloon? This would be great to color code my balloon by priority. Also, how can I get a tooltip to display stuff like the address, misc text, etc?

poiInformationLayer.DataMappings.Add(new DataMapping("Location", DataMember.Location));
              
            //Bind POI collection to the poi layer.
            Binding binding = new Binding();
            binding.Source = poiCollection;
            this.poiInformationLayer.SetBinding(ItemsControl.ItemsSourceProperty, binding);

public class PointOfInterest
    {
        private Location _location;
        private ZoomRange _zoomRange;
        private double _baseZoomLevel;
        private string _title;
        private string _imageUri;
        private string _description;
  
        public Location Location
        {
            get
            {
                return _location;
            }
            set
            {
                _location = value;
            }
        }
  
        public ZoomRange ZoomRange
        {
            get
            {
                return _zoomRange;
            }
            set
            {
                _zoomRange = value;
            }
        }
  
        public double BaseZoomLevel
        {
            get
            {
                return _baseZoomLevel;
            }
            set
            {
                _baseZoomLevel = value;
            }
        }
  
        public string Title
        {
            get
            {
                return _title;
            }
            set
            {
                _title = value;
            }
        }
  
        public string ImageUri
        {
            get
            {
                return _imageUri;
            }
            set
            {
                _imageUri = value;
            }
        }
  
        public string Description
        {
            get
            {
                return _description;
            }
            set
            {
                _description = value;
            }
        }
  
    }
  
    public class POICollection : ObservableCollection<PointOfInterest>
    {
        public POICollection()
        {
        }
    }
Rod Yager
Top achievements
Rank 1
 answered on 10 Nov 2010
1 answer
178 views
I'm trying to use the Tab key to navigate between items in an OutlookBar. I've noticed that Ctrl-Tab works, but Tab by itself doesn't. The Silverlight version of the OutlookBar does navigate between controls using only the Tab key.
Is there something that I'm missing to get this working the same way on both WPF and Silverlight, with just the Tab key?

Here's some XAML that's similar to the layout that I'm trying to create:
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition Width="2*" />
        </Grid.ColumnDefinitions>
        <telerik:RadOutlookBar>
            <telerik:RadOutlookBarItem>
                <StackPanel>
                    <TextBox>Try to</TextBox>
                    <TextBox>tab</TextBox>
                    <TextBox>between</TextBox>
                    <TextBox>us</TextBox>
                </StackPanel>
            </telerik:RadOutlookBarItem>
        </telerik:RadOutlookBar>
        <StackPanel Grid.Column="2">
            <TextBox></TextBox>
            <TextBox></TextBox>
            <TextBox></TextBox>
            <TextBox></TextBox>
        </StackPanel>
    </Grid>
Petar Mladenov
Telerik team
 answered on 10 Nov 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
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
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
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?