en_lang.jpg, 1 kB sk_lang.jpg, 1 kB
English Slovak

      Px Framework - ASP.NET components for rapid development of database applications


Menu:



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:



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