Telerik Forums
UI for WPF Forum
3 answers
143 views
Maybe a simple question, how do I get a column name from a QueryableCollectionView?
Best regards
Vlad
Telerik team
 answered on 08 Oct 2012
2 answers
233 views
Hi,

I try to change the grid's default office_black theme's orange/yellow shades to blue shades but I'm pretty stuck, specially with the column header and scrollbar. I tried following the description from  article but no chance... Could you please help me out with an example (using latest version and blend4)?

Thank you,
joe
phuoc tran ngoc
Top achievements
Rank 1
 answered on 07 Oct 2012
4 answers
96 views
I've got 2 controls on a page, one for a request date and another for the date of birth of a client.  Both of these values come from a SQL Server database.  During the Page_Loaded event I had been trying to calculate the age of the client on the request date, however that's not working.  For some reason, which I don't understand, the date of birth of the client is wrong (it turns out to be today's date), during the Page_Loaded event.  However, once the page is actually displayed, it is correct.  I had thought Page_Loaded would have been the correct event to put this code, but that doesn't seem to be the case.
 
So, where should I put the age calculation code?  In what event?

The XAML for the first control is:
<telerik:RadMaskedDateTimeInput Name="radReqDate" MinWidth="80" TabIndex="0" FontWeight="Bold"
                               Value="{Binding RequestDate}" InputBehavior="Replace" TextMode="PlainText"
                               SelectionOnFocus="SelectAll" ValueChanged="radReqDate_ValueChanged" />

and the XAML for the second control is here:
<telerik:RadMaskedDateTimeInput Name="radDOB" EmptyContent="Enter DOB" MinWidth="80" TabIndex="14"
                               FontWeight="Bold" InputBehavior="Replace" TextMode="PlainText"
                               Value="{Binding Path=DateOfBirth, Mode=TwoWay}" ValueChanged="radDOB_ValueChanged" />

Rod
Top achievements
Rank 1
 answered on 05 Oct 2012
1 answer
248 views
What is the proper way to use a template selector for RadGridView? Templates are currently not being selected and my SelectTemplate method in DetailsTemplateSelector is not being called. I'm using this currently:

<telerik:RadGridView.RowDetailsTemplate>
                <DataTemplate>
                    <ItemsControl
                           ItemTemplateSelector="{StaticResource detailsTemplateSelector}"
                           />
                </DataTemplate>
            </telerik:RadGridView.RowDetailsTemplate>

Resources:

<Window.Resources>
        <DataTemplate x:Key="theBasicView">
            <controls:InfoDetailsControl InfoDetail="{Binding InfoDetails}" />
        </DataTemplate>


        <DataTemplate x:Key="theTableView">
            <telerik:RadGridView ItemsSource="{Binding DetailsTable}"
                                         ShowGroupPanel="False"
                                         AutoGenerateColumns="True"
                                         ColumnBackground="Beige"
                                         RowIndicatorVisibility="Hidden"
                                         AlternationCount="2"
                                         />
        </DataTemplate>


        <analysis:DetailsTemplateSelector 
            BasicView="{StaticResource theBasicView}"
            TableView="{StaticResource theTableView}"
            x:Key="detailsTemplateSelector"
            />
    </Window.Resources>

Code behind:

public class DetailsTemplateSelector : DataTemplateSelector
    {
        public DataTemplate BasicView { get; set; }
        public DataTemplate TableView { get; set; }


        public override DataTemplate SelectTemplate(object item, DependencyObject container) {
            FrameworkElement element = container as FrameworkElement;
            if (element != null && item != null && item is ViewableRuleResult)
            {
                ViewableRuleResult ruleResult = item as ViewableRuleResult;
                Window window = Application.Current.MainWindow;


                if (ruleResult.DetailsTable == null)
                {
                    return BasicView;
                }
                else
                {
                    return TableView;
                }             
            }
            return null;
        }
    }
Tory
Top achievements
Rank 1
 answered on 05 Oct 2012
1 answer
117 views
Hi,

acually in my application, we use the OfficeBlue theme. In our application we have many RadExpanders and with this theme, all RadExpanders are all white. I want to know how I can change the style of the RadExpander to reflect the style of the RadButton (gradient, etc...)

Thank's
Tina Stancheva
Telerik team
 answered on 05 Oct 2012
1 answer
133 views
Hi,

with the PersistenceFramework, I would like to know if it's possible to persist only the layou of my control, not the dat inside of it?

Thank's
Tina Stancheva
Telerik team
 answered on 05 Oct 2012
5 answers
271 views
I'm trying to make built-in filtering work with a comboboxcolumn.
My GridView is bound to an ObservableCollection of Racer entities.
Each Racer entity has a BikeID property (of type Guid) and a Bike navigation property (of type Bike).
My ViewModel has a class BikeService which has an Items Collection of ComboItemViewModel,
which in turn has "ID" and "Description" public properties.
The following code seems to be working, except for the distinct values part of the filtering control.
Basically, I get an exception for each distinct value because the filtering control is trying to parse
them as Guid, even if I instructed the GridView to filter on Bike.Description, which is a string.

Exception text:
System.Windows.Data Error: 17 : Cannot get 'ConvertedValue' value (type 'Object') from ''
(type 'DistinctValueViewModel'). BindingExpression:Path=ConvertedValue; DataItem='DistinctValueViewModel'
(HashCode=52842714); target element is 'CheckBox' (Name=''); target property is 'Content' (type 'Object')
TargetInvocationException:'System.Reflection.TargetInvocationException:
Eccezione generata dalla destinazione di una chiamata. --->
System.FormatException: Il GUID deve contenere 32 cifre, separate da quattro trattini (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

<
telerik:GridViewComboBoxColumn
                Header="Bike"
                DataMemberBinding="{Binding BikeID}"
                SortMemberPath="Bike.Description"
                FilterMemberPath="Bike.Description"
                      FilterMemberType="{x:Type sys:String}"
                ItemsSource="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}, Path=DataContext.BikeService.Items}"
                SelectedValueMemberPath="ID"
                DisplayMemberPath="Description" />

I suspect this is a bug, or maybe this is not supported by the current version of GridView.

Thanks in advance,
Samuele Ruggieri
Rossen Hristov
Telerik team
 answered on 05 Oct 2012
3 answers
167 views
hello i have a multipage tif file and i am looking for a solution to
show the tif-image and also have the possibility to turn over all
included pages. Is this possible?
Steve
Telerik team
 answered on 05 Oct 2012
2 answers
112 views
Hi!

I can't get the time markers to work with the customized editor. I followed your example.
When I debug the code (debugging into the RadScheduleView), the timemarker collection on the editor is null.
I have set the TimeMarkersSource property on the schedule view convtrol.
Lennart Bauer
Top achievements
Rank 1
 answered on 05 Oct 2012
3 answers
312 views
hello, how can i get the item offset position. I want to search a item with getitembypath and
scroll the item to the middel of the treeview with the vertical offset function. How can i do this?
thank you ...
Petar Mladenov
Telerik team
 answered on 05 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?