Tuesday 13 August 2013

Dynamic Connection Strings

Connection is one of the core properties of DataGrid and DetailsView controls. From release 4.1.2311.5146, users can specify dynamic connection strings in the DataGrid control. The connection string can be derived from these 3 sources :

1.  Connection
  • Contains a list of available connections as specified in ConfigSettings --> Connections
2. Custom Setting
  • Contains a list of available Custom Settings as specified in ConfigSettings --> CustomSettings
  • Example of a connection string definition in CustomSettings :
3. SQL Query
  • Store the connection strings in a database table.
  • Write a SQL Query to return the value from database
  • Example :

Tips :
**Query must return only 1 connection string
**You can also use this feature in Dropdown columns in DataGrid

Link DataGrid and DetailsView validations to Button control

Before release 4.1.2311.5146,  data in DetailsView and DataGrid controls are only validated when used with the 'Save and Cancel' buttons. That means, users would have to write custom validations if they wish to use a Button control. Now, you can link standalone buttons to DataGrid and DetailsView validations using the 'ApplyValidationsButton' property. Here's how it works:

1. Create an editable DataGrid.
2. Create a Validation. In this example, I am adding a Required Field Validator.
3. Select the Validation in the DataGrid column.

4. Add a button. Select the button in the 'ApplyValidationsButton' property. This links the button to the DataGrid validation.

Results :
1. The actions on the button will not be executed if any of the validations fail.

Tips :
** This feature also works for Required Field validation in DetailsView dropdown.

Monday 12 August 2013

Stadium 4.1.2311.5146 is available

Stadium 4.1.2311.5146 is available for download from the Twenty57 website. It includes the following:

New features
  • Dynamic connection strings have been implemented on grids and drop downs in grids. You can now read your connection string from a Db or constant, not only from a fixed value in your config file.
  • Parameters can be passed through to an external page via the URL Viewer.
  • Validations on grids and details view can now be executed by a stand-alone button on the page. There is a new property on the Data Grid and Details View, ApplyValidationsButton. Specify which button on the page should be used to execute the validations. This means that one button can verify the validations on multiple grids and details views.
  •  Install changes:  You can test the DB connection during the install and we will check if the DB already exists when a clean install is done. If it already exists on the server specified we will update it, if we can't find it we will try to create it.
Bug Fixes
  • Export to Excel within a decision is now working
  • Using & in a text filter no longer gives an error
Many thanks to Ryan for all the development work done and Dina for all the testing!

Note: You will need to upgrade your SAP files by opening them in the Designer and saving them.