Telerik Forums
UI for WPF Forum
4 answers
650 views
Hello,

I believe I've run into another breaking change with the Q1 2009 version of the grid.  In my app I have some functionality where the user can define some of the properties of a grid, one of them being the column widths.  When the user is looking at some data in the grid and they resize a column I need to update by business object so that I can display the grid with the same widths the next time.

In the previous version I accomplished this by having a two way binding between the Width property of a grid column and a width property on my business object (using a converter to translate back and forth between a numeric value and a GridLength).  This worked perfectly as every time the user changed a column width my object was updated. 

In the Q109 version, resizing a column doesn't seem to update the column width anymore so my object never gets updated.  The only time the width gets updated is when you double click in the header to make the column fit the contents.  This also has the unfortunate side effect of setting the column with to Auto and the value to 1, which is not desired.  I would expect that the column would be resized, but the mode stay in Pixel mode like it used to.

Is there any way to get the grid to behave like it used to?  If not, can someone please suggest a way for me to know when a column gets resized and then get the actual width of the column?  I had a similar post a while back but that method doesn't seem to work anymore either.

Thanks,

Joel
Yavor Georgiev
Telerik team
 answered on 10 Jun 2010
10 answers
664 views
As we know, The treeview control enables check boxes for all nodes. Is it possible to show the check boxes for sepecific nodes? For example, I want to use a treeview control to list all files in Drive C with forders, only the file node has a check box, but the root and folder nodes do not have checkboxes shown.

Thank you very much.
Tina Stancheva
Telerik team
 answered on 10 Jun 2010
1 answer
414 views
Is it possible to have my groups which I have defined with a Group Descriptor in the grid view mark-up automatically expanded when the grid view is loaded?
Yavor Georgiev
Telerik team
 answered on 10 Jun 2010
2 answers
104 views
How can I change the mouseover of the contextmenu when I add a checkbox? I can easily change radmenuitems but haven't found a way yet to change the checkbox' team. I did check in the contextmenu itself for teams but nothing exists there whatsoever about mouseover themes.
Pana
Telerik team
 answered on 10 Jun 2010
1 answer
80 views
By Default we need to hit Insert Key to add a new record to RadGridView. how can i change this behavior to Default WPF Grid i.e. just upon hitting tab on last record a new record will be inserted.
Nedyalko Nikolov
Telerik team
 answered on 09 Jun 2010
1 answer
68 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
136 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
201 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
193 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
120 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?