Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to edit the SqlDataSource connection and query at runtime via wizard by using the SqlDataSourceUIHelper class

$
0
0

This example demonstrates how to use the SqlDataSourceUIHelper class to give the End-User a capability to edit the SqlDataSource component's connection or queries at runtime via wizards.

To execute a connection configuration wizard, call the SqlDataSourceUIHelper.ConfigureConnection method and pass the SqlDataSource component instance to it.
To execute a query editing wizard, call the SqlDataSourceUIHelper.EditQuery method and pass the SqlDataSource component's SqlQuery instance to it. 
Note that it is necessary to refill the SqlDataSource after its connection or query was edited. Use the SqlDataSource.Fill method for this purpose.

Finally, I would like to mention that the SqlDataSourceUIHelper class also provides other wizards that can be used to configure the SqlDataSource component. Please refer to the SqlDataSourceUIHelper Members help topic for more information regarding this.



See also:
Binding to SQL Data
T291969: SqlDataSource - How to change connection parameters at runtime

Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>