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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Edit a single row in c...
Power Apps
Suggested Answer

Edit a single row in collection in Gallery

(1) ShareShare
ReportReport
Posted on by 603
Hi,
 
I have a gallery with 3 rows. I need to allow editing of individual rows in gallery which is working fine. I am able to save the data successfully as well. 
 
Can please let me know on how to make the display mode as read only once the particular row is saved?  
 
 
Add button OnSelect
 
Collect(
    yourCollection,
    {
        Name: "",
        Email: "",
        Designation: "",
        Contact: "",
        RandID:Rand()
    }
)
 
Add button Displaymode (to allow only 3 rows to be added)
 
If(
    CountRows(yourCollection) < 3,
    DisplayMode.Edit,
    DisplayMode.View
)
 
Gallery Items property
yourCollection
Gallery Edit icon
UpdateContext({varEditItem: ThisItem})
Displaymode of TextInput in Gallery
If(
    ThisItem.RandID = varEditItem.RandID,
    DisplayMode.Edit,
    DisplayMode.View
)
 
Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,074 Most Valuable Professional on at
    I suspect that setting varEditItem to zero will do the job. You should also do this at Screen OnVisible to initiate the variable as numeric as Blank() can be a number of possible formats.
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee
  • Suggested answer
    Sivaksk147 Profile Picture
    10 on at
    did you try this option ?
     
    If(ThisItem.IsSelected, DisplayMode.Edit, DisplayMode.View)
     
  • Suggested answer
    jpespena Profile Picture
    335 on at
     
    Add this at the end of the Save and Delete button functions to make the local variable blank:
    UpdateContext({varEditItem: Blank()})
     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 339 Most Valuable Professional

#2
11manish Profile Picture

11manish 180

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard