OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM Datagrid with custom Datasource

This topic contains 3 replies, has 2 voices, and was last updated by  Tyler 6 years, 7 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
  • #30726

    Tyler
    Participant

    Hi,
    I’m trying, to create a datagrid with custom source.
    But I did not found the doc about that https://oroinc.com/orocrm/documentation/2.3/reference/format/datagrids#source

    the type of data source. Currently, the only available types are orm and search, but you can also implement your own data source. Each data source may come with its own options to configure how the data is fetched.

    So try something :
    create my service with the tag

    Then call the type in datagrid.yml

    My serice :

    But it’s not seem enter into my RewardPointDatasource. May there are something to do to call this, like a listener or ?
    Have you got an example ?

    Thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #30727

    vseniuk
    Participant

    Hi Tyler,

    I reproduced all your steps. As a example:

    service:

    class with DatasourceInterface:

    datagrid:

    and have such results:
    Datagrid

    You can find some useful information in DatagridBundle documentation

    Please, make sure that you don’t have any typo, and yours DataGrid is called on the page

    #30728

    Tyler
    Participant

    vseniuk,

    Thx for the answer.
    Now I got this error :

    I got this in my twig :

    It’s seem, oro want something else, like the entity name.
    But I do not know what and why, because it’s a dynamic datagrid, so I parse an array.
    I will try with the array type.

    #30729

    Tyler
    Participant

    It’s ok, I resolved my issue.

    I had got an error in my doctrine action.
    Then in my twig, I just put this :

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

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

Back to top