OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – Programming Questions Datagrid td custom attribute

This topic contains 1 reply, has 2 voices, and was last updated by  Hryhorii Hrebiniuk 5 years, 8 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
  • #25576

    Dawid
    Participant

    Hi,
    Im trying to add some custom data attributes for every TD and TR tag in my datagrid.
    I need entity id, field name and some more for my custom js plugin. I dont see any option in yaml configuration that allow this. Only row class can be set. Maybe somebody have any idea?
    I saw that all views are generated by javascript, but didnt I found any option to add attributes without overriding files. Any clues will be appreciated.

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #25577

    Hryhorii Hrebiniuk
    Participant

    Hello @Dawid,

    I’m afraid that there’s no other way, than overriding files.

    Backgrid library, that we use, does not provide the ability to define custom attributes for TD and TR. See http://backgridjs.com/ref/cell.html and http://backgridjs.com/ref/row.html

    But it is easy to overload modules and define required logic.

      configure modules map in your requirejs.yml file

      develop extend for Backgrid.Cell (mybundle/js/extend/backgrid)

      develop extend for Backgrid.Row (mybundle/js/extend/backgrid-row)

Viewing 1 replies (of 1 total)

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

Back to top