Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Editable Grid Clicking into control

(0) ShareShare
ReportReport
Posted on by 227

HI,

 

I have an editable gallery. I am using classic controls. Whenever I enter a number in the duration field, the values start fidgeting sometimes. I will have to click into the control, type in the value and then when I move to the next one it disappears. When I go back and click into it and enter it again, it stays. But after  I come back to it in edit mode, some values show and some don't. Does anyone know why this happens? Is it because of the focus ? or something else? 

 

Ex. 

 

NPatel12498_0-1708110088686.png

 

  • NP-18101421-0 Profile Picture
    227 on at
    Re: Editable Grid Clicking into control

    Hi,

     

    I have already have a refresh of the datasource when navigating to screen, still the control value for duration doesn't allow entering a number without clicking into the control multiple times. Is it a lag issue because the per diem rate control doesn't have that issue when I enter in numbers.

  • ANB Profile Picture
    7,075 Super User 2025 Season 1 on at
    Re: Editable Grid Clicking into control

    HI @NPatel12498 , Here you have describe you issue, I wanted to to know end goal that you are looking to achieve in your screen.

     

    As per screenshot, I assume that you want a grid and that too be editable grid. Then whatever changes you are doing in the editable grid, you want to save the changes in one go to data source. Make sure that whenever you patch data to data source, you refresh the data source.

     

    Example: Refresh(DataSource) with this you will get updated data on gallery. Also, Do not add patch code on the OnChange of control which is within the gallery because it might cause performance issues in your app.

     

    Thanks,

    ANB

  • NP-18101421-0 Profile Picture
    227 on at
    Re: Editable Grid Clicking into control

    Hi,

     

    I used this video: https://www.youtube.com/watch?v=76RJyaoW0BQ

     

    My end goal is to stop the value from disappearing randomly when I move onto the next row. It should be a smooth transition from entering one value and the next, but for some reason the cursor will disappear and so will the value within the control and you have to renter it maybe 2-3 times for it to stick.

  • ANB Profile Picture
    7,075 Super User 2025 Season 1 on at
    Re: Editable Grid Clicking into control

    @NPatel12498 That is too much traffic happening. Every time you make change in the control the whole code will fire. Did you followed this video: https://www.youtube.com/watch?v=wI6SHGQ9ATg&t=2117s

     

    What is your end goal? 

     

    Thanks,

    ANB

  • NP-18101421-0 Profile Picture
    227 on at
    Re: Editable Grid Clicking into control

    Hi, 

     

    I used Reza's tuturiol to build this editable grid. It actually has an onchange property where it selects a button.

     

    OnChange for Duration control:

    Select(btnUpdate)

     

    btnUpdate Code:

    Patch('Checklist Details',ThisItem,{
     Title: txtTitle.Text,
     'Event Date': EventDate.SelectedDate,
     'Event Zip': txtEventZip.Text,
     'Required Meals': dpdRequiredMeals.Selected,
     'Event Duration (HH:MM)': Value(txtDuration.Text)//,
     //'Per Diem Rate': Value(txtPerDiemRate.Text)
     //'Per Diem Total': txtPerDiemTotal.Text
     //'Total Attendees': txtTotalAttendees.Value
     });
    If(
     IsBlank(
     LookUp(
     colAddMealsUpdates,
     ID = ThisItem.ID
     )
     ),
     Collect(
     colAddMealsUpdates,
     ThisItem
     )
    );
    UpdateIf(
     colAddMealsUpdates,
     ID = ThisItem.ID,
     {
     Title: txtTitle.Text,
     'Event Date': EventDate.SelectedDate,
     'Event Zip': txtEventZip.Text,
     'Required Meals': dpdRequiredMeals.Selected,
     'Event Duration (HH:MM)': txtDuration.Text,
     'Per Diem Rate':Value(txtPerDiemRate.Text),
     'Per Diem Total': Value(txtPerDiemTotal.Text),
     'Total Attendees': txtTotalAttendees.Value
     }
    );
    ClearCollect(
     colPerDiemRate,
     Table1
    );
    
    With(
     {
     // Perform the lookup once to get the relevant row in collection
     Meals: LookUp(
     colPerDiemRate,
     ThisItem.'Event Lookup:Event Zip Code'.Value = 'Zip Code'
     )
     },
     // Use Switch to determine which value to retrieve
     Switch(
     dpdRequiredMeals.Selected.Value,
     "Breakfast",
     Meals.'Breakfast ',
     "Light Refreshments",
     Meals.'Light Refreshments',
     "Lunch",
     Meals.Lunch,
     "Dinner",
     Meals.Dinner
     )
    )

     

    Duration Default property:

    ThisItem.'Event Duration (HH:MM)'
  • ANB Profile Picture
    7,075 Super User 2025 Season 1 on at
    Re: Editable Grid Clicking into control

    Hi @NPatel12498 , Please make sure that there in no code on OnChange of input text control. Also what the is the default property of the control?

     

    -----------------------------------------------------------------------------------------------------------------------------

    I hope this helps.

    Please click Accept as solution ✅ 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 Thumbs up.👍

    Thanks,
    ANB


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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,702 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,026 Most Valuable Professional

Leaderboard