Telerik Forums
UI for WPF Forum
1 answer
118 views
Hi,

I am binding my GridView to QueryableDataServiceCollectionView<T> to load data from a WCF Data Service.I wanted to disaplay the grid built-in busy indicator when paging/sorting the grid, so I set DataLoadMode to Asynchronous.Paging works fine and the busy indicator is shown when data is being fetched but sorting stopped working.Clicking on the column header does not trigger anything.

MyEntities db = new  MyEntities(Global.DataServiceUri);
            var query = db.Sims;
            QueryableDataServiceCollectionView<Sim> dataContext = new QueryableDataServiceCollectionView<Sim>(db, query);
            dataContext.PageSize = 20;
            dataContext.AutoLoad = true;
            DataContext = dataContext;

<telerik:RadGridView DataLoadMode="Asynchronous" Name="SimsGridView" ItemsSource="{Binding}"    CanUserFreezeColumns="False" 
                            AutoGenerateColumns="False"  MouseDoubleClick="SimsGridView_MouseDoubleClick">

Environment:
VS 2012
RadControls 2012 Q3
.NET 4.5
WCF 5.0


Thanks

Madani
Dimitrina
Telerik team
 answered on 22 Oct 2012
6 answers
360 views
I am Working on customizing a RadGridview and can't seem to find any way to change the height of the grouping panel. I want to make it a little bit smaller. Is there a way to do this built-in to the control? Or maybe even a work around that anyone has found?
 Here is the code that I have now.

<
telerik:RadGridView Name="ExceptionsListBox" 
                                    IsReadOnly="True"
                                    UseLayoutRounding="False"
                                    EnableRowVirtualization="True"
                                    AutoGenerateColumns="False" 
                                    RowIndicatorVisibility="Collapsed"
                                    Background="#FF202020"
                                    RowHeight="20"
                                      
                                    GroupPanelBackground="#FF202020"
                                    GroupPanelForeground="white" 
                                    telerik:StyleManager.Theme="Expression_Dark">
                   <telerik:RadGridView.Resources>
                       <Style TargetType="telerik:GridViewHeaderRow">
                           <Setter Property="MinHeight" Value="15" />
                       </Style>
                   </telerik:RadGridView.Resources>
                   <telerik:RadGridView.Columns >
                       <telerik:GridViewDataColumn DataMemberBinding="{Binding TruckCode}"
                                                   Header="Truck"/>
                       <telerik:GridViewDataColumn DataMemberBinding="{Binding Content}"
                                                   Header="Content" />
                   </telerik:RadGridView.Columns>
               </telerik:RadGridView>

Thanks for any help.
Matt
Top achievements
Rank 2
 answered on 20 Oct 2012
1 answer
114 views
For say a line chart is it possible to tweak the way the Y-Axis grows?  It appears to grow a certain percent every time the highest bin reaches the top of the chart.  Instead I’d like the highest bin to be 85 or 90% of the Y-Axis height at all times so live-data graph is not so jumpy.  A code snippet would be greatly appreciated!

David
Top achievements
Rank 1
 answered on 19 Oct 2012
3 answers
387 views
I am using both the RadRichTextBox and RadPdfViewer to view and print documents.  I am finding that it takes around 15 seconds to print a 1 page DOCX file from the RadRichTextBox and 12 seconds to print a 1 page PDF file from the RadPdfViewer.  I am using a WinForms program to host WPF UserControls of the RadRichTextBox and RadPdfViewer (in case that matters).  

I have also tested printing from the Demo controls "PDF Viewer - First Look" and the "RichTextBox - Telerik Editor" and I am getting the same results.

Is 12 - 15 seconds the expected time to print from a RadRichTextBox and RadPdfViewer?  If not, do you have any suggestions or tweaks?  I am running a Windows 7 Pro 64-bit computer and I am running the Telerik controls I am using are 2012.2.912.40.

Thanks.
Iva Toteva
Telerik team
 answered on 19 Oct 2012
1 answer
830 views
Hello,
trying to bind a RadNumericUpDown to a integer in a datatemplate:
<DataTemplate DataType="{x:Type datatypes:IntTupleInput}">
<telerik:RadNumericUpDown Value="{Binding Value}"  IsInteger="True" ValueFormat="Numeric" />
</DataTemplate>

My Value proerty is defined this way:

public override object Value
       {
           get
           {
               return GetValue();
           }
           set
           {  
               if (IsLinked)
                   throw new RVExecutorException(this, "Non è possibile impostare il valore di un dato che è collegato ad un altro.");
               else
                   SetValue(value);
                 
               FirePropertyChanged("Value");               
           }
       }

the GetValue returns an Integer while the SetValue try to convert the value into integer.

The problem is that I can't see anything in the NumericUpDown box. When I try to put a value inside, I can see into the debug that it is sending a double value like 1.0 or 2.0 to my property (this is not desired, but by now I can convert and store it as an integer). At the moment that the binding reads my proerty Value, I get an error in the output window saying:

'ObjectSourceConverter' converter failed to convert value '100' (type 'Int32'); fallback value will be used, if available. BindingExpression:Path=Value; DataItem='IntTupleInput' (HashCode=64515557); target element is 'RadNumericUpDown' (Name=''); target property is 'Value' (type 'Nullable`1') NotSupportedException:'System.NotSupportedException: DoubleConverter cannot convert from System.Int32.
   in MS.Internal.Data.DefaultValueConverter.ConvertHelper(Object o, Type destinationType, DependencyObject targetElement, CultureInfo culture, Boolean isForward)
   in MS.Internal.Data.ObjectSourceConverter.Convert(Object o, Type type, Object parameter, CultureInfo culture)

this also happen if I try to bind directy to the Integer property int CurrentValue that stores the value (instead of an "object" Value property)

Could you please clarify this behavior??

Thanks,
Simone
Konstantina
Telerik team
 answered on 19 Oct 2012
9 answers
398 views
Hello,

how can I translate all controls (Application wide) to German for exmaple?
In the following post the use of the Telerik.Windows.Controls.resources.dll is not explained.

http://www.telerik.com/help/wpf/common-localization.html

Thank you for your help!

Manuel
Yoan
Telerik team
 answered on 19 Oct 2012
1 answer
138 views
Is there any way to use the column that displays the week number's to instead be used to select the week they are for?  i was thinking that perhaps a 3 state toggle switch could be used to select/deselect the entire week, with a middle state to show when part of a week has been selected.  

forgive me if this is something very easy (or something very hard) - i'm new to this community and your tools.  Thanks for any help you can provide, please let me know if there is anything else i can do to help clarify.

Matt.
Yana
Telerik team
 answered on 19 Oct 2012
1 answer
173 views
I'm introducing validation in an MVVM style application using the IDataErrorInfo method and I noticed that the RadGridView control has a pretty cool default template defined for the error tooltip whereas the stock WPF controls such as TextBox only provide the red outline by default. Since I have yet to define my own custom control template for assigning to the attached Validation.ErrorTemplate property of my TextBoxes I was curious if there is any simple way that I can reuse the existing template defined in the Telerik WPF control suite.

I'm guessing it would mainly require that I know the style key so can set these properties manually or though an implicit style. Is there any guidance on how one would go about this and with the least amount of hassle? Also please note that I'm technically not running a WPF application as we are embedding WPF UserControls within a WinForms application for the time being and have no App.xaml file that we could use to declare default resources for the entire application. This means any solution will probably have to be repeated for each user control if that affects the technique recommended to reuse this template.
Dimitrina
Telerik team
 answered on 19 Oct 2012
3 answers
1.3K+ views
Hi

I need to add a tab control programmatically.

The item I am adding is a class containing amongst other things the Description to be diaplayed on the tab.

Do you have any examples of this.

Kind Regards

David
Stefan
Telerik team
 answered on 19 Oct 2012
1 answer
230 views
Hi,

I messed around a lot with the Calendar but I can't get it working with DayButtonStyleSelector.

I created a new project, added a StyleSelector class and tried to use it -- SelectStyle is never called.
My XAML:
<Window x:Class="WpfApplication1.MainWindow"
        xmlns:VMs="clr-namespace:WpfApplication1"
        xmlns:calendar="clr-namespace:Telerik.Windows.Controls.Calendar;assembly=Telerik.Windows.Controls.Input"
        Title="MainWindow" Height="350" Width="525" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
    <Grid>
        <Grid.Resources>
            <VMs:MyStyleSelector x:Key="stsWeekend">
                <VMs:MyStyleSelector.SpecialStyle>
                    <Style TargetType="{x:Type calendar:CalendarButton}">
                        <Setter Property="Background">
                            <Setter.Value>
                                <SolidColorBrush Color="Orange" Opacity="0.6"/>
                            </Setter.Value>
                        </Setter>
                    </Style>
                </VMs:MyStyleSelector.SpecialStyle>
            </VMs:MyStyleSelector>
        </Grid.Resources>
 
        <telerik:RadCalendar HorizontalAlignment="Left" Margin="68,96,0,0" Name="radCalendar1" VerticalAlignment="Top" DayButtonStyleSelector="{StaticResource stsWeekend}"/>
    </Grid>
</Window>

My Style selector Class:
namespace WpfApplication1 {
    public class MyStyleSelector : System.Windows.Controls.StyleSelector {
        public override Style SelectStyle(object item, DependencyObject container) {
            CalendarButtonContent content = item as CalendarButtonContent;
            if(content != null) {
                if(content.Date.DayOfWeek == DayOfWeek.Tuesday && content.ButtonType == CalendarButtonType.Date) {
                    return SpecialStyle;
                }
            }
            return base.SelectStyle(item, container);
        }
        public Style SpecialStyle { get; set; }
    }
}

I use 2012.2.1015.40

Manfred
Yana
Telerik team
 answered on 19 Oct 2012
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
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?