其他分享
首页 > 其他分享> > editable grid on power apps

editable grid on power apps

作者:互联网

Make model-driven app grids (lists) editable using the Editable Grid custom control

In previous releases of Dynamics CRM, users couldn't enter data directly in grids (sometimes called lists) or sub-grids on forms. They had to select the record in the grid to open a form, edit the data, and then save, which required multiple steps. With editable grids, users can do rich in-line editing directly from views and sub-grids whether they're using a web app, tablet, or phone.

Editable grid examples

When editable grids are enabled through the Editable Grids custom control, users can edit most types of fields, including basic Lookup fields and option sets.

Editable grids support:

Make main grids editable

  1. Open solution explorer.

  2. In the Entities list, open the appropriate entity, select the Controls tab, and then select Add Control.

    Add Editable Grids custom control

  3. In the Add Control dialog box, select Editable Grid, and then select Add.

  4. In the Editable Grid row that's added, select the form factor(s) you want to apply the grid to. This makes the editable grid control the default control for the selected form factor(s).

    Editable Grid row with form factor selection

 Note

At runtime, users can toggle between editable grids and read-only grids.

  1. To add a lookup, in the Editable Grid option group, select Add Lookup, and then in the Configure Property "Add Lookup" dialog box:

    1. In the Available Views list, select the view to add the lookup to (for example, select My Active Accounts).

    2. In the Available Columns list, select the lookup column to add (for example, select Primary Contact).

    3. In the Default View list, select the data source for the lookup field.

    4. If you want to limit the records displayed, select the Only show records where check box, and then select your criteria from the list, and then select OK.

      Add lookup in Editable Grid control

  2. If you have a nested grid, select the pencil button for Nested grid view, and then select the entity and view for the nested grid. For the Nested grid parent ID select the relationship for the entities. For example, the ParentAccountID field connects the Account and Contact entities.

     Note

    Nested grids are only available for phones and tablets, not the web.

  3. If you don't want to allow the user to group data by any column in the view (you want to save space, for example), in the Group by Column row, select the pencil button, and then in the Configure Property "Group by Column" dialog box, select Disabled, and then select OK.

     Tip

    This is mostly useful for sub-grids on forms.

  4. If you want to add JavaScript events, select the Events tab, and then select the appropriate entities, fields, and events. More information: Developer Documentation: Use editable grids

    Add events in Editable Grid control

  5. To save your work, select Save on the action bar.

  6. When you're ready to make changes available to your team, select Publish on the action bar.

  7. To test your changes, go to the view you specified in step 5, and then make some in-line editing changes.

Make a sub-grid on a form editable

 Note

  1. Open solution explorer.

  2. Open the form that contains the sub-grid.

  3. Select the appropriate control, and then select Change Properties on the ribbon.

  4. In the Set Properties dialog box, select Controls, select Add Control, and then follow the same steps listed above.

 

标签:sub,power,editable,grids,grid,select,view
来源: https://www.cnblogs.com/lingdanglfw/p/13945418.html