Click here to Skip to main content
15,892,293 members
Home / Discussions / C#
   

C#

 
GeneralThread safety Pin
N a v a n e e t h26-Mar-08 20:04
N a v a n e e t h26-Mar-08 20:04 
GeneralRe: Thread safety Pin
Luc Pattyn26-Mar-08 20:55
sitebuilderLuc Pattyn26-Mar-08 20:55 
GeneralRe: Thread safety Pin
N a v a n e e t h26-Mar-08 21:38
N a v a n e e t h26-Mar-08 21:38 
GeneralRe: Thread safety Pin
Luc Pattyn26-Mar-08 22:09
sitebuilderLuc Pattyn26-Mar-08 22:09 
GeneralRe: Thread safety Pin
N a v a n e e t h26-Mar-08 22:57
N a v a n e e t h26-Mar-08 22:57 
GeneralRe: Thread safety Pin
Luc Pattyn26-Mar-08 23:16
sitebuilderLuc Pattyn26-Mar-08 23:16 
GeneralRe: Thread safety Pin
N a v a n e e t h27-Mar-08 1:00
N a v a n e e t h27-Mar-08 1:00 
QuestionCustomizing a combo box event Pin
steve_rm26-Mar-08 19:48
steve_rm26-Mar-08 19:48 
Hello,

I am creating a mobile 5 application using CF 3.5.

I have a combo box that keeps on firing on the selectionIndexChanged event. I need this event to get an item from the combo box. However, when the combo datasource is set it will fire this. I have resolved this issue with a simple bool test. See code below. However, I have noticed that the event often fires. Its hard to track down what is causing this to fire.

<br />
 //Set to false to prevent pre-firing of selectValue changed event before datasource is set.<br />
this.cboDataSourceSet = false;<br />
this.cboRecentNumbers.DataSource = this.bsRedialedNumbers;<br />
this.cboRecentNumbers.DisplayMember = "Name";<br />
this.cboRecentNumbers.ValueMember = "ID";<br />
this.cboDataSourceSet = true;<br />


<br />
private void cboRecentNumbers_SelectedIndexChanged(object sender, EventArgs e)<br />
{<br />
            <br />
     if (this.cboDataSourceSet)<br />
     {<br />
         //Do something here.              <br />
     }<br />
}<br />


I am thinking of 2 methods to solve this issue:
1) Is there a way to stop the event being fired or a way to track down the event to find what other conditions are causing it to fire?

2) Inherit from the combo box class and add your own SelectionChanged Event. (Can anyone point me in the right direction for doing something like this?).

I would perfer method 2 as I have never done anything like that before. So good for learning something new.

Many thanks for any suggestion and help with this,

Steve
GeneralRe: Customizing a combo box event Pin
leppie26-Mar-08 23:32
leppie26-Mar-08 23:32 
QuestionHow do i plot a point in a slanting line Pin
Laddie26-Mar-08 19:25
Laddie26-Mar-08 19:25 
AnswerRe: How do i plot a point in a slanting line Pin
Christian Graus26-Mar-08 19:36
protectorChristian Graus26-Mar-08 19:36 
GeneralRe: How do i plot a point in a slanting line Pin
Laddie26-Mar-08 19:46
Laddie26-Mar-08 19:46 
GeneralRe: How do i plot a point in a slanting line Pin
Christian Graus26-Mar-08 19:56
protectorChristian Graus26-Mar-08 19:56 
GeneralRe: How do i plot a point in a slanting line Pin
Laddie26-Mar-08 20:26
Laddie26-Mar-08 20:26 
GeneralRe: How do i plot a point in a slanting line Pin
Laddie26-Mar-08 20:57
Laddie26-Mar-08 20:57 
GeneralUpdating content only ( not . exe) on local drive Pin
m1n1me26-Mar-08 17:55
m1n1me26-Mar-08 17:55 
GeneralRe: Updating content only ( not . exe) on local drive Pin
Christian Graus26-Mar-08 18:32
protectorChristian Graus26-Mar-08 18:32 
GeneralRe: Updating content only ( not . exe) on local drive Pin
m1n1me26-Mar-08 18:45
m1n1me26-Mar-08 18:45 
GeneralRe: Updating content only ( not . exe) on local drive Pin
Christian Graus26-Mar-08 19:14
protectorChristian Graus26-Mar-08 19:14 
QuestionHow to convert info from a dataset object into combobox? [modified] Pin
cuongmits26-Mar-08 13:59
cuongmits26-Mar-08 13:59 
AnswerRe: How to convert info from a dataset object into combobox? Pin
Christian Graus26-Mar-08 14:03
protectorChristian Graus26-Mar-08 14:03 
AnswerRe: How to convert info from a dataset object into combobox? Pin
cuongmits26-Mar-08 14:08
cuongmits26-Mar-08 14:08 
GeneralRe: How to convert info from a dataset object into combobox? Pin
cuongmits26-Mar-08 14:33
cuongmits26-Mar-08 14:33 
GeneralRe: How to convert info from a dataset object into combobox? Pin
Gareth H26-Mar-08 23:50
Gareth H26-Mar-08 23:50 
GeneralWoo! Threading! Pin
Jammer26-Mar-08 12:08
Jammer26-Mar-08 12:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.