Skip to content

igx-grid column alignment

New Discussion
Michael Dahm
Michael Dahm asked on Aug 29, 2023 3:15 PM

Hello,

I am faced with a requirement to align the content of a specific cell and its corresponding header to the right side of the igx-grid.

Like this:

After going through the documentation and exploring various options within the igx-grid configuration, I haven’t been able to identify a direct method to achieve this specific alignment requirement. I understand that the igx-grid offers a lot of customization options, but I’m uncertain if aligning individual cells and headers to the right side is directly supported out-of-the-box.

If this functionality is not currently supported, I would like to request it as a potential feature enhancement for a future release. Aligning content and headers to the right side can greatly improve the visual and functional aspects of certain data presentations.

If there are any workarounds, CSS techniques, or code snippets that could assist me in achieving this alignment, I would greatly appreciate your assistance in providing that information.

Thank you very much for your time and attention to this matter. I look forward to your response.

Sign In to post a reply

Replies

  • 0
    Teodosia Hristodorova
    Teodosia Hristodorova answered on Aug 29, 2023 11:03 AM

    Hello,

    I have been looking into your question and what I could say is that by design the string columns are aligned to the left and the number columns to the right similar to the Excel behavior.

    However, the alignment could be changed on application level by defining a header template in order to apply a proper CSS class and setting the required column cellClasses property to the same class as follows:

     
          
            
    {{ column.header ? column.header : column.field }}

      .rightAlign{
        text-align: end;
        justify-content: end;
      }

    A small sample where the first column alignment is changed could be found here. Please test it on your side and let me know if I may be of any further assistance.

    Sincerely,
    Teodosia Hristodorova
    Software Developer

    • 0
      Michael Dahm
      Michael Dahm answered on Aug 29, 2023 2:14 PM

      Thank you! Im going to try this as soon as possible.

      • 0
        Teodosia Hristodorova
        Teodosia Hristodorova answered on Aug 29, 2023 3:15 PM

        Hello,

        Please take your time and let me know if I may be of any further assistance.

        Regards,
        Teodosia Hristodorova
        Software Developer

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Michael Dahm
Favorites
0
Replies
3
Created On
Aug 29, 2023
Last Post
2 years, 6 months ago

Suggested Discussions

Created by

Created on

Aug 29, 2023 3:15 PM

Last activity on

Feb 25, 2026 9:30 AM