Telerik Forums
UI for WPF Forum
8 answers
153 views

Hey,

Unfortunately I have a problem in the sort, filter and group functions in the following case:

Class A
{
string AName;
}
Class B : Class A
{
string BName;
}

Class C

{             

A baseClass;

}

 

The item source is ObservableCollection<C>
I am creating in code behind new GridViewDataColum.

If the binding is
1. " baseClass.AName" =>Everything works.
2. " baseClass.BName " =>The grid view rows are ok.All the data is shown in the correct cells,

But the Filter,Group,Sorting is not working.

 

 What can I do?

Nedyalko Nikolov
Telerik team
 answered on 06 Mar 2012
3 answers
124 views
I have two RadPanes that I wish to persist only the IsPinned property of.  I wish nothing else to be persisted, how would I code this?

The two RadPanes are the only UIElements with a StorageID and their SerializationOptions are set as

<telerik:PersistenceManager.SerializationOptions>
   <telerik:SerializationMetadataCollection>
      <telerik:PropertyNameMetadata Condition="Only" Expression="IsPinned" SearchType="PropertyName" />
   </telerik:SerializationMetadataCollection>
</telerik:PersistenceManager.SerializationOptions>

When I call Load after persisting, the entire RadDock is missing.

Thank you
Scott Lee
Petar Mladenov
Telerik team
 answered on 06 Mar 2012
3 answers
192 views
We are using Q1 2011  SP1 telerik version. 
There is a radwatermark textbox used in a radgridview. The loaded event is not firing on double clicking the text box in the gridview.
The same functionality works with Telerik version 2010 Q3.
We are not planning to use latest 2012 telerik version due to some animation issues for our application.
Please suggest any quick solution at the earliest.
Vlad
Telerik team
 answered on 06 Mar 2012
1 answer
239 views
I am trying to implement a chartview with a line series. The x axis has values in miliseconds. I feel the features of the linear axis suites me more then the DateTimeCategoricalAxis but I can't seem to get it to work with linear axis in both horizontal and vertical directions. Doesn't this work? And if it does, how would I do thìs? Is there any example showing this?    
Peshito
Telerik team
 answered on 06 Mar 2012
3 answers
226 views
Hi

i am creating readonly ranges using the InsertReadOnlyRange method.
This works well most of the times.
However I get a NullReferenceException deeply from the tk-lib code
with the following stacktrace:

    
Telerik.Windows.Documents.dll!Telerik.Windows.Documents.Model.RadDocument.GetCaretInline() Line 1319    C#
     Telerik.Windows.Documents.dll!Telerik.Windows.Documents.Model.RadDocument.GetCurrentSpanStyle() Line 1336 + 0xc bytes    C#
     Telerik.Windows.Documents.dll!Telerik.Windows.Controls.RadRichTextBox.UpdateCurrentStyles() Line 2974 + 0x20 bytes    C#
     Telerik.Windows.Documents.dll!Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.DoOnCaretLocationChanged() Line 441    C#
    Telerik.Windows.Documents.dll!Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.DoOnDocumentChanged.AnonymousMethod__6() Line 409 + 0xa bytes    C#

the line raising the exception goes like:

//Line 1319 in RadDocument.cs
    SpanLayoutBox previousSpanBox = DocumentStructureCollection.GetPreviousSiblingForDocumentElement(currentSpanBox,
                    currentSpanBox.Parent.AssociatedDocumentElement) as SpanLayoutBox;
                              //  ^^^^^NullReferenceException: Parent is null sometimes

"Parent" is null here.
I noticed that the "null-ness" and the exception only occur if the span is inserted using InsertInline:

RadDocument doc = editor.Document;
 var span1 = new Span("This text is protected");
// doc.InsertInline(span1); //this span's spanbox will have no Parent, causing a Null ref
 (doc.Sections.Last.Blocks.Last as Paragraph).Inlines.Add(span1); //this span's spanbox will have a Parent, not causing a Null ref
 DocumentPosition pos3 = new DocumentPosition(doc.DocumentLayoutBox, true);
 var spb1 = span1.FirstLayoutBox as SpanLayoutBox;
 pos3.MoveToInline(spb1, 0);
 
 DocumentPosition pos4 = new DocumentPosition(doc.DocumentLayoutBox, true);
 pos4.MoveToInline(spb1, spb1.PositionsCountInBox - 1);
 
 doc.InsertReadOnlyRange(pos3, pos4); // raises Null ref in RadDocument.GetCaretInline if using "doc.InsertInline"


so my wish to the telerik developpers is to fix this line of code.
There are circumstances where a spanbox has no Parent layoutbox.
(E.g. when appending it with InsertInline). So you can't use it to get its previous sibling.
If you anaylze the stack trace and the surrounding code of "GetCaretInline"
it's fully OK to null check the Parent property and in this case simply return
the span associated to the layoutbox "currentSpanBox".

Chris
Iva Toteva
Telerik team
 answered on 06 Mar 2012
0 answers
134 views
Hi,

I am using a TreeListView to display data as multi-column tree. I have set my VM as DataContext to the page and giving my VM property as the ItemsSource of the TreeListView control. When I change the underlying data in VM, it updates the data in the grid normally for the 1st time, but it never updates the data in the grid after that. I checked the data in VM is always right, but the grid never shows the update. It happens only once.

My grid code is:
<telerik:RadTreeListView x:Name="trvHierachyData" ItemsSource="{Binding Path=Data}">
            <telerik:RadTreeListView.ChildTableDefinitions>
                <telerik:TreeListViewTableDefinition ItemsSource="{Binding Items}">
                    <telerik:TreeListViewTableDefinition ItemsSource="{Binding Items}">
                        <telerik:TreeListViewTableDefinition ItemsSource="{Binding Items}">
                            <telerik:TreeListViewTableDefinition ItemsSource="{Binding Items}">
                                <telerik:TreeListViewTableDefinition ItemsSource="{Binding Items}">
                                </telerik:TreeListViewTableDefinition>
                            </telerik:TreeListViewTableDefinition>
                        </telerik:TreeListViewTableDefinition>
                    </telerik:TreeListViewTableDefinition>
                </telerik:TreeListViewTableDefinition>
            </telerik:RadTreeListView.ChildTableDefinitions>
        </telerik:RadTreeListView>


I am setting the page data context to the VM, i.e. in page ctor - this.DataContext = vmMainControl. The VM has a property by the name of Data which is of type ObservableCollection<T>. The Data collection has Items which is a collection collection of that node.

Please let me know if I am not clear

Regards,
Bhaskar
Bhaskar Khaund
Top achievements
Rank 1
 asked on 06 Mar 2012
1 answer
49 views

When the view is initially loaded, the RadPanes start out open, and then immediately shut. This is visible and distracting. I really want them to just be closed from the get go.How can I make it so the RadPanes in a RadPaneGroup are initially closed (unpinned)?

How can I make it so the RadPanes in a RadPaneGroup are initially closed (unpinned)?

Code snipet:

<radDock:RadDocking x:Name="radDocking1" Background="{StaticResource WindowBackgroundBrush}">
<radDock:RadDocking.DocumentHost>
<!-- controls here -->
</radDock:RadDocking.DocumentHost>
<radDock:RadSplitContainer radDock:DockingPanel.InitialSize="300,300" MaxWidth="600"
Name="RightContainer" InitialPosition="DockedRight">
<radDock:RadPaneGroup x:Name="_librariesGroup">
<radDock:RadPane x:Name="_requirementsLibraryPane" Header="Requirements Library"
CanFloat="False" CanUserClose="False" CanUserPin="True" IsPinned="False">
<my1:RequirementsLibraryDrawerControl x:Name="_requirementsLibraryDrawer" />
</radDock:RadPane>
 
 
 
</radDock:RadPaneGroup>
</radDock:RadSplitContainer>
</radDock:RadDocking>


Georgi
Telerik team
 answered on 06 Mar 2012
3 answers
229 views
hi there,

    how to i load multiple items in multiple panel bar so that it show dynamic world like we can a panel bar and behind the code it generates multiple panel bar ann each panel bar contains multiple items and all these panel bars are loaded dynamically???
Usman
Top achievements
Rank 1
 answered on 06 Mar 2012
0 answers
144 views

I am trying to implement a ContextMenu for a treeview control (WPF) by using your Telerik's online tutorial. However, I often get error message as I copy & paste the tutorial code.

Here is what I have in XAML:
        <telerik:RadTreeView Canvas.Left="18" Canvas.Top="136" Height="615" Name="raceTreeView" Width="311" Background="Bisque" IsLineEnabled="True">
            <!-- This code segement implements a popup menu on the treeview.-->
            <telerik:RadContextMenu.ContextMenu>
                <telerik:RadContextMenu ItemClick="TreeContextMenu_ItemClick">
                    <telerik:RadMenuItem Header="Add" />
                    <telerik:RadMenuItem Header="Delete" />
                    <telerik:RadMenuItem Header="Edit" />
                </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
        </telerik:RadTreeView>

Here is the relevant segements in C# code-behind:
using Telerik.Windows;
using Telerik.Windows.Controls;
using Telerik.Windows.Data;

....

private void TreeContextMenu_ItemClick(object sender, Telerik.Windows.RadRoutedEventArgs e)
   {
    MenuItem item = (e.OriginalSource as RadMenuItem).DataContext as MenuItem;
    switch ( item.Text )
    {
        case "Add":
            ....
        case "Edit":
            ....
        case "Delete":
            ....
        }
     }
   }

I get an error message on this line : switch ( item.Text )
'System.Windows.Controls.MenuItem' does not contain a definition for 'Text' and no extension method 'Text' accepting a first argument of type 'System.Windows.Controls.MenuItem' could be found (are you missing a using directive or an assembly reference?)

How can I solve this problem?

Thanks,
Hamid

Please disregard this post. I found the error.
Thanks,
Hamid

Hamid
Top achievements
Rank 1
 asked on 06 Mar 2012
2 answers
140 views
Hello.

I am new to Telerik. I need to populate a treeview with data from an Oracle DataReader (using ODP.NET which is an implementation of ADO.NET). Is there a step by step guide on this subject that I could use (XAML and C# code)?

Thanks,
Hamid
Hamid
Top achievements
Rank 1
 answered on 05 Mar 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
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
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
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Missing User
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
Missing User
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?