Telerik Forums
UI for WPF Forum
12 answers
490 views
Hello

A few days ago I had the problem, that I was binding a GridViewDataColumn to a Property that does not necessary exist on the type of the associated DataContext but in subclasses it does. Here a little overview of my support ticket post:

I'm trying to replace my DataGrid with a RadGridView from Telerik. My control has a ViewModel as DataContext which has a property "DbObject". It is of the type "DbBaseObject". Now there could be any descendant of this type filled into the GridView. Some of them may have a property "Name", some may not. The standard WPF-Controls are pretty soft when evaluating a property that doesn't exist -> they just show an empty value. The RadGridView gives me Exceptions: 
 
ArgumentException "Property with name Name cannot be found on type DbBaseObject" 
and afterwards 
Invalid property or field - 'Name' for type: DbBaseObject 
 
This is true, the DbBaseObject doesn't have a property "Name" but this shouldn't be a reason not to show a column. Is there anything I can do to soften this behavior up? 

The answer was, that somehow it is not possible with the Telerik GridView to bind to abstract classes and that I have to use a Converter to achieve this job. I did so and it worked although I was not 100% happy with this solution as in my opinion, databinding should be a lot softer. Now I'm confronted with the problem, that Grouping / Filtering does not really work as it gives me Exceptions - after searching this forum I found the following post that answers why it doesn't work:


Any other idea how I achieve what I want to achieve? (I was not able to answer the support ticket as my 60-Days-Support expired) 

Thanks
~NoRyb
Stefan Dobrev
Telerik team
 answered on 28 Apr 2010
2 answers
120 views
   hi, i am hu , I have download sales dashboard for wpf sourse, but I don't know how to use it and is there any chm or video about it.
haha 胡
Top achievements
Rank 1
 answered on 28 Apr 2010
1 answer
153 views
Currently I am setting the ItemsPerPage on the panel to get the look i want.  When I resize the window, the space between the items expands which is what I do not want.  To solve this, I bound the ItemsPerPage to a property on my MVVM to handle this and it works well in keeping my item spacing the way I want.  The problem is that the SelectedItem changes as I resize.  The ItemSource and the SelectedItem are bound to properties on my MVVM, and those 2 actual values never change, but what is displayed on the carousel as the SelectedItem does change.

How can I resize the carousel, keep the item spacing the same (by adding more items per page) AND keep the selected item to what it was before the resizing?

Thanks,
David Ribb
Milan
Telerik team
 answered on 27 Apr 2010
1 answer
146 views
We are currently using your wpf controls and have overriden the default styles on many of the controls.  Since upgrading our controls to your recent release, we are receiving numerous xaml errors regarding new parts the controls expect to find in the control templates.  I think our problems can be solved quickly if we had the style source for the recent release to compare whats missing in our existing control templates.  Where can I find the source for the themes you provide?  I have source for previous versions but I didnt find any in the zip files?

Thank you
Lawrence King
International Training Institute
Kalin Milanov
Telerik team
 answered on 27 Apr 2010
10 answers
161 views
Hi,

I am trying to get all checked items from the TreeView.
My problem is this:
i am using  MyTelerikTree.CheckedItems  to get a list of all the checked elements in the tree.
my tree has a 3 level deep hierarchy, and i am only interested in the checked items of the deepest level.


if the tree was never expended i only get the root element as "Checked"
I assume this is happening because the tree is using virtual elements created on the fly.
Now, if the root element is fully checked, then it would be safe to assume all children are selected, and that's fine.
However, if i select just one of the branches or leaves in the tree (so that the root is partially checked) i get it as part of the CheckedItems list.
This would have been fine as well if the tree was not vitrualizing - i could have simply looked at the deepest checked level.
the problem is that if the tree is collapsed and i check the root, i only get the root on the CheckedItems.

In short:
If i treat a checked element as if all it's children are checked, i will sometimes add unchecked elements
If i treat  only checked elements as checked (and not the children) i will miss the checked children..

So my question is - how do i bridge these conflicting issues?


Thanks,
Yossi.



Kiril Stanoev
Telerik team
 answered on 27 Apr 2010
1 answer
106 views
Hi,

I am using Q1 2010 of WPF RAD Controls.

I have a calendar where I need to use the DayTemplateSelector and a custom DayButtonStyle. The problem that I am having is that when I apply my custom DayTemplateSelector, my style goes back to the default style. Is this a bug or limitation?

Thanks,
Gus
Konstantina
Telerik team
 answered on 27 Apr 2010
0 answers
178 views
How to compile WPF VB examples in VS2010?

If you are already using the new VS2010 and want to compile WPF examples which are written and built in VS2008, you need to perform some additional actions to achieve clear compilation. When VS2010 converts all examples one unnecessary file is generated and others appear to be not correctly converted, all of them related with Northwind Data Sources which are used in RadGridView examples.

These are the steps for successful compilation:

1.   Replace “Global.Telerik.Windows.Examples.Properties.Settings.Default.NorthwindConnectionString” with “Settings.Default.NorthwindConnectionString”
2.   Import suggested adapters
3.   Rebuild solution

How to compile WPF C# examples in VS2010?

If you are already using the new VS2010 and want to compile WPF examples which are written and built in VS2008, you need to perform an additional action to achieve clear compilation. When VS2010 converts all examples one unnecessary file is generated (Northwind1.designer.cs), related with Northwind Data Sources which is used in RadGridView examples. Simple delete this file and the compilation will be successful.
Telerik Admin
Top achievements
Rank 1
Iron
 asked on 27 Apr 2010
4 answers
148 views
Hi Telerik,

Does Gridview provide multiple column sort functionality? If yes how can i achieve that functionality.

Thanks,
-Kranthi
Vlad
Telerik team
 answered on 27 Apr 2010
1 answer
189 views
I can't find the API in gridview or gridviewdatacolumn to reference my embedded combo box or textbox. This is a multiple row and columns gridview and requires my user to select a combo box value that triggers textbox changes. Without a way to get the object reference during selection change event makes it very difficult.

For the example below, I need to reference object TxtTest3 on the same row where user select a value on CBTest2.

Any help is appreciated.


<Controls:RadGridView x:Name="DataTable" AutoGenerateColumns="False" ItemsSource="{Binding Path=Banks}"  Loaded="DataTable_Loaded" ShowColumnHeaders="True" IsFilteringAllowed="True" IsEnabled="True" CanUserSortColumns="True" ShowGroupPanel="False" CanUserSelect="False">
    <Controls:RadGridView.Columns>

        <Controls:GridViewDataColumn Header="Test" UniqueName="Test" >
            <Controls:GridViewDataColumn.CellTemplate>
            <DataTemplate>
                <telerikControl:RadButton>
                <Image x:Name="ImageTest"  Source="{Binding Image}" Stretch="Fill" Tag="1" MouseDown="ImageTest_MouseDown" Loaded="ImageTest_Loaded"/>
                </telerikControl:RadButton>
            </DataTemplate>
            </Controls:GridViewDataColumn.CellTemplate>
        </Controls:GridViewDataColumn>

        <Controls:GridViewDataColumn DataMemberBinding="{Binding Test1}" Header="Test1"  UniqueName="Test1" IsReadOnly="True" />

        <Controls:GridViewDataColumn x:Name="CBTest2" Header="Test2" UniqueName="Test2">
            <Controls:GridViewDataColumn.CellTemplate>
                <DataTemplate>
                    <telerikInput:RadComboBox Name="CBTest2" ItemsSource="{Binding Path=Test2Store, Mode=OneWay}"  SelectedValue="{Binding Path=Test2Value}" SelectedValuePath="Test2_id"  DisplayMemberPath="Test2info_value" Width="auto" Height="auto" Loaded="Test2_Loaded" SelectionChanged="Test2_Changed" />
                </DataTemplate>
            </Controls:GridViewDataColumn.CellTemplate>
        </Controls:GridViewDataColumn>

        <Controls:GridViewDataColumn x:Name="TxtTest3" Header="Test3" UniqueName="Test3">
        <Controls:GridViewDataColumn.CellTemplate>
            <DataTemplate>
                <TextBox Name="TxtTest3" Style="{StaticResource TextBoxHighlighter}" HorizontalAlignment="Stretch" HorizontalContentAlignment="Right" Loaded="Test3_Loaded" LostFocus="Test3_LostFocus" >
            </TextBox>
            </DataTemplate>
        </Controls:GridViewDataColumn.CellTemplate>
    </Controls:GridViewDataColumn>


</Controls:RadGridView>     
Vlad
Telerik team
 answered on 27 Apr 2010
3 answers
136 views
I am using the Drag and Drop manager to drag from a Telerik Grid to a RadCarousel.  Everytime the mouse moves over the carousel with the left button held down, it immediatly scrolls to the frist item.  How do I stop this?

David Ribb
Milan
Telerik team
 answered on 26 Apr 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
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
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
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?