web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Read only grid as a de...
Power Apps
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?

I have the same question (0)
  • eleung83 Profile Picture
    232 on at

    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 421

#2
WarrenBelz Profile Picture

WarrenBelz 386 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 339 Super User 2025 Season 2

Last 30 days Overall leaderboard