When a TableView is sorted, the generated SQL statement is available in the AfterGenerateSql event of the C1DataSetLogic component. To configure this component, follow these steps:
- Add a C1DataSetLogic component to your project in the same location as the C1SchemaDef component (usually within a data library project).
- Select C1DataSetLogic1 and set its SchemaComponent property to the C1SchemaDef component.
- Set C1DataSetLogic1's DataSetDef property to the desired data set.
- Create an event handler for the AfterGenerateSql event.
- Set a new breakpoint there:
- In the Debug menu, select New Breakpoint | Break at Function.
- Enter C1DataSetLogic1_AfterGenerateSql in the Function text box and click OK.
- Run the project and expand e{C1.Data.GenerateSqlEventArgs}.
The e.Sql argument contains the generated SQL statement.