Telerik Forums
UI for WPF Forum
0 answers
107 views
I have a few questions I need answered:

1. How do I turn off the grouping feature?

2. When the data in a RadGridView is being exported in text format, is there a way that I can change the format of the data output?  Meaning, I don't want the text surrounded by double quotes and I want each column to occupy a certain number of columns.

Thanks

Tony

P.S. I deleted the other questions that were originally in this post as I don't need them answered any more.  These two, though, I still need answers to.

Thanks
Tony
Top achievements
Rank 1
 asked on 06 Mar 2012
1 answer
372 views
Hi, I am very new to Telerik, and I am trying to get an old half finished project that uses Telerik working in VS2010. It builds fine but when I try to debug I get an XamlParseException exception, here is the details:

System.Windows.Markup.XamlParseException was unhandled
  Message=Cannot create instance of 'OMWindow' defined in assembly 'CCMSOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Exception has been thrown by the target of an invocation.  Error in markup file 'View/Main/OMWindow.xaml' Line 1 Position 9.
  Source=PresentationFramework
  LineNumber=1
  LinePosition=9
  StackTrace:
       at System.Windows.Markup.XamlParseException.ThrowException(String message, Exception innerException, Int32 lineNumber, Int32 linePosition, Uri baseUri, XamlObjectIds currentXamlObjectIds, XamlObjectIds contextXamlObjectIds, Type objectType)
       at System.Windows.Markup.XamlParseException.ThrowException(ParserContext parserContext, Int32 lineNumber, Int32 linePosition, String message, Exception innerException)
       at System.Windows.Markup.BamlRecordReader.CreateInstanceFromType(Type type, Int16 typeId, Boolean throwOnFail)
       at System.Windows.Markup.BamlRecordReader.GetElementAndFlags(BamlElementStartRecord bamlElementStartRecord, Object& element, ReaderFlags& flags, Type& delayCreatedType, Int16& delayCreatedTypeId)
       at System.Windows.Markup.BamlRecordReader.BaseReadElementStartRecord(BamlElementStartRecord bamlElementRecord)
       at System.Windows.Markup.BamlRecordReader.ReadElementStartRecord(BamlElementStartRecord bamlElementRecord)
       at System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord)
       at System.Windows.Markup.BamlRecordReader.Read(Boolean singleRecord)
       at System.Windows.Markup.TreeBuilderBamlTranslator.ParseFragment()
       at System.Windows.Markup.TreeBuilder.Parse()
       at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
       at System.Windows.Application.LoadBamlStreamWithSyncInfo(Stream stream, ParserContext pc)
       at System.Windows.Application.DoStartup()
       at System.Windows.Application.<.ctor>b__0(Object unused)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.TranslateAndDispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Application.RunInternal(Window window)
       at CCMSOM.App.Main() in C:\Users\mcgrath1\CCMSOM\trunk\obj\Debug\View\Main\App.g.cs:line 0
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.Reflection.TargetInvocationException
       Message=Exception has been thrown by the target of an invocation.
       Source=mscorlib
       StackTrace:
            at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
            at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
            at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
            at System.Activator.CreateInstance(Type type, Boolean nonPublic)
            at System.Windows.Markup.BamlRecordReader.CreateInstanceFromType(Type type, Int16 typeId, Boolean throwOnFail)
       InnerException: System.TypeInitializationException
            Message=The type initializer for 'CCMSOM.View.OMWindow' threw an exception.
            TypeName=CCMSOM.View.OMWindow
            InnerException: System.IO.DirectoryNotFoundException
                 Message=Could not find a part of the path 'C:\Users\mcgrath1\CCMSOM\trunk\bin\Config\CCMSOM_Config.xml'.
                 Source=mscorlib
                 StackTrace:
                      at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
                      at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
                      at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
                      at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
                      at CCMSOM.ViewModel.DataManager.LoadFromXml() in C:\Users\mcgrath1\CCMSOM\trunk\Worker\DataManager.cs:line 96
                      at CCMSOM.ViewModel.DataManager..ctor() in C:\Users\mcgrath1\CCMSOM\trunk\Worker\DataManager.cs:line 44
                      at CCMSOM.View.OMWindow..cctor() in C:\Users\mcgrath1\CCMSOM\trunk\View\Main\OMWindow.xaml.cs:line 34
                 InnerException: 

Vlad
Telerik team
 answered on 06 Mar 2012
1 answer
81 views
Is there any COMPLETE example to create a custom theme based on Windows7 theme? I tried a lot of ways to do my own reading this forum but no one supports Q1 2012 version; not even WPF. Thank you!
Tina Stancheva
Telerik team
 answered on 06 Mar 2012
1 answer
78 views
Hello,

When I display a RadCalendar control in a WPF application with the property IsEnabled=false, and then change the property to true. The number days remain grey and when I move the mouse over them they change it Forecolor to black.

<telerik:RadCalendar Grid.Row="1" Grid.Column="0"  Grid.ColumnSpan="2" Grid.RowSpan="2" MinHeight="620" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
		Columns="4" Rows="3" SelectionMode="Multiple" Name="calMain" IsTodayHighlighted="False" AreWeekNumbersVisible="False"
		FontFamily="Segoe UI" HeaderVisibility="Hidden" ViewsHeaderVisibility="Visible"
		IsEnabled="False" Background="White" Foreground="Black" />

private void btnEnabled_Click(object sender, RoutedEventArgs e)
{            
    calMain.IsEnabled = true;
}

How can I avoid this behaviour?

Regards,
Gerardo.
Dani
Telerik team
 answered on 06 Mar 2012
2 answers
245 views

I'm wondering about the reason why RadPane and RadDocumentPane fire the IsVisibleChanged and Unloaded events when I'm just dragging the Pane to an other place on the screen (in my case out of my MainWindow)?

IsVisibleChanged might be plausible, because the Pane becomes invisible for the split of a second, but Unloaded is not plausible, because the the Pane still exists.

So to which event do I have to listen if I want to react on the user clicking on the small cross on the pane to close it, if  IsVisibleChanged and Unloaded happen also when the user is only dragging the Pane?

Miroslav Nedyalkov
Telerik team
 answered on 06 Mar 2012
8 answers
158 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
127 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
204 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
247 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
231 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
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?