Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
250
Datagrid dynamic columns and formatting
posted

Hi team

I need to render a XamDataGrid in my WPF application where certain columns are dynamic in nature. the number of such columns may vary depending on the data in the database.

Such columns should have a common group heading. Please refer to below columns in the excel

Month
September December March Specialcase

The number of rows are also not know before hand.

Also certain rows are disabled on possibly a hidden column value. The rows in dark.

Certain cells should be shaded out as necessary

We use MVVM in our project and avoid using code behind wherever possible.

Negative numbers are displayed in red with brackets indicating that there is formatting to be applied

Below is the exact of the grid required.

Request you to please suggest how the below requirement can be achieved.

YTD  TEST Month Total Sub-Total Allocated
AMOUNT Preference September December March Specialcase Distributions   Amount  
Fixed Assets                      
land                         -   Y                         -                            -                         -                         -                         -                         -                         -   1                       -  
buildings                         -   Y                         -                            -                         -                         -                         -                         -                         -   1                       -  
machinery 6,601.77 Y                         -                            -                         -                         -                         -                         -   6,601.77 1                       -  
furniture 2,806.81 Y                         -                            -                         -                         -                         -                         -   2,806.81 1                       -  
tools 9,764.88 Y                         -                            -                         -                         -                         -                         -   9,764.88 1                       -  
real estate                         -   Y                         -                            -                         -                         -                         -                         -                         -   1                       -  
vehicles 9,450,891.35 Y                         -                            -                         -                         -                         -                         -   9,450,891.35 1                       -  
                       
Intangible Assets                      
goodwill                         -   Y                         -                            -                         -                         -                         -                         -                         -   1                       -  
copyrights                         -   Y                         -                            -                         -                         -                         -                         -                         -   1                       -  
                       
Total assets 9,470,064.81                           -                            -                         -                         -                         -                         -   9,470,064.81                         -  
Cash Distribution                      
TIC 10.00   20.00 30.00 40.00 50.00 60.00 70.00 80.00   90.00
Less TGC (2,806.81)                           -                            -                         -                         -                         -                         -   (2,806.81)                         -  
Net Cash Distr (2,796.81)   20.00 30.00 40.00 50.00 60.00 70.00 (2,726.81)   90.00
                       
Other Distribution Amounts                      
Other Non-Assessable Amounts 2,222.00 N                         -                            -                         -                         -                         -                         -   2,222.00 4                       -  
Return of Capital                         -   N                         -                            -                         -                         -                         -                         -                         -   4                       -  
TAP 1,105.60 N                         -                            -                         -                         -                         -                         -   1,105.60 3                       -  
NTAP 1,020.80 N                         -                            -                         -                         -                         -                         -   1,020.80 3                       -  
Cash Adjustments                         -                                -                         -                         -                         -                         -                         -      
Total Other Distribution Amounts 4,348.40                           -                            -                         -                         -                         -                         -   4,348.40                         -  
                       
Total Cash Distribution 1,551.59   20.00 30.00 40.00 50.00 60.00 70.00 1,621.59   90.00

Parents Reply Children