Table of Contents

PositionChanging

This rule is triggered before the position in the datasource is changed.
This happens :

  • when a user clicks on a different item in a datagrid
  • when the Position property is changed by code
  • after the Retrieved event rule is executed.

See this article to learn the how Retrieved event rules changes the position.
See this article for more information on event rules execution order.

Arguments

The Arguments property provides the following options.

Name Type Description
Cancel bool If set to true, the position will stay at its current position.
Position int Current position index.
NewPosition int New position index.

Item versus DatasourceCurrent

The Item property does not exist in this rule.

Warning

In a PositionChanging event rule, DatasourceCurrent refers to the item at the initial position, not the one at the new position.

To know more on the difference between the Item and DatasourceCurrent properties in an UI view event rule, you can check this article.