Components of Px Framework:
The "ReOpen" procedure of the PxWebQuery component and data re-load into the PxWebQuery component
If you want to reload data to the PxWebQuery component, to carry-out the
so-called "refresh", you do not have close and open the PxWebQuery component,
you can do it via the "ReOpen()" procedure.
The "ReOpen()" procedure is very fast, and it is recommended to use
the procedure during the change of the SQL command. Please refer to the example below:
protected void Page_Load(object sender, EventArgs e)
{
if ((!IsPostBack)&&(wquAdresar.Active==false))
{
wquAdresar.ConnectString = "User Id=adr;Password=aa;Data Source=xe;";
wquAdresar.SQLSelect = "select idadresar , name, address, create_date from Adresar";
wquAdresar.Open();
}
else
{
wquAdresar.SQLSelect = @"select idadresar , name, address, create_date
from Adresar where name like 'a%'";
wquAdresar.ReOpen();
}
grdAdresar.PxDataSource = wquAdresar;grdAdresar.DataBind();
}
Another case is the automatic refresh, which can be run in the background of the PxWebQuery component.
The PxWebQuery can perform during its operation an automatic background refresh and update of the table data contents.
This refresh can be turned on by setting the AutomaticRefresh property value to true.
It is possible to specify the interval value in seconds in the IntervalQueryRefresh property.
After the expiration of the interval since the last loading or refreshing of the data,
the new data refresh of the PxWebQuery component shall be carried out.
If no value is specified in the IntervalQueryRefresh property,
the default value of 120 seconds shall be used, i.e. the automatic refresh shall be carried out every two minutes.
wquAdresar.Open();
wquAdresar.AutomaticRefresh = true;
wquAdresar.IntervalQueryRefresh = 180; //in seconds
Others articles of Px Framework:
- PxWebQuery - component for working with databases
- PxSuperGrid - component for the direct display of data in the table
- PxEdit - component for data editing, similar to the TextBox component
- PxComboBox - component for selecting data from a list, similar to the DropDownList component
- PxCheckBox - component for checking the value (Check / UnCheck value)
- PxFlyComboBox - set of the consecutively linked comboboxes, suitable for the work with structured data (for example: selection of category and subcategory)
- PxGreatRepeater - component for entering data with repeating structure, maximum number of values is limited
- PxJSDatePicker - component for the date entry, based on the JavaScript
- PxDbNavigator - the component for the work with the PxWebQuery components, row cursor movement, etc.
- PxLabel - component for data display
- PxCheckBoxList - component to view and select values from the list
- PxRadioButtonList - component for view and selection of a value from the list
- PxChart - the component for displaying and working with charts
- PxFilterView - visual component for filtering the table data contents in the PxWebQuery component
- PxUploader - component for uploading binary and text files to the server
- PxLogin - component for authorization and logging into the application
- Data loading from the Oracle, MSSQL, MySQL, FireBird, Interbase database by means of the PxWebQuery components
- Program inserting, editing or deleting of row into the database by means of the PxWebQuery component
- Loading values from the PxWebQuery component via the while cycle
- Row search in the PxWebQuery component according to the value entered and the name of the column where the search shall be carried out
- The "ReOpen" procedure of the PxWebQuery component and data re-load into the PxWebQuery component
- Validation, checking of the entered values by means of the PxWebQuery component and other visual components (PxEdit, PxComboBox, etc.)
- Events of the PxWebQuery component
- A special function GetValueFromStructKey of the PxWebQuery component
- Setting the language mutation of the Px Framework
- Finding the current version of the Px Framework
It doesn't the intention of this part website, describe in detail the work with PxFramework components, a detailed description of the component
available in manual, which can be downloaded here:
Download manual of Px Framework