Implicit style (visual studio 2013) + custom row style (MaxHeight) => results in empty GridView

3 posts, 0 answers
  1. Erdem
    Erdem avatar
    22 posts
    Member since:
    Sep 2013

    Posted 26 Jun 2014 Link to this post


    I noticed some strange behaviour when using implicit styles and the using a custom style for a row in the gridivew... has anyone seen anything like this before..

    ... I have used this custom style before with success (as stated in the links below) ,... untill I start using implicit style (visual studio 2013)

    I made a sample project. If I remove the following piece of code from the gridview, everything works fine:

    RowStyle="{StaticResource CustomRowStyle}"

    If you want to check, you can download the sample project here:  (click File => Download)

    Thanks !

  2. Dimitrina
    Dimitrina avatar
    3769 posts

    Posted 27 Jun 2014 Link to this post


    When using Implicit Styles, you should define the Style like so: 
    <Style x:Key="CustomRowStyle" TargetType="telerik:GridViewRowStyle">
        <Setter Property="MaxHeight" Value="200"/>
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
  3. Erdem
    Erdem avatar
    22 posts
    Member since:
    Sep 2013

    Posted 27 Jun 2014 in reply to Dimitrina Link to this post

    thanks, this set me in the right direction.
    Just to share the correct syntax with others:

    <Style x:Key="CustomRowStyle" TargetType="telerik:GridViewRow" BasedOn="{StaticResource GridViewRowStyle}">
        <Setter Property="MaxHeight" Value="25"/>

Back to Top