Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Clearing combo box value

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-18-2008, 05:20 AM
Senior Member
 
Join Date: Mar 2008
Location: Dhaka, Bangladesh
Posts: 164
Default Clearing combo box value

I have added 2 combo boxes in a form. 2nd combo box shows a range of values say 1 to 10 when a value (1) in 1st combox is choosen, similarly it shows another range of values say 11 to 20 when another value (2) in 1st combo box is clicked. this is ok. For 1 in 1st combo box 10 was choosen in the 2nd combo box but when 2 is choose in the 1st cmobo box the 2nd combo box still shows 10, I want it should be blank.since for 2 in the 1st combo box the range of 2nd combo box starts from 11 to 20.

can any one have an idea how to do the same?

in anticipation for help and thanks.
Reply With Quote
  #2 (permalink)  
Old 03-18-2008, 08:10 AM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 4,463
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

Hello mozaharul

I have joined a small example of your question.
With two comboboxes initialized at the beginning.

If you select 1 in Combobox1,
Combobox2 is initialized with values 11 to 20

If you select 2 in combobox 1,
Combobox2 is initialized with values 21 to 30, and 21 is preselected with
Combobox2.SelectedIndex=0

If now you select 1 in combobox 1 again,
Combobox2 is initialized with values 11 to 20
but the value 21 in Combobox2 remains because no Item was initialized.

The first initialization of the two Comboboxes, are different.

Combobox1 has a selected Item and displays 1

Combobox2 doesn't have selected Item and displays nothing.

After initializing a combobox you must select an default item.

Best regards
Klaus
Switzerland
Attached Files
File Type: sbp TestCombobox.sbp (1.0 KB, 17 views)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Clearing a combobox's text area in code Ricky D Questions (Windows Mobile) 6 10-02-2008 09:31 AM
Autocomplete combo box??? Ricky D Questions (Windows Mobile) 9 09-11-2008 06:03 AM
Cut and Paste & Clearing a table bish0p Questions (Windows Mobile) 7 09-02-2008 12:55 PM
Area Selection by combo boxes mozaharul Questions (Windows Mobile) 4 04-30-2008 04:36 AM
Can't set SelectedIndex of a combo box willisgt Questions (Windows Mobile) 12 09-21-2007 04:25 PM


All times are GMT. The time now is 09:00 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0