This is a migrated thread and some comments may be shown as answers.

Blank grid content when grouped

2 Answers 144 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 02 Aug 2017, 12:29 AM

Hi,

I have a real simple grid prototype. Works fine until I group by a column. When any grouping applied the area below the header row is blank although the gridview seems to be resizing as expected. I think this is a rendering issue. 

More details:

  • Windows 10 OS
  • VS2017
  • Dell PC
  • Latest Telerik, installed today (trial)

Images attached show the before and after. Notice that the size (border) of the grid changes as expected.

Code fragment:

 
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="*"/>
    </Grid.RowDefinitions>
     
    <telerik:RadGridView Grid.Row="0" ItemsSource="{Binding Variables}" GroupRenderMode="Nested"
                         AutoExpandGroups="True" AutoGenerateColumns="False">
        <telerik:RadGridView.Columns>
            <telerik:GridViewDataColumn DataMemberBinding="{Binding Type}" Header="Type" IsGroupable="True"/>
            <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" Header="Name" IsGroupable="False"/>
            <telerik:GridViewDataColumn DataMemberBinding="{Binding Index}" Header="Index"/>
            <telerik:GridViewDataColumn DataMemberBinding="{Binding BriefDescription}" Header="Description" IsGroupable="True"/>
        </telerik:RadGridView.Columns>
         
        <telerik:RadGridView.GroupDescriptors>
            <telerik:GroupDescriptor Member="BriefDescription" SortDirection="Ascending" />
        </telerik:RadGridView.GroupDescriptors>
    </telerik:RadGridView>
     
</Grid>

Any ideas?

2 Answers, 1 is accepted

Sort by
0
Robert
Top achievements
Rank 1
answered on 02 Aug 2017, 06:38 AM

Further info ...

Since I posted I've been seeing an exception in the VS2017 designer pane:

System.MissingMethodException
Method not found: 'Telerik.Windows.Controls.ActionOnLostFocus Telerik.Windows.Controls.GridView.GridViewDataControl.get_ActionOnLostFocus()'.
   at Telerik.Windows.Controls.GridView.Design.GridViewDataControlMetadata.AddCommonCategoryAttributes(AttributeCallbackBuilder builder)
   at Telerik.Windows.Controls.GridView.Design.GridViewDataControlMetadata.<.ctor>b__0(AttributeCallbackBuilder b)
   at MS.Internal.Metadata.MutableAttributeTable.ExpandAttributes(Type type, AttributeList attributes)
   at MS.Internal.Metadata.MutableAttributeTable.GetExpandedAttributes(Type type, Object callbackParam, GetAttributesCallback callback)
   at MS.Internal.Metadata.MutableAttributeTable.GetCustomAttributes(Type type)
   at Microsoft.Windows.Design.Metadata.AttributeTable.GetCustomAttributes(Type type)
   at Microsoft.VisualStudio.DesignTools.Designer.Metadata.MetadataStore.<GetAttributes>d__29.MoveNext()
   at Microsoft.VisualStudio.DesignTools.Designer.Metadata.TypeUtilities.<MergeAttributesIterator>d__12.MoveNext()
   at Microsoft.VisualStudio.DesignTools.Designer.Metadata.TypeUtilities.GetAttributes(MemberInfo memberInfo, Type attributeType, IPlatformMetadata platformMetadata, Boolean checkBaseTypes, Func`3 canContinueCheckingBaseTypes)
   at Microsoft.VisualStudio.DesignTools.Designer.Metadata.TypeUtilities.GetAttributes(IType type, Type attributeType)
   at Microsoft.VisualStudio.DesignTools.Designer.Metadata.ClrObjectMetadata.AttributeExists(ITypeId attributeType)
   at Microsoft.VisualStudio.DesignTools.Designer.Metadata.ClrObjectMetadata.get_ShouldTrimSurroundingWhiteSpace()
   at Microsoft.VisualStudio.DesignTools.WpfDesigner.Metadata.WpfPlatformMetadata.ShouldTrimSurroundingWhiteSpace(IType typeId)
   at Microsoft.VisualStudio.DesignTools.Markup.XamlParser.ParseContent(XamlParserContext parserContext, IDocumentNodeReference nodeReference, XmlElementReference xmlElementReference, XmlElement xmlElement, IProperty childProperty, TypeConverter textTypeConverter, ITypeId textType, PropertyHandling propertyHandling)
   at Microsoft.VisualStudio.DesignTools.Markup.XamlParser.AddPropertiesAndChildren(XamlParserContext parserContext, DocumentCompositeNodeReference nodeReference, XmlElementReference xmlElementReference, XmlElement xmlElement, Predicate`1 propertyFilter)
   at Microsoft.VisualStudio.DesignTools.Markup.XamlParser.AddPropertiesAndChildren(XamlParserContext parserContext, DocumentCompositeNodeReference nodeReference, XmlElementReference xmlElementReference, XmlElement xmlElement)
   at Microsoft.VisualStudio.DesignTools.Markup.XamlParser.ParseCompositeElement(XamlParserContext parserContext, IDocumentNodeReference nodeReference, IType typeId, XmlElementReference xmlElementReference, XmlElement xmlElement)
   at Microsoft.VisualStudio.DesignTools.Markup.XamlParser.ParseElementContent(XamlParserContext parserContext, IDocumentNodeReference nodeReference, IType typeId, XmlElementReference xmlElementReference, XmlElement xmlElement)
   at Microsoft.VisualStudio.DesignTools.Markup.XamlParser.ParseElement(XamlParserContext parserContext, IDocumentNodeReference nodeReference, XmlElementReference xmlElementReference, XmlElement xmlElement, DocumentNode& node)
   at Microsoft.VisualStudio.DesignTools.Markup.XamlParser.ParseContent(XamlParserContext parserContext, IDocumentNodeReference nodeReference, XmlElementReference xmlElementReference, XmlElement xmlElement, IProperty childProperty, TypeConverter textTypeConverter, ITypeId textType, PropertyHandling propertyHandling)
   at Microsoft.VisualStudio.DesignTools.Markup.XamlParser.AddPropertiesAndChildren(XamlParserContext parserContext, DocumentCompositeNodeReference nodeReference, XmlElementReference xmlElementReference, XmlElement xmlElement, Predicate`1 propertyFilter)
   at Microsoft.VisualStudio.DesignTools.Markup.XamlParser.AddPropertiesAndChildren(XamlParserContext parserContext, DocumentCompositeNodeReference nodeReference, XmlElementReference xmlElementReference, XmlElement xmlElement)
   at Microsoft.VisualStudio.DesignTools.Markup.XamlParser.ParseCompositeElement(XamlParserContext parserContext, IDocumentNodeReference nodeReference, IType typeId, XmlElementReference xmlElementReference, XmlElement xmlElement)
   at Microsoft.VisualStudio.DesignTools.Markup.XamlParser.ParseElementContent(XamlParserContext parserContext, IDocumentNodeReference nodeReference, IType typeId, XmlElementReference xmlElementReference, XmlElement xmlElement)
   at Microsoft.VisualStudio.DesignTools.Markup.XamlParser.ParseRootElement(XamlParserContext parserContext, XmlElementReference xmlElementReference, XmlElement xmlElement)
   at Microsoft.VisualStudio.DesignTools.Markup.XamlParser.Parse(XamlParserContext parserContext, XmlDocumentReference xmlDocumentReference, XmlDocument xmlDocument)
   at Microsoft.VisualStudio.DesignTools.Markup.XamlParser.ParseInternal(XamlParserContext parserContext)
   at Microsoft.VisualStudio.DesignTools.Markup.XamlLanguageService.ParseDocument(CancellationToken cancelToken)
   at Microsoft.VisualStudio.DesignTools.Markup.MarkupDocument.EnsureParsed(CancellationToken cancelToken)
   at Microsoft.VisualStudio.DesignTools.Markup.MarkupDocument..ctor(IDocumentContext documentContext, ITypeId expectedRootType, ITextBuffer textBuffer, Encoding documentEncoding, IMarkupLanguageService languageService, IMarkupDocumentUndoProvider undoProvider, CancellationToken cancelToken, Boolean shouldParse)
   at Microsoft.VisualStudio.DesignTools.Designer.DocumentViewContext.CreateMarkupDocument(ISourceItemContext sourceItem, IHostTextBuffer hostTextBuffer, Encoding encoding, CancellationToken cancelToken, Boolean forceParse)
   at Microsoft.VisualStudio.DesignTools.Designer.DocumentViewContext.CreateDocument(ISourceItemContext sourceItem, CancellationToken cancelToken, Boolean isReadOnly, Boolean cloneBufferToStandalone, Boolean suppressUI, SceneDocument originalSceneDocument, Boolean forceParse)
   at Microsoft.VisualStudio.DesignTools.Designer.DocumentViewContext.OpenDocument(ISourceItemContext sourceItem, CancellationToken cancelToken, Boolean isReadOnly, Boolean suppressUI, Boolean forceParse)
   at Microsoft.VisualStudio.DesignTools.Designer.DesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass12_0.<Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.IRemoteDesignerService.CreateDesigner>b__0(CancellationToken cancelToken)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass6_0`1.<MarshalInWithCancellation>b__0()
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()
 
System.MissingMethodException
Method not found: 'Telerik.Windows.Controls.ActionOnLostFocus Telerik.Windows.Controls.GridView.GridViewDataControl.get_ActionOnLostFocus()'.
 
Server stack trace:
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.MarshalInSynchronous(Action action, Int32 targetApartmentId, CancellationToken cancelToken, CallModality callModality, String methodName, String filePath, Int32 lineNumber)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.MarshalIn(Action action, Int32 targetApartmentId, CancellationToken cancelToken, CallSynchronizationMode syncMode, CallModality callModality, String methodName, String filePath, Int32 lineNumber)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.ThreadMarshaler.MarshalIn(IRemoteObject targetObject, Action action, CancellationToken cancelToken, CallSynchronizationMode syncMode, CallModality callModality, ApartmentState apartmentState, String memberName, String filePath, Int32 lineNumber)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.RemoteDesignerService.MarshalInWithCancellation[TResult](IRemoteCancellationToken remoteToken, Func`2 func, ApartmentState apartmentState)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.RemoteDesignerService.Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostProject remoteProject, IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor, IRemoteCancellationToken remoteToken)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
 
Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostProject remoteProject, IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor, IRemoteCancellationToken cancelToken)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.LocalDesignerService.CreateDesignerImpl(IRemoteDesignerService ds, IHostSourceItem item, IHostTextEditor editor, RemoteCancellationToken remoteCancelToken)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass14_0.<Microsoft.VisualStudio.DesignTools.DesignerContract.IDesignerService.CreateDesigner>b__0(IRemoteDesignerService ds, RemoteCancellationToken remoteToken)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass5_0`1.<MarshalOutWithCancellation>b__0(IRemoteDesignerService ds)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass29_0`1.<MarshalOut>b__0()
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()
 
System.MissingMethodException
Method not found: 'Telerik.Windows.Controls.ActionOnLostFocus Telerik.Windows.Controls.GridView.GridViewDataControl.get_ActionOnLostFocus()'.
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.MarshalOutSynchronous(Action action, Int32 targetApartmentId, WaitHandle aborted, WaitHandle timeoutSignal, CancellationToken cancelToken, String methodName, String filePath, Int32 lineNumber)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.MarshalOut(Action action, Int32 targetApartmentId, WaitHandle aborted, CancellationToken cancelToken, CallSynchronizationMode syncMode, WaitHandle timeoutSignal, String methodName, String filePath, Int32 lineNumber)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.ThreadMarshaler.MarshalOut[TValue](RemoteHandle`1 targetObject, Action action, CancellationToken cancelToken, CallSynchronizationMode syncMode, ApartmentState apartmentState, String methodName, String filePath, Int32 lineNumber)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.ThreadMarshaler.MarshalOut[TValue](RemoteHandle`1 targetObject, Action`1 action, CancellationToken cancelToken, CallSynchronizationMode syncMode, ApartmentState apartmentState, String methodName, String filePath, Int32 lineNumber)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.LocalDesignerService.MarshalOutWithCancellation[TResult](CancellationToken cancelToken, Func`3 func, ApartmentState apartmentState)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.LocalDesignerService.Microsoft.VisualStudio.DesignTools.DesignerContract.IDesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken)

 

0
Stefan
Telerik team
answered on 04 Aug 2017, 11:37 AM
Hello Robert,

Thanks for the detailed explanation.

Can you please clarify whether any styles are applied to RadGridView when the control is being grouped? If this is the case, a possible cause might be that the defined styles are not based on the default theme ones. This assumption will be valid only if Implicit Styles are used. In order to get familiar how to base the custom styles, please, take a look at the Styling the Controls topic. If this is not the case, may I kindly ask you to send me a sample application demonstrating the behavior you are experiencing so I can provide a more adequate assistance? You can take a look at the Isolating a problem in a sample application blog post for further reference.

As to the exception you are experiencing, would it be possible for you to check whether it is reproduced only with VisualStudio 2017? Is the designer behaving as expected with previous versions?

Regards,
Stefan X1
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
GridView
Asked by
Robert
Top achievements
Rank 1
Answers by
Robert
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or