Telerik Forums
UI for WPF Forum
2 answers
64 views
I purchased the Ultimate Suite yesterday and my first day using it I cannot add several 2010 Q2 Rad Controls to my WPF form. Trying to add several of the Telerik controls generate the same error.

'/Telerik.Windows.Controls;Component/themes/windows7/BusyIndicator.xaml" value cannot be assigned to property 'Source' of object 'System.Windows.ResourceDictionary'. Type reference cannot find public type named 'RadBusyIndicator'. Error at object 'System.Windows.ResourceDictionary' in markup file 'Telerik.Windows.Controls;component/Themes/GenericWindows7.xaml.'

I get this error trying to add a RadChart, RadButton, RadDropDownButton, RadRadioButton, RadSplitButton, RadToggleButton, and the list goes on and on. For $2000 I was expecting things to work out of the box. Do I need to go to an older version of your product? Please help.

Dan
Valentin.Stoychev
Telerik team
 answered on 23 Jul 2010
3 answers
193 views
Hi ,
I am new to Wpf, EntityFramework and Telerik,
but i am trying to do the following :
I have a generic gridwindow ( telerik grid ) , that doesnt know what data it will display at compile time.
The grid is set to autogenerate the columns once it get a collection of data.

The data is a observable collection of EF Entities.
In the AutoGeneratingColumn event, I intercept each column.
columns of type Collection are skipped over,
columns of type String, Datetime or primitive types are shown.

I would like to replace the single columns to other Entities by n columns for their own primitive values.
So if i have a Entity Customer with a Property Address.
My grid would show by default :
Customer fields with binding path : Name, FirstName etc.
Address fields with binding path : Address.City, Address.Zip etc. all on the same row.

the code :
the Event :
 Telerik.Windows.Controls.GridViewBoundColumnBase c = gvc as Telerik.Windows.Controls.GridViewBoundColumnBase;
     if ((!c.DataType.FullName.StartsWith("Afda.Model.TrackableCollection"))
              &&  (!c.DataType.FullName.StartsWith("Afda.Model.Obj")))
                {
                    foreach (System.Reflection.PropertyInfo pi2 in c.DataType.GetProperties())
                    {
                        if (pi2.PropertyType.BaseType.IsValueType || pi2.PropertyType.FullName.Equals("System.String") || pi2.PropertyType.FullName.Equals("System.DateTime")
                            || pi2.PropertyType.BaseType.FullName.Equals("System.ValueType"))
                        {
                            Telerik.Windows.Controls.GridViewDataColumn newColumn = new Telerik.Windows.Controls.GridViewDataColumn();
                            newColumn.Width = c.ActualWidth;
                            newColumn.DisplayIndex = c.DisplayIndex;
                            String s = c.DataMemberBinding.Path.Path + "." + pi2.Name;
                            newColumn.DataMemberBinding = new Binding(s);
                            newColumn.DataType = pi2.PropertyType;
                            newColumn.DataFormatString = c.DataFormatString;
                            newColumn.TextAlignment = c.TextAlignment;
                            newColumn.Header = s;
                            newColumn.Name = s;
                            newColumn.UniqueName = s;
                            newColumn.Footer = c.Footer;
                            newColumn.IsVisible = true;
                            colsToAdd.Add(newColumn);
                        }
                    }
                    gvc.IsVisible = false;

In the load data method :
 
  try
            {
                DataGrid.ItemsSource = data;
             }
            catch { }

            foreach (Telerik.Windows.Controls.GridViewDataColumn c in colsToAdd) {
                if (!DataGrid.Columns.Contains(c)) {
                    DataGrid.Columns.Add(c);
                }
            }


PS : i also tried doing the add of the new column in the event itsself, but it seemed Icky , and gave a cryptic error.

Any comments ?? it seems to be working most of the time .  ( the embedded Entity isnt always loaded, even if the linq statment is always the same )

No real problems with it atm, so forum prob not the place to post this, but it wasnt working yet, when i started writing :)



Milan
Telerik team
 answered on 22 Jul 2010
2 answers
611 views
I'd like to know a bit more about the DeferRefresh method on the RadGridView. What does it do exactly and how is it used? The documentation states: "Enters a defer cycle that you can use to merge changes to the view and delay automatic refresh" So does it effectively freeze updates from the data source? Do you stop the defer cycle by disposing the object that is returned from DeferRefresh?

Thanks!
Geoff Smith
Top achievements
Rank 1
 answered on 22 Jul 2010
2 answers
131 views
I want to draw a 2D Pie, where the first "pie element" shall start at "12 o'clock" (not at 3 o'clock as default), and the folowing elements adds in clockwise order.

I also need the selected "pie element" to "pop out" when I select it by clicking on the pie, or selecting by code. How do I code this in C#?

I have 2010 Q2
Sia
Telerik team
 answered on 22 Jul 2010
1 answer
77 views
Is there a way to get the timer value used by the spring zoom animation?
I have a dependency property linked to the zoom level and would like to animation between the new zoom level and old level to have the same duration.
Regards
Frederic
Andrey
Telerik team
 answered on 22 Jul 2010
1 answer
99 views
Using the latest WPF RadMap version (Q2 2010), I noticed that smooth zooming has been added (looks very good).
However, there is an unfortunate side effect on panning (it "lags").
Is there a property to control the spring effect on panning (e.g. turn it off)?
The UseSpringAnimations property turns both smooth zooming *and* panning on/off.
Regards
Frederic
Andrey
Telerik team
 answered on 22 Jul 2010
1 answer
90 views

Hi

This is trivial stuff but I can't find an answer in all your resources.

I have a database field containing an integer code e.g. Priority with 0 for High, 1 for Medium and 2 for Low.
The codes mean nothing to the user so I need to translate the code in this column into text. Also, when sorting the column I'd like it to use the underlying code and not the text so the ordered data appears as High-Medium-Low not text sorting which would give High-Low-Medium.

If you can provide some tips on searching your resources for this easy stuff that would be appreciated! A beginners guide maybe

Thanks
RoyS

Pavel Pavlov
Telerik team
 answered on 22 Jul 2010
1 answer
142 views
Hi,

On a page, I have a gridview which shows data which come from a binding to a collection of a class A.

What I want to do is to get the currently showed items on the grid view, transform the items into new items of a class B and bind the new item collection of the class B to a pie chart.

To do that, the only solution I could see was to use a converter.
What I've done compile fine, but when I run the application, the pie chart is empty whereas the grid view contains elements.

Here is the XAML code with the mapping on ItemsSource :

<telerikGrid:RadGridView x:Name="GridView"></telerikGrid:RadGridView>
<telerikChart:RadChart ItemsSource="{Binding ElementName=GridView,Path=Items,Converter={StaticResource Converter}}">
<telerikChart:RadChart.SeriesMappings>
    <telerikCharting:SeriesMapping>
        <telerikCharting:SeriesMapping.SeriesDefinition>
            <telerikCharting:Pie3DSeriesDefinition/>
        </telerikCharting:SeriesMapping.SeriesDefinition>
        <telerikCharting:SeriesMapping.ItemMappings>
            <telerikCharting:ItemMapping DataPointMember="LegendLabel" FieldName="Key" />
            <telerikCharting:ItemMapping DataPointMember="YValue" FieldName="Value" />
        </telerikCharting:SeriesMapping.ItemMappings>
    </telerikCharting:SeriesMapping>
</telerikChart:RadChart.SeriesMappings>
<telerikChart:RadChart.DefaultView>
    <telerikCharting:ChartDefaultView>
        <telerikCharting:ChartDefaultView.ChartArea>
            <telerikCharting:ChartArea LegendName="chartLegend">
            </telerikCharting:ChartArea>
        </telerikCharting:ChartDefaultView.ChartArea>
        <telerikCharting:ChartDefaultView.ChartLegend>
            <telerikCharting:ChartLegend x:Name="chartLegend" UseAutoGeneratedItems="True" />
        </telerikCharting:ChartDefaultView.ChartLegend>
    </telerikCharting:ChartDefaultView>
</telerikChart:RadChart.DefaultView>
</telerikChart:RadChart>

And here is the converter code :

[ValueConversion(typeof(DataItemCollection), typeof(ObservableCollection<KeyValuePair<string, int>>))]
public class Converter : IValueConverter
{
    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
    {
        ObservableCollection<KeyValuePair<string, int>> convertedItems = new ObservableCollection<KeyValuePair<string, int>>();
 
        DataItemCollection dataItemCollection = (DataItemCollection)value;
        if (dataItemCollection.ItemCount > 0)
        {
            // I put here transformed elements in the collection convertedItems.
        }
             
        return convertedItems;
    }
 
    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
    {
        throw new NotImplementedException();
    }
}

In debug mode, when I look at dataItemCollection, it's empty !
So, converter can be use is that case ?
If not, how can I do it ?

Thanks.
Romain
Top achievements
Rank 1
 answered on 22 Jul 2010
3 answers
397 views
Hello,

At the last release i have some problems with cell edit template. If i use my own cell edit template(first code block) the "tab" and "enter" buttons does not make the cell editable. It only focuses on the cell.
But if i don't make an edit template there is no such problem.(second code block)
Also at the cell edit template i need to make double click to go in edit mode. But at default only one click.

P.S : If i use the keyboard up/down arrows to change the value there is no problem. The problem is i can not enter numbers from the keyboad

<telerik:GridViewDataColumn TextAlignment="Right" Header="Fatura Fiyatı" IsReadOnly="False" DataMemberBinding="{Binding IncomingBrutPrice}" DataFormatString="{}{0:F4}">
       <telerik:GridViewDataColumn.CellEditTemplate>
             <DataTemplate>
                  <telerik:RadNumericUpDown Name="NumericBrutPrice" Value="{Binding Path=IncomingBrutPrice, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ValueChanged="NumericBrutPrice_ValueChanged"></telerik:RadNumericUpDown>
              </DataTemplate>
       </telerik:GridViewDataColumn.CellEditTemplate>
</telerik:GridViewDataColumn>


<telerik:GridViewDataColumn IsGroupable="False"  DataMemberBinding="{Binding ItemTotalPrice}" Header="Toplam Fiyat" Width="100" DataFormatString="{}{0:f4}">
</telerik:GridViewDataColumn>
Milan
Telerik team
 answered on 22 Jul 2010
1 answer
93 views
We have recently bought the licence of the Telerik controls and I am trying to use the TreeListView. Is there a way to use a template selector to bind different collection of data?


Thanks
Kiran
Stefan Dobrev
Telerik team
 answered on 22 Jul 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
VirtualKeyboard
HighlightTextBlock
Security
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?