Welcome to the Xceed Community | Help
Community Search  

Merging column headers?

Page 1 of 2 (17 items)   1 2 Next >
Sort Posts: Previous Next
  •  09-04-2008, 7:38 AM Post no. 14881

    Merging column headers?

    Hi,

     Is it possible to merge column headers?

    Eg:

    First column header: Employee Name

    Second column header: Contact Number (this column has two sub columns named Home Phone and Work Phone under it)

    Wasn't able to draw the picture here using a table so hope you are able to understand with this example.

     Is such merging/splitting of header cells possible with the Xceed grid? Could someone please help me out as to how to do this?

     

    Thanks,

    Sidharth

    Filed under:
  •  09-04-2008, 8:31 AM Post no. 14883 in reply to 14881

    Re: Merging column headers?

    Although this is not a built-in feature, this sample: http://xceed.com/CS/files/folders/jenny/entry12127.aspx demonstrates how to mimic merged cells.
    Technical Writer - Xceed Software

    In three words I can sum up everything I've learned about life: it goes on.
  •  09-04-2008, 10:13 AM Post no. 14901 in reply to 14883

    Re: Merging column headers?

    Hi Jenny,

     Thanks, will take a look at the code and get back if I have any doubts.

    Sidharth

  •  09-05-2008, 2:13 AM Post no. 14938 in reply to 14883

    Re: Merging column headers?

    Hi Jenny,

    I've added the 4 files in from the URL you listed above..added these to my project and trying to build. However I'm getting the following errors:

    Error     1    The property 'ColumnStretchMinWidth' does not exist in XML namespace 'http://schemas.xceed.com/wpf/xaml/datagrid'. Line 156 Position 40.    \\Visual Studio 2008\Projects\XceedTest\MergedRow.xaml    156    40


     Error    2    The property 'ColumnStretchMinWidth' was not found in type 'FixedCellPanel'.    \\Visual Studio 2008\Projects\XceedTest\MergedRow.xaml    156    40  


    Error    3    The property 'ColumnStretchMode' was not found in type 'FixedCellPanel'.    \\Visual Studio 2008\Projects\XceedTest\MergedRow.xaml    157    40  

    Can anyone help me with this?

    Sidharth

  •  09-05-2008, 5:12 PM Post no. 14959 in reply to 14938

    Re: Merging column headers?

    This sample requires version 3.0.
    Technical Writer - Xceed Software

    In three words I can sum up everything I've learned about life: it goes on.
  •  09-06-2008, 2:04 PM Post no. 14968 in reply to 14959

    Re: Merging column headers?

    Ohh...guess I'm stuck then, I've got version 2.0

    Any chance something like this is possible with 2.0?

    Thanks,

    Sidharth

  •  09-08-2008, 8:24 AM Post no. 14984 in reply to 14968

    Re: Merging column headers?

    You can remove those lines and the example should work since it was originally created for version 2.0.
    Technical Writer - Xceed Software

    In three words I can sum up everything I've learned about life: it goes on.
  •  09-08-2008, 10:46 AM Post no. 15006 in reply to 14984

    Re: Merging column headers?

    I got version 3.0. The solution built successfully, however I'm getting a runtime error:

    System.Windows.Markup.XamlParseException was unhandled
      Message="Cannot find resource named '{mergedRowStyle}'. Resource names are case sensitive.  Error at object 'XceedTest.MergedRow' in markup file 'XceedTest;component/window1.xaml' Line 172 Position 46."
      Source="PresentationFramework"
      LineNumber=172
      LinePosition=46 

    Says it is unable to find mergedRowStyle. I've added the 4 files(MergedRow.cs, MergedCell.cs, Common.xaml and MergedRow.xaml) and changed the namespaces from FileExplorer to XceedTest which is the name of my solution.

    Not sure what's going wrong here, seems like its not able to find mergedRowStyle.

    The line in window1.xaml that's causing the problem is:

                             <DataTemplate>
                                <local:MergedRow Style="{StaticResource mergedRowStyle}" Text="Hello World"/>
                            </DataTemplate>

    Is there anything else I need to do?

    Thanks,
    Sidharth

  •  09-08-2008, 10:48 AM Post no. 15008 in reply to 15006

    Re: Merging column headers?

    mergedRowStyle is contained in the common.xaml file. In this case, you should be including the common.xaml file as a MergedDictionary in the resources of your application so the template has access to it.
    Technical Writer - Xceed Software

    In three words I can sum up everything I've learned about life: it goes on.
  •  09-09-2008, 9:56 AM Post no. 15068 in reply to 15008

    Re: Merging column headers?

    mergedRowStyle is actually present in the MergedRow.xaml file which is a Resource Dictionary. The MergedRow.xaml file references Common.xaml as a MergedDictionary.

    Since both MergedRow.xaml and Common.xaml are added to the solution why is it still unable to find the resource?

    Thanks,

    Sidharth

  •  10-20-2008, 1:25 PM Post no. 16241 in reply to 14883

    Re: Merging column headers?

    Hi Jenny,

    The link you posted - http://xceed.com/CS/files/folders/jenny/entry12127.aspx  - does not work...
    Can you provide us with a link that does work and/or another sample.  This is something I desparately need to be able to do asap.

     

  •  10-20-2008, 1:46 PM Post no. 16242 in reply to 16241

    Re: Merging column headers?

    Attachment: MergedRow.zip
    The link works for me. Are there any errors when you try to access the link? In the meantime, I have attached the file to this post.

    Technical Writer - Xceed Software

    In three words I can sum up everything I've learned about life: it goes on.
  •  10-20-2008, 1:49 PM Post no. 16243 in reply to 16242

    Re: Merging column headers?

    Wierd - it worked now that I'm logged in.  I guess you have to be logged in to see those links.
    Sorry for the confusion and thanks for the post!

  •  10-20-2008, 3:55 PM Post no. 16248 in reply to 16243

    Re: Merging column headers?

    Yes.  You need to be logged in in order to download the samples :)
    Technical Writer - Xceed Software

    In three words I can sum up everything I've learned about life: it goes on.
  •  10-21-2008, 3:35 PM Post no. 16302 in reply to 16243

    Re: Merging column headers?

    Jenny - how would you define and add multiple merged headers.

    For example:

    EMPLOYEE DATA                                         |       CLIENT DATA
    FIRST NAME | LAST NAME | ADDRESS          | FIRST NAME | LAST NAME | ADDRESS

     So what I want is one 'mergedHeaderRow' with two columns that would each span 3 columns.
    The second row would be the original ColumnManagerRow with a header for each column.

    I need a way to define each column for the new merged Header row, and how many real columns each merged column should span?

    Any ideas, and does that make sense?

Page 1 of 2 (17 items)   1 2 Next >
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.