OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – Programming Questions Datagrid custom columns

This topic contains 4 replies, has 2 voices, and was last updated by  thinh2010 7 years, 3 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #34323

    thinh2010
    Participant

    Hi,

    I want to display some custom columns in datagrid.
    I have a list of students, I want to display their score of each course in this datagrid, so the column name must be the course name and data is the score. I searched a lot but didn’t found anything.
    I dont know it is possible or not.

    Do anyone has an ideal?
    Thanks,

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #34324

    Mike Kudelya
    Participant

    Hi

    I think the main table will be students, just join courses and scores tables to it. For example:

    #34325

    thinh2010
    Participant

    Hi Mike,

    Thank for your reply. But my datagrid will display all courses of all students with their score each course.
    So that I need course name as a header column of the table.

    Some thing like:

    #34326

    Mike Kudelya
    Participant

    Hi

    I understood what you want to do. I had similar task. Idea is: you create a datagrid skeleton in datagrid.yml and a listener which dynamically modifies yml structure on ‘build.before’ event. Example you can see at menu ‘Reports & Segments -> Reports -> Accounts -> By Opportunities’. Here is a listener definition, note that event should start with oro_datagrid.datagrid.build.before.[name of your datagrid]. Further the listener and a datagrid skeleton.

    #34327

    thinh2010
    Participant

    aha, that’s all I need. I will give a try. Thank u so much :D

Viewing 4 replies - 1 through 4 (of 4 total)

The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.

Back to top