0

I want to remove or hide this without affecting the export csv. How?

<selectionsColumn name="ids">
    <settings>
        <indexField>k_id</indexField>
        <resizeEnabled>false</resizeEnabled>
        <resizeDefaultWidth>55</resizeDefaultWidth>
    </settings>
</selectionsColumn>        
6
  • Where you want to hide or remove this one? May 17 at 9:29
  • In my layout listing.xml ... I tried commenting it .. It hides the selectionsColumn but when I tried export csv Error Exception #0 (ReflectionException): Class does not exist <!-- <selectionsColumn name="ids"> <settings> <indexField>k_id</indexField> <resizeEnabled>false</resizeEnabled> <resizeDefaultWidth>55</resizeDefaultWidth> </settings> </selectionsColumn> --
    – jsnewbie21
    May 18 at 0:47
  • Can you tell me why you want to hide this column from the grid? May 18 at 4:32
  • Because it is an extra column... I don't need it..
    – jsnewbie21
    May 18 at 5:07
  • This is not extra column, Mass Actions perform on this one. May 18 at 5:59

2 Answers 2

0
  • To remove or hide the specified code without affecting the exported CSV, you can comment out the code by wrapping it in XML comments.

  • This way, the code will be ignored during execution, but it will still be present in the source code for export purposes.

check this code,

<selectionsColumn name="ids" hidden="true">
    <settings>
        <indexField>k_id</indexField>
        <resizeEnabled>false</resizeEnabled>
        <resizeDefaultWidth>55</resizeDefaultWidth>
    </settings>
</selectionsColumn>
4
  • Can you provide me more details on how to do that? I don't exactly get what you mean ... Thanks
    – jsnewbie21
    May 17 at 15:02
  • If you mean like this, it hides the selectionsColumn but when I try the export csv.. Error. Exception #0 (ReflectionException): Class does not exist <!-- <selectionsColumn name="ids"> <settings> <indexField>k_id</indexField> <resizeEnabled>false</resizeEnabled> <resizeDefaultWidth>55</resizeDefaultWidth> </settings> </selectionsColumn> -->
    – jsnewbie21
    May 18 at 0:45
  • check my updated answer. maybe it works
    – Harun
    May 18 at 5:28
  • Element 'selectionsColumn', attribute 'hidden': The attribute 'hidden' is not allowed. @Harun
    – jsnewbie21
    May 18 at 6:15
0

You can try this solutions.

<selectionsColumn name="ids">
   <settings>
     <indexField>k_id</indexField>
     <resizeEnabled>false</resizeEnabled>
     <resizeDefaultWidth>55</resizeDefaultWidth>
     <visible>false</visible> 
   </settings> 
</selectionsColumn>

More information found here : https://developer.adobe.com/commerce/frontend-core/ui-components/components/select-column/

3
  • the selectionsColumn is still visible
    – jsnewbie21
    May 18 at 6:55
  • after above change into file, need to run cache clean, cache flush, upgrade, deploy command and then need to check. May 18 at 9:13
  • yah. done that already.. it is still visible.. btw, this is in the admin. listing.xml view/adminhtml/ui_component/listing.xml
    – jsnewbie21
    May 18 at 10:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.