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
240
How can I change the OutlineLevel of hierarchical child data?
posted

I have a WebHierarchicalDataGrid with parent and child data that have the same visible column layout.  On the web page I have aligned my columns in the two bands such that they appear like they're in the same column.  This lets me not show column headers on the child band.

When I export the data, I love the fact that the Outline Level causes excel to group the data in a parent / child manner.  However I don't want the exported child data to start in column B.

I can see all the events that can be trapped, but it seems like the column index and other useful properties are all read-only.  How can I push child data over 1 column to the left on every row?

I am using v11.1 of the ASP.Net controls

Thanks!

Parents
  • 7566
    posted

    Hi Philip,

     

    As I can understand you was able to achieve this in the grid and the issue appears only when the grid is exported. Are you using WebExelExporter to export the grid?

    And also would it be possible for you to attach a screenshot of the grid and what is the expected behavior that you need?

     

    Looking forward to hear from you.

     

    Sincerely,

    Georgi Sashev

    Developer Support Engineer

    Infragistics, Inc.

    http://es.infragistics.com/support

  • 240
    Offline posted in reply to Georgi Georgiev

    If you look at the attached screenshot you can see I've expanded the first parent row.  The child rows have been arranged such that they have the same layout and therefore fit under the same column headers.  We really like this functionality.

    When you hit the Export Grid link in the lower right corner, it exports the hierarchical grid using the WebExcelExporter.  Again, this is working great as well.  In order to ensure that the excel output has both parent and child rows, I am using this bit of code:

                foreach (ContainerGridRecord row in whdgSLRDetails.GridView.Rows)
                {
                    row.ExpandChildren();
                }
                weeTransactions.Export(true, whdgSLRDetails);

    The only problem I am having is that the child rows when output to excel are shifted one column to the right, almost as if to show them as indented relative to the parent.  That would be fine if I were outputting the child headers, but since they're the same as the parent headers I just want all the data to line up as it does in the screenshot above.  Here is an example of the excel output highlighting what I'd like to change.

    Please let me know if you have any ideas as to how I can adjust the starting column of these child rows.  Or if you need more info.

    Thanks!

Reply Children