Forums › Forums › OroPlatform › OroPlatform – How do I? Questions › Datagrid. Totals
This topic contains 6 replies, has 3 voices, and was last updated by shumdok 6 years, 5 months ago.
Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.
- CreatorTopic
- October 17, 2017 at 3:15 am #36508
I have datagrid with configured totals but if I add to the empty datagird record, totals doesn’t appear.
Only when I will update the page I can see totals row.
I’m using version 2.0
Please advise. - CreatorTopic
- AuthorReplies
- October 17, 2017 at 4:52 am #36509
Hi, what datagrid you are using? Can you provide full configuration of this grid if it is your custom grid?
October 17, 2017 at 5:44 am #36510It is my custom grid. There is configuration
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576project-good-grid:source:type: ormquery:select:- projectGood.id- projectGood.quantity- projectGood.cost as totalForItem- projectGood.finishedGoodCost as costPerUnit- projectGood.finishedGoodTitle- finishedGoods.descriptionfrom:- { table: Company:ProjectGood, alias: projectGood }join:left:- { join: projectGood.finishedGoodId, alias: finishedGoods }where:and:- projectGood.projectId = :projectIdbind_parameters:- projectIdcolumns:finishedGoodTitle:label: 'Finished Good Item'frontend_type: stringquantity:label: 'QTY of Units'frontend_type: integercostPerUnit:label: 'Cost per unit'frontend_type: currencytotalForItem:label: 'Total for item'frontend_type: currencydescription:label: Notesfrontend_type: stringproperties:id: ~delete_link:type: urlroute: project_good_api_delete_project-goodparams:- idupdate_link:type: urlroute: project_good.updateProjectGoodparams:- idactions:update:type: dialoglabel: 'Update Project Good Item'link: update_linkicon: pencilwidgetOptions:reload-grid-name: project-good-gridoptions:dialogOptions:title: 'Update Project Good Item'delete:type: deletelabel: Deletelink: delete_linkicon: trashtotals:grand_total:columns:finishedGoodTitle:label: 'Total'quantity:formatter: integerexpr: 'SUM(projectGood.quantity)'totalForItem:formatter: currencyexpr: 'SUM(projectGood.cost)':
October 17, 2017 at 8:28 am #36511Just to be sure you are familiar with the docs – totals .
“if I add to the empty datagird record, totals doesn’t appear” – Can you please describe what record you are adding, do you add this record from the grid page and this grid doesn’t refresh after that?October 18, 2017 at 2:14 am #36512Just to be sure you are familiar with the docs – totals .
Yes.I read the docs and tried the different configuration.
Can you please describe what record you are adding, do you add this record from the grid page and this grid doesn’t refresh after that?
Yes. I have several datagrids on the same page. After I added the record datagrid is refresh but totals row doesn’t appear.
This is button code, which open popup
12345678910111213141516171819{{ UI.clientLink({'dataUrl': path('project_good.add', {projectId: entity.id}),'aCss': 'btn pull-left','iCss': 'fa-plus-square-o','label' : 'Add to Project','dataId': entity.id,'widget' : {'type': 'dialog','multiple' : false,'reload-grid-name' : 'project-good-grid','options': {'dialogOptions' : {'title' : 'Add Finished Good to Project','modal': true,'width': 600}}}}) }}October 19, 2017 at 9:41 am #36513Hi,
I reproduced the issue, added the bug to our backlog.
Thank you!Internal ID: BB-12546
October 20, 2017 at 7:57 am #36514Thanks a lot!
I will be waiting for updating…. - AuthorReplies
The forum ‘OroPlatform – How do I? Questions’ is closed to new topics and replies.