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

Have data span several columns

Sort Posts: Previous Next
  •  02-08-2012, 10:26 AM Post no. 31652

    Have data span several columns

    Hi

    I have a rather strange problem I'd like help to solve. The scenario is as follows: Most rows I'd like to display in columns as is natural, however, some of them might be missing some data, and I would like to display an informative text in that row, in adittion to some of the columns.

    [Case Id] [Resource name] [Time] [Distance]
    1202232 John Barnes         12:32  16mi
    3285594 No resource has ben assigned to this case
    3223803 Andrew Nobles     09:08  5mi

    As the mockup-table above displays, I want to display data in their related columns, but instead of displaying the second row as empty after the case number, I'd like the descriptive text to span the remaining columns.

    Is there a way I can do this in a fairly easy way, or do I really have to do some template magic for this? 

    I'm thinking about using an adorner with some marin on the left to where the [Resource name] column start, or is there an easier way with what is already present?

    I guess this question could be phrased in a different way; is there a way to allow the CONTENT of a DataCell to overflow within the remaining width of the row, without affecting the width of the cell?

     

    Filed under: ,
  •  02-08-2012, 4:19 PM Post no. 31656 in reply to 31652

    Re: Have data span several columns

    I found the answer:

    <DataTemplate>
        <Canvas>
            <TextBlock Text="{x:Static Language:UILanguage.NoResourceAssigned}" ClipToBounds="False" />
        </Canvas>
    </DataTemplate>

    Placed in the CellContentTemplate for the column.

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