Forums › Forums › OroPlatform › OroPlatform – How do I? Questions › Select All Check Box In Datagrid
This topic contains 6 replies, has 3 voices, and was last updated by Andrey Yatsenko 4 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.
- CreatorTopic
- December 19, 2019 at 7:48 am #41133
Hi Team
How to configure the Select all check box in datagrid.yml. Please Let us know any solution
Thanks and Regards,
Ummar - CreatorTopic
- AuthorReplies
- December 19, 2019 at 12:02 pm #41134
Please clarify your question. A screenshot/mockups of what you are trying to achieve may also help.
December 19, 2019 at 10:29 pm #41138December 19, 2019 at 10:30 pm #41140Please find the datagrids.yml
promotion-partindex-grid:
source:
type: orm
query:
select:
– pind.id
– pind.partindexcode
– pind.partindexlabel
– vo.name
– >
(CASE WHEN (:partindex IS NOT NULL) THEN
CASE WHEN (:partindex MEMBER OF pind.promotions OR pind.id IN (:data_in)) AND pind.id NOT IN (:data_not_in)
THEN true ELSE false END
ELSE
CASE WHEN pind.id IN (:data_in) AND pind.id NOT IN (:data_not_in)
THEN true ELSE false END
END) as hasPartindexfrom:
– { table: IZMOPartReferenceBundle:PartIndex, alias: pind }
join:
inner:
– { join: pind.owner, alias:vo }
– { join: IZMOPartReferenceBundle:EnvironmentMaster, alias: env,conditionType: WITH, condition: env.id = pind.environment}
bind_parameters:
–
name: partindex
default: null
type: integer
columns:
hasPartindex:
label: ‘izmo.promotions.promotion.haspartindex.label’
editable: true
frontend_type: boolean
partindexcode:
label: ‘izmo.partreference.partindex.partindexcode.label’
shortenableLabel: false
partindexlabel:
label: ‘izmo.partreference.partindex.partindexlabel.label’
shortenableLabel: false
properties:
id: ~
sorters:
columns:
partindexcode:
data_name: pind.partindexcode
partindexlabel:
data_name: pind.partindexlabel
filters:
columns:
partindexcode:
type: string
data_name: pind.partindexcode
partindexlabel:
type: string
data_name: pind.partindexlabel
options:
entityHint: partindex
rowSelection:
dataField: id
columnName: hasPartindex
selectors:
included: ‘#appendIzmoprompartindex’
excluded: ‘#removeIzmoprompartindex’- This reply was modified 4 years, 4 months ago by
ummarfarooq87. - This reply was modified 4 years, 4 months ago by
ummarfarooq87.
December 20, 2019 at 12:59 pm #41147If you are asking about how to add “Select All / None / Visible” drop-down to allow users to select multipe records in the datagrid and then perform some action on the selected records – please check https://github.com/oroinc/platform/blob/3.1.17/src/Oro/Bundle/DataGridBundle/Resources/doc/backend/extensions/mass_action.md
December 30, 2019 at 5:12 am #41202Hi Michel,
In this datagrid how to implement the select all optionYAML12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364promotion-partindex-grid:source:type: ormquery:select:- pind.id- pind.partindexcode- pind.partindexlabel- vo.name- >(CASE WHEN (:partindex IS NOT NULL) THENCASE WHEN (:partindex MEMBER OF pind.promotions OR pind.id IN (:data_in)) AND pind.id NOT IN (:data_not_in)THEN true ELSE false ENDELSECASE WHEN pind.id IN (:data_in) AND pind.id NOT IN (:data_not_in)THEN true ELSE false ENDEND) as hasPartindexfrom:- { table: IZMOPartReferenceBundle:PartIndex, alias: pind }join:inner:- { join: pind.owner, alias:vo }- { join: IZMOPartReferenceBundle:EnvironmentMaster, alias: env,conditionType: WITH, condition: env.id = pind.environment}bind_parameters:-name: partindexdefault: nulltype: integercolumns:hasPartindex:label: 'izmo.promotions.promotion.haspartindex.label'editable: truefrontend_type: booleanpartindexcode:label: 'izmo.partreference.partindex.partindexcode.label'shortenableLabel: falsepartindexlabel:label: 'izmo.partreference.partindex.partindexlabel.label'shortenableLabel: falseproperties:id: ~sorters:columns:partindexcode:data_name: pind.partindexcodepartindexlabel:data_name: pind.partindexlabelfilters:columns:partindexcode:type: stringdata_name: pind.partindexcodepartindexlabel:type: stringdata_name: pind.partindexlabeloptions:entityHint: partindexrowSelection:dataField: idcolumnName: hasPartindexselectors:included: '#appendIzmoprompartindex'excluded: '#removeIzmoprompartindex'Thanks and Regards,
UmmarDecember 31, 2019 at 8:32 am #41210To see the “select all” option you have to implement at least one mass action by following the documentation article that Michael shared before.
- This reply was modified 4 years, 4 months ago by
- AuthorReplies
The forum ‘OroPlatform – How do I? Questions’ is closed to new topics and replies.