Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 743725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:53:48+00:00 2026-05-14T08:53:48+00:00

Here is what I am trying to do. Dynamic Category: Columns can be 0

  • 0

Here is what I am trying to do.

Dynamic Category:

  1. Columns can be 0 or more.
  2. Must contain 1 or more Type Columns.
  3. Will only be displayed if any row contains Type Column data associated with it.

Data Rows:

  1. Will be added Asynchronously.
  2. Will be grouped by a Common
    Category
    column.
  3. Will add a Dynamic Category if it
    does not yet exist.
  4. Will add a Type Column if it does
    not yet exist within its appropriate
    Dynamic Category.

Platform Info:

  • WPF
  • .Net 3.5 sp1
  • C#
  • MVVM

I have a few partially functional prototypes, but each has it’s own major set of problems. Can any of you give me some guidance on this?

Envision this nicely styled. 🙂

    --------------------------------------------------------------------------
    |[  Common Category  ]|[ Dynamic Category  0 ]|[   Dynamic Category N   ]|
    --------------------------------------------------------------------------
    |[Header 1]|[Header 2]|[  Type 0  ]|[ Type N ]|[  Type 0   ]|[  Type N  ]|
    --------------------------------------------------------------------------
    |[Data 2 Group]                                                          |
    --------------------------------------------------------------------------
    |  Data A  | Data 2  ||    Null    |  Data 1  ||   Data 0   |  Data 1   ||
    |  Data B  | Data 2  ||   Data 0   |   Null   ||   Data 0   |  Data 1   ||
    --------------------------------------------------------------------------
    |[Data 1 Group]                                                          |
    --------------------------------------------------------------------------
    |  Data C  | Data 1  ||    Null    |  Data 1  ||   Data 0   |  Data 1   ||
    |  Data D  | Data 1  ||    Null    |   Null   ||   Data 0   |   Null    ||
    --------------------------------------------------------------------------

Edit: Sorting and Paging is not necessary.

I have looked at nested ListViews and DataGrids, dynamically building a Grid. Dynamically building a Grid and leveraging the SharedSizeGroup property seems the most promising strategy, but I am concerned about performance.

Would a better approach be to consider this a dynamic report? If so, what should I be looking at?

Thanks for your help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T08:53:48+00:00Added an answer on May 14, 2026 at 8:53 am

    In my opinion you need a pivot grid control.

    There are good ones at Infragistics and DevExpress

    Edit: but, if you do it manually, I would have something like this (from the top of my head)

    Class Data
       Public Categories() as List
       Public Types() as List
       Public table as list( of row )
    End Class
    
    Class Row
       Public Category as string
       Public Type as string
       Public Group as string
       Public Header1 as string
       Public Header2 as string
       Public cell as string
    End Class
    

    Then I would code a function like: (pseudo-code)

    function AddData( Category, Type, Group, theData )
        1. Search if the Category exist in array of categories, else add it
        2. Search if the Type exist in array of Types, else add it 
        3. add the rec
    end function 
    
    function DisplayData( )
       //show headers
       For each category in data.categories
          For each Type in data.categories
             AddColumn( Category, Type )
          next
       next
       //get the groups
       for each group in (from g in data.table select g.group).distinct
          for each category in data.categories
             for each type in data.types
                cell = (from r in data.table where r.category = category and r.type = type and r.group = group)
                if cell is nothing then
                   addcell("null")
                else
                   addcell(cell)
                end if
             next
          next
       next
    

    I think I left behind the several rows that may have the common category, but you will get the idea.
    It’s not the best in performance, but it is easy to follow.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Programming Student here...trying to work on a project but I'm stuck. The project is
Here's what I am trying to do: typedef enum { ONE, TWO, THREE }
Here's what I'm trying to do, and failing... I have a File model which
Here is what I am trying to do: Given a date, a day of
here's what I'm trying to do : On a page, I would have a
Here's what I'm trying to do : I have an entity Task with a
Here's what I'm trying to do. I'm querying an XML file using LINQ to
Here's a problem I've been trying to solve at work. I'm not a database
Here's the situation: I am trying to launch an application, but the location of
Here's some background on what I'm trying to do: Open a serial port from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.