Home Forums WPF controls Xceed DataGrid for WPF Application crash when FixedColumnCount is set

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #25006 |

    Hi

    I get the strangest crash when I add <b>FixedColumnCount=”1″</b> to my application. When I debug, the crash occurs when the application is trying to initialize the grid. Removing FixedColumnCount=”1″ makes it work again.

    My grid code:
    <xcdg:DataGridControl x:Name=”relationsGrid” ItemsSource=”{Binding Path=Relations}”>

    <xcdg:DataGridControl.Columns>
    <xcdg:Column FieldName=”Name”/>
    <xcdg:Column FieldName=”RelationType”/>
    </xcdg:DataGridControl.Columns>

    <xcdg:DataGridControl.View>
    <xcdg:TableView FixedColumnCount=”1″/>
    </xcdg:DataGridControl.View>

    </xcdg:DataGridControl>

    Anyone else had the same problem?

    Is this a bug, or should anything else be set to make it work?

    Imported from legacy forums. Posted by Tove (had 488 views)

    Xceed Support
    Member
    Post count: 5658

    What is the exception?

    Imported from legacy forums. Posted by Jenny [Xceed] (had 376 views)

    User (Old forums)
    Member
    Post count: 23064

    I’m affraid it’s in swedish:

    System.Windows.Markup.XamlParseException was unhandled
    Message=”Det gick inte att skapa en instans av ‘MainWindow’ som definierats i paketet ‘wpf, Version=1.0.2833.25555, Culture=neutral, PublicKeyToken=null’. Ett undantagsfel har inträffat i målet för en aktivering. Fel i markeringsfilen ‘wpf;component/MainWindow.xaml’ rad 2 position 2.”
    Source=”PresentationFramework”
    LineNumber=2
    LinePosition=2

    It says that <b>”it was not possible to create an instance of ‘MainWindow'”</b>, and <b>”An error has occurred in the target for an activation”</b> (bad english, I know). <b>”Error in the file ‘wpf;component/MainWindow.xaml’ row 2 position 2.”</b>

    I’ve recieved this error many times before, but I can’t make anything of it. Can you?

    I don’t know if the stack trace tells you something either, but I attached it just in case:

    StackTrace:
    vid System.Windows.Markup.XamlParseException.ThrowException(String message, Exception innerException, Int32 lineNumber, Int32 linePosition, Uri baseUri, XamlObjectIds currentXamlObjectIds, XamlObjectIds contextXamlObjectIds, Type objectType)
    vid System.Windows.Markup.XamlParseException.ThrowException(ParserContext parserContext, Int32 lineNumber, Int32 linePosition, String message, Exception innerException)
    vid System.Windows.Markup.BamlRecordReader.ThrowException(String message, Exception innerException)
    vid System.Windows.Markup.BamlRecordReader.CreateInstanceFromType(Type type, Int16 typeId, Boolean throwOnFail)
    vid System.Windows.Markup.BamlRecordReader.GetElementAndFlags(BamlElementStartRecord bamlElementStartRecord, Object& element, ReaderFlags& flags, Type& delayCreatedType, Int16& delayCreatedTypeId)
    vid System.Windows.Markup.BamlRecordReader.BaseReadElementStartRecord(BamlElementStartRecord bamlElementRecord)
    vid System.Windows.Markup.BamlRecordReader.ReadElementStartRecord(BamlElementStartRecord bamlElementRecord)
    vid System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord)
    vid System.Windows.Markup.BamlRecordReader.Read(Boolean singleRecord)
    vid System.Windows.Markup.TreeBuilderBamlTranslator.ParseFragment()
    vid System.Windows.Markup.TreeBuilder.Parse()
    vid System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
    vid System.Windows.Application.LoadBamlStreamWithSyncInfo(Stream stream, ParserContext pc)
    vid MS.Internal.AppModel.AppModelKnownContentFactory.BamlConverter(Stream stream, Uri baseUri, Boolean canUseTopLevelBrowser, Boolean sandboxExternalContent, Boolean allowAsync, Boolean isJournalNavigation, XamlReader& asyncObjectConverter)
    vid MS.Internal.AppModel.MimeObjectFactory.GetObjectAndCloseStream(Stream s, ContentType contentType, Uri baseUri, Boolean canUseTopLevelBrowser, Boolean sandboxExternalContent, Boolean allowAsync, Boolean isJournalNavigation, XamlReader& asyncObjectConverter)
    vid System.Windows.Navigation.NavigationService.GetObjectFromResponse(WebRequest request, WebResponse response, Uri destinationUri, Object navState)
    vid System.Windows.Navigation.NavigationService.DoNavigate(Uri source, NavigationMode f, Object navState)
    vid System.Windows.Navigation.NavigateQueueItem.Dispatch(Object obj)
    vid System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
    vid System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
    vid System.Windows.Threading.DispatcherOperation.InvokeImpl()
    vid System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
    vid System.Threading.ExecutionContext.runTryCode(Object userData)
    vid System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
    vid System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
    vid System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    vid System.Windows.Threading.DispatcherOperation.Invoke()
    vid System.Windows.Threading.Dispatcher.ProcessQueue()
    vid System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    vid MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    vid MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
    vid System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
    vid System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
    vid System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
    vid System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
    vid MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
    vid MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
    vid System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
    vid System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
    vid System.Windows.Threading.Dispatcher.Run()
    vid System.Windows.Application.RunInternal(Window window)
    vid System.Windows.Application.Run(Window window)
    vid System.Windows.Application.Run()
    vid Evolver.wpf.App.Main() i C:\Users\orttnn\Documents\Evolver Projects\evolver\wpf\obj\Debug\App.g.cs:rad 0
    vid System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
    vid System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
    vid System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
    vid System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
    vid System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
    vid Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
    vid System.Threading.ThreadHelper.ThreadStart_Context(Object state)
    vid System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    vid System.Threading.ThreadHelper.ThreadStart()

    Imported from legacy forums. Posted by Tove (had 421 views)

    Xceed Support
    Member
    Post count: 5658

    It might be a licensing issue; fixed columns is a Vanguard feature. Are you using a Vanguard (pro), trial, or free license key?

    Imported from legacy forums. Posted by Jenny [Xceed] (had 214 views)

    User (Old forums)
    Member
    Post count: 23064

    Oh, then that´s why. I <i>am</i> using a free license key.

    Where can I find if a feature is a Vanguard-feature (so I dont do the same misstake again)?

    Thanks Jenny for sorting that out!

    Imported from legacy forums. Posted by Tove (had 4284 views)

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.