Telerik Forums
UI for WPF Forum
1 answer
260 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
128 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
140 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
296 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
182 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
121 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
330 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
3 answers
122 views
Hello,

I have serveral gridviews with observable collections as their items sources.  I have a button which does an Excel export on the grids (by getting the item's sources).  I would like the export to match whatever sorting the users applied on the grid.  How can I accomplish this?

Thank you.
Vlad
Telerik team
 answered on 05 Oct 2012
1 answer
158 views
I am trying to build a grid that has both a static, known column and a set of unknown columns that need to be created dynamically. I have read and understand the method of using DynamicObject combined with the auto generate columns from the RadGridView, but in my situation I want the one known column (the "non-dynamic" one) to be editable, and the dynamic columns readonly (non editable).

Please advise...

Thanks!
Mike Gates
Vlad
Telerik team
 answered on 05 Oct 2012
3 answers
245 views
Hai

am using the  wpf rad grid view.

when i select the row in the grid view, i need to display selected row values(each cell value in the selected row) in textbox.

how to do this. can u provide some example to how get the values from selected row?
phuoc tran ngoc
Top achievements
Rank 1
 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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?