Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Items from database
» Optimizes
Author Message
s_d_o Offline
Junior Member
**

Posts: 11
Joined: Feb 2010
Post: #1
Items from database
I'm using TouchListBox to make guided search in a table of my database.

I have "Product Table" with the followings information

code, description, brand, Families ,type

and i would to use three steps to show list of brand, list of family (filtered by brand) and list of type (filtered by brand and family)

When the search form is loaded, i query my database for populate the TouchListBox with "list of brands on my product table"

When the user click one item i show second page and than the third

( Brands --> Famils --> Type)

For all page i make query to local sqlmobile database even for "next page" and "previous page" event

It's possible to save the state of TouchListBox avoiding to reload every time the listbox's item ?

Kind Regards
(This post was last modified: 15-03-2010 13:30 by s_d_o.)
15-03-2010 11:54
Find all posts by this user Quote this message in a reply
s_d_o Offline
Junior Member
**

Posts: 11
Joined: Feb 2010
Post: #2
RE: Items from database
any suggestions ?
22-03-2010 18:20
Find all posts by this user Quote this message in a reply
PhillipMorris Offline
Junior Member
**

Posts: 23
Joined: Aug 2009
Post: #3
RE: Items from database
How many rows are in your table ?

Actions speak louder than words
22-03-2010 20:28
Find all posts by this user Quote this message in a reply
s_d_o Offline
Junior Member
**

Posts: 11
Joined: Feb 2010
Post: #4
RE: Items from database
(22-03-2010 20:28)PhillipMorris Wrote:  How many rows are in your table ?

For the first level about 50 records ... second level 30 records
23-03-2010 10:14
Find all posts by this user Quote this message in a reply
Sascha Lange Offline
Administrator
*******

Posts: 298
Joined: Dec 2008
Post: #5
RE: Items from database
You could store 3 List<TouchListItem> lists in memory for each level.

Then you just need to assign the list to the TouchListBox:

touchListBox1.Items = myStoredList;

mirabyte Software-Entwickler / Software-Engineer
23-03-2010 12:30
Find all posts by this user Quote this message in a reply
s_d_o Offline
Junior Member
**

Posts: 11
Joined: Feb 2010
Post: #6
RE: Items from database
(23-03-2010 12:30)Sascha Lange Wrote:  You could store 3 List<TouchListItem> lists in memory for each level.

Then you just need to assign the list to the TouchListBox:

touchListBox1.Items = myStoredList;

mmm...but the Items collection of touchListBox1 is readonly ??
23-03-2010 16:48
Find all posts by this user Quote this message in a reply
Sascha Lange Offline
Administrator
*******

Posts: 298
Joined: Dec 2008
Post: #7
RE: Items from database
Sorry my fault.

With TC2 it will be possible.

With TC 1.x: You could store the information in your own structure and just need to fill the list while changing the filter.

mirabyte Software-Entwickler / Software-Engineer
(This post was last modified: 23-03-2010 17:16 by Sascha Lange.)
23-03-2010 16:59
Find all posts by this user Quote this message in a reply
s_d_o Offline
Junior Member
**

Posts: 11
Joined: Feb 2010
Post: #8
RE: Items from database
(23-03-2010 16:59)Sascha Lange Wrote:  With TC 1.x: You could store the information in your own structure and just need to fill the list while changing the filter.

No problem Sascha, thanks for the reply

Can you post a little example for store information ?
23-03-2010 17:24
Find all posts by this user Quote this message in a reply
s_d_o Offline
Junior Member
**

Posts: 11
Joined: Feb 2010
Post: #9
RE: Items from database
(23-03-2010 17:24)s_d_o Wrote:  Can you post a little example for store information ?

up
31-03-2010 08:42
Find all posts by this user Quote this message in a reply
Post Reply