limit number of joins
Hi
I need to put a limit on the number of joins / number of tables the user can drag in the design pane. So if the user exceeds the max number allowed, there should be an alert for the same,
Thanks
Hi
I need to put a limit on the number of joins / number of tables the user can drag in the design pane. So if the user exceeds the max number allowed, there should be an alert for the same,
Thanks
Thank you for a good question!
This task can be solved by handing the QueryBuilder.DataSourceAdding event in which you can deny the addition of new objects. We will provide the code sample tomorrow.
Meanwhile, you can review the QueryUIEventsDemo project included in the installation project and available on the GitHub.
Hello, Rujuta.
Below are two code samples to deal with this task.
The first approach is to analyse the whole query. This seems a bit overboard, but you can do this only after loading the query from a file, not on each query update.
The second is to handle the QueryBuilder.DataSourceAdding. There you can warn the user on reaching a certain amount of tables in a sub-query, and/or deny adding when this number exceeds a reasonable limit.
The 1st variant:
The 2nd variant: