Skip to main content

Notifications

Power Apps - Microsoft Dataverse
Unanswered

Read only grid as a default view

(0) ShareShare
ReportReport
Posted on by 820

Hi

On Form i add a Subgrid and in this subgrid i add a component Editable grid

The subgrid takes whole new section in the form and when i open this section the default opens editable view which i can switch to view only by selecting Show as-->Read Only Grid

 

Is it posible to make so that the default view of this subgrid is Read Only?

Categories:
  • eleung83 Profile Picture
    eleung83 232 on at
    Re: Read only grid as a default view

    Unfortunately you cannot programmatically switch the grid type yourself (i.e. replicate the Show as button on the subgrid)

     

    What you can do, though, is make each selected row readonly when the user has selected a row, so, even if they are using the editable grid type, you can disable the cells across the selected row using javascript

     

    According to the documentation: https://docs.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference/grids/gridcontrol, you can only get the currently selected view (getViewSelector method) when the grid is a read-only grid, but the editable grid also contains this property and you can can get the currently selected view if the grid is an editable grid as well. I would suggest opening a support ticket to check whether their documentation is up-to-date (because part of the documentation on the link above has not been updated to reflect the latest information e.g. getGridType method from this link does not reflect the current latest information).

     

    If according to their documentation, the information is the latest, then you can instead get the fetchxml of the current view (getFetchXml), and then use that xml to determine whether you want to lock the rows the user selects

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,422

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,711

Leaderboard

Featured topics