Sk   En  
 
 
 
 
 
 
 
 

Components of Px Framework:


Loading values from the PxWebQuery component via the while cycle



If you want to load some values for all rows in the PxWebQuery component, you can do it via the while cycle. This way of working with the PxWebQuery component is very similar to working with the TTable components in Delphi programming language. There are two possible ways of loading data. The first way is to download from the first line to the last. The second method of loading is from the last line to the first line.
Further here there is an extract of the code where the values are loaded from the first to the last row and the result is then assigned to the Label component.


         wquAdresar.First();
         string s=String.Empty;
         while (!wquAdresar.Eof())
         {
            s = s+", "+wquAdresar.Fields["name"].ToString();
            wquAdresar.Next();
         }
         lblAdresar.Text = s;

The other example contains an extract of the code where the values are loaded from the last to the first row and the result is then assigned to the Label component.


         wquAdresar.Last();
         s = String.Empty;
         while (!wquAdresar.Bof())
         {
            s = s + ", " + wquAdresar.Fields["name"].ToString();
            wquAdresar.Prior();
         }
         lblAdresar2.Text = s;

The wquAdresar.Eof () command returns true value if the Next () command cannot move us to the next following row. Similarly, the wquAdresar.Bof ()command returns the true value if the Prior () command cannot move us to the previous row , because we are already on the first row.


Here is a functional example of the PxWebQuery component, even with source code. This functional example on this site runs on MySQL 5.0 database.

No. Example Name Source Codes SQL Script
3.1.1
-10.
Adresar.aspx
Adresar.aspx.cs
SQLScript_MySQL.5.1
SQLScript_MySQL.5.0



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

 
  PxWebQuery
  PxSuperGrid
  PxEdit
  PxComboBox
  PxCheckBox
  PxJSDatePicker
  PxDbNavigator
  PxLabel
  PxFlyComboBox
  PxGreatRepeater
  PxChart
  PxUploader
  PxFilterView
  PxCheckBoxList
  PxRadioButtonList
  PxLogin
 
 
  AddParamKey()
  AddParamWebQuery()
  AddParamGreatWeb...
  AddParamCheck()
  AddParamFlyCombo...
  AddParamCheckList()
  AddParamRadioList()
  AddParamValidation()
 
 
  AddParamFilter()