Data Source. Selecting Event
Occurs before a query is constructed and executed.
public: event EventHandler<System::Web::UI::WebControls::EntityDataSourceSelectingEventArgs ^> ^ Selecting;
public event EventHandler<System.Web.UI.WebControls.EntityDataSourceSelectingEventArgs> Selecting;
member this.Selecting : EventHandler<System.Web.UI.WebControls.EntityDataSourceSelectingEventArgs>
Public Custom Event Selecting As EventHandler(Of EntityDataSourceSelectingEventArgs)
The Selecting event is raised before a query is constructed and executed. Handle the Selecting event to modify the configuration of the EntityDataSource or read or change the arguments from the data-bound control before the query is constructed and executed.
AllowPaging is set to
true in the data-bound control, the EntityDataSource invokes the Skip and Top query builder methods on ObjectQuery<T> using the values of the StartRowIndex and MaximumRows properties of the DataSourceSelectArguments object.
AllowSorting is set to
true in the data-bound control, the SortExpression of the DataSourceSelectArguments object can be changed when the Selecting event is handled. Any other query operators, such as WHERE or ORDER BY, that are specified in the page markup are applied after the Selecting event is raised.