Welcome to the Xceed Community | Help
Community Search  
More Search Options

datagridview cells not aligning when grouped/sorted

Sort Posts: Previous Next
  •  03-05-2012, 11:44 AM Post no. 31795

    datagridview cells not aligning when grouped/sorted


     Normally I align my datagridview cells by using styles like this:


    <DataTrigger Binding="{Binding FieldName, RelativeSource={RelativeSource Self}}" Value="Hour">

    <Setter Property="HorizontalContentAlignment" Value="Center"/>


    <DataTrigger Binding="{Binding FieldName, RelativeSource={RelativeSource Self}}" Value="Alarm">

    <Setter Property="HorizontalContentAlignment" Value="Center"/>

    </DataTrigger> ...


    However, on a usercontrol I am working on I create a datagridgroupdescription and sortdescription and add them to a collectionview that I am creating at runtime. The end result is a grouped and sorted grid however it seems to ignore my cell styles set by the datatriggers shown above. I use these datatriggers on my other usercontrols and they align the cells fine so I am not sure if my grouping and sorting operations are affecting this behavior or what. I am using  tableview as my grid's rendering view as I had an issue with tableflowview not showing all of the content of the group expander's label.

    Any ideas why I might be experiencing this behavior? 

  •  03-05-2012, 3:42 PM Post no. 31797 in reply to 31795

    Re: datagridview cells not aligning when grouped/sorted

    ok well this only seems to happen with tableview. I swapped over to tableflowview and restyled my group expander and everything is fine now.

     I'm on v4.3 of the datagridview library.

View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.