ssossossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

Forums Forums OroCRM Datagrid with custom Datasource

This topic contains 3 replies, has 2 voices, and was last updated by  Tyler 2 months, 3 weeks ago.

  • Creator
    Topic
  • #27718

    Tyler
    Participant

    Hi,
    I’m trying, to create a datagrid with custom source.
    But I did not found the doc about that https://www.orocrm.com/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
  • #27720

    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

    #27722

    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.

    #27723

    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)

You must be logged in to reply to this topic.