Telerik Forums
UI for WPF Forum
2 answers
263 views
I have the following DataTemplate:
<DataTemplate x:Name="DatePickerCellTemplate" x:Key="DatePickerCellTemplate"
            <telerik:RadDatePicker SelectedDate="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:GridViewCell}},Path=Value, Mode=TwoWay}" /> 
        </DataTemplate> 
that I set to a CellTemplate of a GridViewDataColumn dynamically. I  also have the DataMemberBinding of the column set to a property ( MyDate) of some object. The MyDate property binding (TwoWay) is done at runtime in the code behind. 

I am able to get the value of MyDate appear in the RadDatePicker. But it is not working the other way round, i.e. the changes are propogated back to the MyDate property.

Am i missing something ?

Tsvyatko
Telerik team
 answered on 26 Apr 2010
1 answer
198 views
Hi,

I need to show the aggregated functions results from the footer outside of the RadGridView (binded to a TextBlock, let's say).
So, if I have:

<

 

 

telerikControls:RadGridView Name="MyGrid" CanUserFreezeColumns="False" ....

 

 

with a column like this:

<

 

 

telerikControls:GridViewDataColumn Header="MyColumn" IsFilterable="False"

 

 

        DataMemberBinding="{Binding MyProperty}">

 

    <telerikControls:GridViewDataColumn.AggregateFunctions>

 

        <telerikData:CountFunction Caption="Count: " />

 

    </telerikControls:GridViewDataColumn.AggregateFunctions>

 

</telerikControls:GridViewDataColumn> ...

 

 

and somewhere in the UI, a textblock like this:

<

 

 

TextBlock Name="MyTextBlock" Text="{Binding ElementName=MyGrid, Path=???CountResultFromFooter???}" />

 

 

How can I bind to MyTextBlock the result of the count aggregate function from MyColumn column?

Thanks!

 
Vlad
Telerik team
 answered on 26 Apr 2010
5 answers
527 views

I am using Telerik RadGridView in my project. I want to show image in column.

                GridViewImageColumn col1 = new GridViewImageColumn();
                col1.Width = 100;
                col1.DataMemberBinding = new Binding("id");
                col1.Header = "PhotoByConverter";
                col1.DataMemberBinding.Converter = new ThumbnailConverter();
                grid.Columns.Add(col1);
                GridViewDataColumn col2 = new GridViewDataColumn();
                col2.Width = 100;
                col2.DataMemberBinding = new Binding("firstName");
                col2.Header = "Person name";
               
                grid.Columns.Add(col2);
                Grid.ItemsSource=DataTable; 
First column not wokrs but second works fine. I use Converter for image shown below

    public class ThumbnailConverter : IValueConverter
    {
    public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
    {
                    IEnumerable<thumbNail> result = from n in thumbnails
                                        where n.personID == value.ToString()
                                        select n;
        if (result != null && result.First().thumbnail != null)
        {
            return result.First().thumbnail.file;
        }
        else
        {
            return null;
        }
    }
    public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
    {
        throw new Exception("The method or operation is not implemented.");
    }
   } 

I found by id thumbnail of person and set it like data for GridViewImageColumn. I checked with Debuger conveter works properly. I can't undesrtand why it doesn't work. Any ideas?

I use 2009 Q3 version.

My converter returns byte[] type

Imran Aliyev
Top achievements
Rank 1
 answered on 26 Apr 2010
1 answer
116 views
Hi,

I have recently been working with the RadMaskedTextBox control and noticed it has a cool IsSpinEnabled property to enable the mouse wheel to scroll up/down the date value.

I immediatly went to enable it in the DatePicker controls I am using, but it doesn't exist. Is it named something different in the DatePicker's?
There doesn't appear to be any DatePicker documentation either for WPF or Silverlight (at least in the online version), so I couldn't check myself.


Thanks,

A Marshall
Kaloyan
Telerik team
 answered on 26 Apr 2010
3 answers
100 views
On inheriting from "RadGridView" and overriding the "OnApplyTemplate" the only the first column is rendered.
namespace WpfApplication7 
    public class  MyGrid : RadGridView 
    { 
        public override void OnApplyTemplate() 
        { 
            //Custom Code. 
        } 
    } 
 

<Window x:Class="WpfApplication7.Window1" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:gridView="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" 
    xmlns:local="clr-namespace:WpfApplication7" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Title="Window1" Height="300" Width="300"
    <Grid> 
        <local:MyGrid> 
            <gridView:RadGridView.Columns> 
                <gridView:GridViewColumn Header="Column1"/> 
                <gridView:GridViewColumn Header="Column2"/> 
                <gridView:GridViewColumn Header="Column3"/> 
                <gridView:GridViewColumn Header="Column4"/> 
            </gridView:RadGridView.Columns> 
        </local:MyGrid> 
    </Grid> 
</Window> 
 

Am I doing something wrong


Vlad
Telerik team
 answered on 26 Apr 2010
3 answers
178 views
Hi,

I want to programmatically bind the xml document to RadGridView. I have xmldataprovider and I am programmatically setting the provider.document=xmldocument and the provider is the static resource of the grid.

This is not working.

Please let me know.

Thanks..
Vlad
Telerik team
 answered on 26 Apr 2010
1 answer
65 views
Hello all,

    Now that the "Telerik.Windows.Data.TableDefinition.FieldDescriptors" property is slated for destruction, what is replacing it?  I need to be able to specify colunms to my GridView control and have control over thier individual settings. 

- Rashad Rivera
Vlad
Telerik team
 answered on 26 Apr 2010
1 answer
156 views
hi,

I have a generic collection implementing INotifyCollectionChanged with an Add method as the following:

public void Add(TEntityType item)  
        {  
            if (Criteria(item))  
            {  
                InnerList.Add(item);  
                CollectionChanged(InnerList, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, item));  
                if (SelectAddedItem) CurrentItem = item;  
            }  
        } 

and it works fine with framework's ListView and DataGrid components with a binding to its ItemsSource property.

But RadGridView does not updates itself with "NotifyCollectionChangedAction.Add" but it works fine with "NotifyCollectionChangedAction.Reset". Am I doing something wrong ?
Vlad
Telerik team
 answered on 26 Apr 2010
1 answer
80 views
Hello All,

    I want to change that gray collor *behind* the tabs themselves to lets say Transparent.  I'm not taking about the color behind the content or the background color inside the tab.  I'm talking about the color behind the tab collection themselves.  How do I do that?

    In addition, how do I change the background color of the *non-active* tabs from that off-white color? 

- Rashad Rivera
  www.omegusprime.com
Dan Martin
Top achievements
Rank 1
 answered on 25 Apr 2010
2 answers
169 views
Dear Telerik,

Thank you for the export option, but I have two questions:

1. When exporting to png/bmp, the background is not exported,
    instead, a 32bit BMP, or a transparent PNG is created.

    Is there a solution for this problem?

2. We can enter a dpi in the export option, but my problem is sometimes
    the user interface is very small, and so is the chart,
    Would be great if we can supply a Width/Height of the exported chart.

With regards,
Rob
Rob Peters
Top achievements
Rank 1
 answered on 24 Apr 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?