Telerik Forums
UI for WPF Forum
1 answer
70 views
Is it possible to draw in the charting area? For example, I would like to draw a red line, perhaps, through the chart at the Y-Value of 60 (assuming this chart has one Y-Axis). Or perhaps I would like to shade the area above the Y-Value of 100 red. I know I can do the shading by setting the background brush, but its critical to know where the Y-Value of 60 or 100 is in these examples. Is this possible with RadChart?
Velin
Telerik team
 answered on 09 Jun 2010
1 answer
140 views
Hi,

I am binding the following list of dataseries to a RadChart ItemsSource to get dynamic updates:
           var chartSeries = new RadHierarchicalObservableCollection<ObservableCollection<AnalogDataPoint>>(); 
 
Because this supports the INotifyCollectionChanged event, the RadChart attaches to this event.

However, if I later close my window and set ItemsSource to null, the event handler is not removed. Therefore, the whole RadChart is still connected to the data and is not collected. (Actually, the whole view is retained because the RadChart keeps references to its parent...).

Please correct this to remove any event handler when the item source changes.

Kind regards
Dr. Hartmut Kocher
Velin
Telerik team
 answered on 09 Jun 2010
1 answer
214 views
Hi All

I have tried all manor of solutions to this problem.

Basically I have an attributes table which contains a type. this type is bound to a GridViewComboBoxColumn. when the selection in this column is changed, it needs to set the isvisible value of other columns in the same grid row.

So, in the usual way, I have created a converter such as this:
public class AttributeIntTypeToEnabledConverter : IValueConverter 
    { 
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 
        { 
            if (value != null
            { 
                int count = (int)value; 
                if (count == 1) 
                    return true
                else 
                    return false
            } 
            else 
            { 
                return false
            } 
        } 
        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 
        { 
            return null
        } 
    } 

in the xaml, the converter is called like this:
<telerikGridView:GridViewDataColumn x:Name="gridAttributes_attrValInt" Header="Value"  
                                                                        DataMemberBinding="{Binding attribute_id}"  
                                                                        IsVisible="{Binding attribute_id, Converter={StaticResource AttributeIntTypeToEnabledConverter}}"

The value for the cell is updated when the attribute_id is changed, but the visibility converter is never called.


the second option that I have tried is to use the GridViewdataColumn element, such as this:
IsVisible="{Binding ElementName=gridAttributes_AttributeType1, Path=SelectedValue, Converter={StaticResource AttributeIntTypeToEnabledConverter}}" 

gridAttributes_attributeType1 is the name of the GridViewComboBoxColumn.

This also does not call the converter as I suspect that the path SelectedValue does not exist in a GridViewComboBoxColumn.

The solution does call the converter however, if I bind it to a combo outside of the gridview..

Is there any solution to this problem.

Regards

Nick
Maya
Telerik team
 answered on 09 Jun 2010
7 answers
197 views
Hi,
i want to use checkboxes in several columns and therefore my code - for 1 gridview column - looks like this:
____________________________________________________________________

<telerik:GridViewDataColumn x:Name="colResultNT" Header="Result NT" IsReadOnly="True" IsEnabled="False" DataMemberBinding="{Binding ResultNt}">
                                </telerik:GridViewDataColumn>
                                <telerik:GridViewDataColumn x:Name="colReview" Header="Review Needed?" DataMemberBinding="{Binding IsReviewNeeded}">
                                    <telerik:GridViewDataColumn.CellStyle>
                                        <Style TargetType="GridView:GridViewCell">
                                            <Setter Property="Template">
                                                <Setter.Value>
                                                    <ControlTemplate TargetType="GridView:GridViewCell">
                                                        <CheckBox Margin="5,0,0,0"
                                                                HorizontalAlignment="Left"
                                                                VerticalAlignment="Center"
                                                                IsChecked="{Binding IsReviewNeeded, Mode=TwoWay}" />
                                                    </ControlTemplate>
                                                </Setter.Value>
                                            </Setter>
                                        </Style>
                                    </telerik:GridViewDataColumn.CellStyle>                                    
                                </telerik:GridViewDataColumn>  
____________________________________________________________________
This code works fine, but actually the vertical grid line on the right sight disappered (see attached screenshot). Any ideas why? How can i get it back?
Thx in advance
                            
                              
Maya
Telerik team
 answered on 09 Jun 2010
3 answers
125 views

Hello,

I have a difficulty about binding a list of type Binding<T> list to Grid. The binding is working fine, but grouping is not working on the side of XAML.

<Telerik:RadGridView.GroupDescriptors> 
                <data:GroupDescriptor Member="CodeOrganizationType">  
                    <data:GroupDescriptor.AggregateFunctions> 
                        <data:CountFunction Caption="Count:" /> 
                    </data:GroupDescriptor.AggregateFunctions> 
                </data:GroupDescriptor> 
            </Telerik:RadGridView.GroupDescriptors> 

grouping via code works fine, XAML is not working.

Am I doing something wrong ?

Telerik Version : 2010.1.0422.35
VS2010, .NET 3.5 & 4.0

Please help...
Tsvyatko
Telerik team
 answered on 09 Jun 2010
1 answer
142 views
I'm thinking of a hybrid control that would allow the user to select a year, a month in a year a date, or collection of dates.

My scenario is that we have an application that sits on top of an Analysis Services Cube.  In that cube we have a date dimension and you can use that dimension to slice data by year or month or date or set of dates.

My current implementation involves a TreeView - where the user selects year or month and then uses the calendar to select a date (screenshot).  This allows then to select the Year by selecting that TreeNode, the month, or a specific date in the month.

However, I don't really love this implementation.  I like the contextual representation and ease of mouse gesture movement in the RadCalendar control.  Particularly, drilling up and down to through the views (Decade View, Year View).  I have this nagging feeling that I could customize the control in some way so that I could get it to work for my uses instead.  For example in the Year View, instead of clicking the month drilling down to the Month View - change it so clicking the Month selects the month instead - and instead change the drilldown to be attached to a linkbutton on the month text abbreviation (screenshot).

Would something like that be possible?

If so, I'm not sure how to go about doing that.  I tried loading up Expression Blend 3 and dragging the RadControl into it, thinking it's got to be somewhere in the template/style area that I do this but I get an error 'Cannot locate resource 'themes/genericvista.xaml'' (screenshot).  Admittedly by Blend experience is terrible but I'd like to work on that.

Am I on the right track?
Kaloyan
Telerik team
 answered on 09 Jun 2010
1 answer
117 views
I just downloaded and installed the latest WPF trial version. The demo solution file appears to be in VS 2010 format. Is there and where can I download the VS 2008 Solution file for the latest demo?

Boyan
Telerik team
 answered on 09 Jun 2010
1 answer
110 views
Good morning,
 I would like to use the transition control to avoid building a storyboard.

My Code is :

private

 

 

void btnDisplay_Click(object sender, RoutedEventArgs e)

 

{

 

 

try

 

{

 

 

for (int i = 1; i < 9; i++)

 

{

 

 

Image myImg = new Image();

 

myImg.Source =

 

new BitmapImage(new Uri("C:\\00002512\\00000000" + i.ToString() + ".TIF", UriKind.Absolute));

 

 

 

this.TransitionControl1.Content = myImg;

 

 

 

this.radProgressBar1.Value = i;

 

 

}

}

 

 

catch (Exception ex)

 

{

 

 

MessageBox.Show(ex.Message);

 

}

}

I get this error : "Cannot perform action because the specified Storyboard was not applied to this object for interactive control." when I try to load the second image.

Can you help me?

thanks in advance
   Max

Miroslav Nedyalkov
Telerik team
 answered on 09 Jun 2010
1 answer
127 views
Hi,

I'm trying to have custom TabItems in a RadGroupPane in DocumentsHost. As I'm understand RadGroupPane items are rendered using TabItemPresenter (looked at RadGroupPane template) and are RadTabItem controls. Problem is that I can not get them to style.
A litle sample or idea how to set custom template for TabItem's in a RadGroupPane would be really good, as setting it in RadGroupPane resources as style with TargetType for RadTabItem seems don't work.

Thanks,
Saulius
Pana
Telerik team
 answered on 09 Jun 2010
8 answers
938 views
Hello,

I have a RadGridView with a custom row style targeting GridViewRow (set using RowStyle property and defined in resource dictionary).
In that style I have a control template targeting GridViewRow.
In that template I have a couple of GridViewCells definitions.
Here is one of them, for example:

<telerik:GridViewCell x:Name="theCell"  
                                        BorderThickness="0" 
                                        Foreground="{StaticResource ColorMessageText}" 
                                        Value="{Binding Owner}" 
                                        Margin="0,0,0,2" 
                                        Content="Owner" 
                                        Background="{x:Null}" 
                                        BorderBrush="{x:Null}" 
                                        FontSize="11"                                    
                                        HorizontalAlignment="Left" 
                                        HorizontalContentAlignment="Left" 
                                        Width="90" 
                                        Visibility="{Binding Column.IsVisible, Converter={StaticResource VisibilityOfBool}, ElementName=theCell}"/> 


Now, what I am trying to accomplish is to bind the Visibility property to the column IsVisible property (using the required converter).
The problem is that both Column and DataColumn properties of the GridViewCell are unknown at run time (saw it using Snoop).

How do I make my GridViewCell hide when the matching column is hidden?

Thanks,
Gili
Gili Korman Golander
Top achievements
Rank 1
 answered on 09 Jun 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?