Tip #1374: Safely remove search box from subgrid

Today’s tip is from AK. (Be like AK, and send your next awesome tip to jar@crmtipoftheday.com).

Adding a subgrid to model-driven form in the maker portal brings the search box which takes an extra row. If you want to hide it, you may tempt to switch to classic and clear the Display search box.

Don’t do it.

AK

You will lose the jump bar and record/page counter if the subgrid has only one page. Instead:

  • export the solution
  • extract customizations.xml
  • find the grid and add EnableQuickFind node to the subgrid
  • repack the solution
  • import back and publish
<labels>
<label description="contacts fixed via customizations.xml" languagecode="1033" />
</labels>
<control id="sub_contacts_no_search" classid="{E7A81278-8635-4D9E-8D4D-59480B391C5B}" indicationOfSubgrid="true">
<parameters>
  <TargetEntityType>contact</TargetEntityType>
  <ViewId>{73BC2D9B-4E0E-424C-8839-ED59D6817E3A}</ViewId>
  <ViewIds>{00000000-0000-0000-00AA-000010001003},{73BC2D9B-4E0E-424C-8839-ED59D6817E3A}</ViewIds>
  <EnableViewPicker>false</EnableViewPicker>
  <EnableQuickFind>false</EnableQuickFind>
  <RelationshipName>contact_customer_accounts</RelationshipName>
</parameters>
</control>

The end result:

  1. Original subgrid
  2. Subgrid after clearing Display search checkbox in classic UI
  3. Subgrid with EnableQuickFind node inserted manually

Cover photo: LA(Phot) Nicola Harper/MOD / OGL v1.0

3 thoughts on “Tip #1374: Safely remove search box from subgrid

  1. Ross T says:

    Record counts disappear similarly with the use of editable grids, is there a similar xml fix that works to bring it back? Is there an xml diff from doing these changes in classic vs the manual xml update that would show what node changes are being performed extra from the classic editor that might expose that?

  2. Peter says:

    Is there a way to disable from a view?

Leave a Reply

Your email address will not be published. Required fields are marked *