www.proxima-soft.sk Forum Index www.proxima-soft.sk
Px Framework - ASP.NET components for rapid development of database applications
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How can I filter out data from PxWebQuery components?

 
Post new topic   Reply to topic    www.proxima-soft.sk Forum Index -> PxWebQuery - component to load the data from database
View previous topic :: View next topic  
Author Message
Peter



Joined: 09 Feb 2012
Posts: 27

PostPosted: Wed Feb 15, 2012 2:22 pm    Post subject: How can I filter out data from PxWebQuery components? Reply with quote

How can I filter out data from PxWebQuery components?
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 08 Feb 2012
Posts: 32

PostPosted: Wed Feb 15, 2012 2:25 pm    Post subject: Selection of multiples row that match the selection criteria Reply with quote

Selection of multiples row that match the selection criteria


The PxWebQuery component allows also to select more than one row, if it is possible due to the selection criteria .
The wquAdresar.DataSource () command returns the DataTable object. The DataTable object supports selection, row selection. For more information please refer to the example below:

Code:
         //Statement IDs lines that match selection criteria
         DataRow[] dr = null;
         dr = wquAdresar.DataSource().Select("name like '%a%'", "name");
         ArrayList aList = new ArrayList();
         Int32 iOrdValue = 0;
         for (Int32 iCykl = 0; iCykl < dr.Length; iCykl++)
         {
            //Here are performed DISTINCT
            if (!aList.Contains(dr[iCykl].ItemArray.GetValue(iOrdValue).ToString()))
            {
               aList.Add(dr[iCykl].ItemArray.GetValue(iOrdValue).ToString());
            }
         }
         string s = String.Empty;
         for (Int32 iCykl2 = 0; iCykl2 < aList.Count; iCykl2++)
         {
            s = s + ", " + aList[iCykl2].ToString();
         }
         lblAdresar5.Text = s;


This routine shall bring us the list of all IDs of the rows, which match the selection criteria, in this case, these are the rows, which contain the letter "a" in the text of "name" column.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    www.proxima-soft.sk Forum Index -> PxWebQuery - component to load the data from database All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group