Click here to Skip to main content
15,888,461 members
Home / Discussions / C#
   

C#

 
AnswerRe: The "EGG" task Pin
Christian Graus12-Sep-07 13:47
protectorChristian Graus12-Sep-07 13:47 
QuestionPC - Ethernet - Ethernet/RS232 changer - µC Pin
suam11112-Sep-07 11:12
suam11112-Sep-07 11:12 
AnswerRe: PC - Ethernet - Ethernet/RS232 changer - µC Pin
Dave Kreskowiak12-Sep-07 13:33
mveDave Kreskowiak12-Sep-07 13:33 
AnswerRe: PC - Ethernet - Ethernet/RS232 changer Pin
Luc Pattyn12-Sep-07 14:31
sitebuilderLuc Pattyn12-Sep-07 14:31 
GeneralRe: PC - Ethernet - Ethernet/RS232 changer - µC Pin
Dave Kreskowiak12-Sep-07 15:01
mveDave Kreskowiak12-Sep-07 15:01 
QuestionTopMost visible and BottomMost visible rows in DataGrid Pin
zaboboa12-Sep-07 10:26
zaboboa12-Sep-07 10:26 
QuestionSend PAGEDOWN Message to DataGrid, when DataGrid does not have focus. Pin
zaboboa12-Sep-07 9:55
zaboboa12-Sep-07 9:55 
QuestionlistBox event - strange behavior [modified] Pin
kboyette12-Sep-07 9:51
kboyette12-Sep-07 9:51 
For simplicities sake I have extracted the following example from a larger app.
I have a simple form that has a listBox (L1) and two textBoxes (T1 & T2) and a submit button (B1). I have created a dataset(D1) that currently only has one table(T1) in it. I use VS's designer to bind the contents of T1 to L1. I then use the Databindings properties of the textBoxes to respectively bind one of the columns of the table (T1) to each. This works fine. It allows me to select an item from L1 and the text in the textboxes change to reflect their respective columns.

Now I added a function to hadle the SelectedIndexChanged event of L1. For the sake of simplicity I just put a MessageBox in the function. When I change the text in one of the textboxes then click the B1 button I have a function that ends the current edit and updates the tableAdapter. The value gets updated in the db. Then something unexpected happens after the update. The SelectedIndexChanged event fires once for every row in DS.T1 (Maybe as the listBox refreshes). Should this happen? I thought the SelectedIndexChanged event only fired when a user clicks on an item in the listbox.

How can I get the SelectedIndexChanged event to only fire when an item in the listbox is clicked?

BTW - I am using VS2008b2

-Kevin


-- modified at 16:11 Wednesday 12th September, 2007
QuestionHelp please! About Listview and .txt file Pin
andredani12-Sep-07 9:38
andredani12-Sep-07 9:38 
QuestionDataGridView update Pin
ss.mmm12-Sep-07 8:59
ss.mmm12-Sep-07 8:59 
AnswerRe: DataGridView update Pin
mertkan6512-Sep-07 20:47
mertkan6512-Sep-07 20:47 
QuestionAdd hyperlink to datagridview column, who can help me? Pin
liujw12-Sep-07 8:31
liujw12-Sep-07 8:31 
AnswerRe: Add hyperlink to datagridview column, who can help me? Pin
Judah Gabriel Himango12-Sep-07 9:10
sponsorJudah Gabriel Himango12-Sep-07 9:10 
AnswerRe: Add hyperlink to datagridview column, who can help me? Pin
Malcolm Smart13-Sep-07 3:19
Malcolm Smart13-Sep-07 3:19 
QuestionConversion Pin
rowdykuttan12-Sep-07 8:03
rowdykuttan12-Sep-07 8:03 
AnswerRe: Conversion Pin
Matthew Cuba12-Sep-07 8:07
Matthew Cuba12-Sep-07 8:07 
GeneralRe: Conversion Pin
Pete O'Hanlon12-Sep-07 8:58
mvePete O'Hanlon12-Sep-07 8:58 
GeneralRe: Conversion Pin
PIEBALDconsult12-Sep-07 9:01
mvePIEBALDconsult12-Sep-07 9:01 
GeneralRe: Conversion Pin
Matthew Cuba12-Sep-07 9:07
Matthew Cuba12-Sep-07 9:07 
AnswerRe: Conversion Pin
Wes Aday12-Sep-07 10:23
professionalWes Aday12-Sep-07 10:23 
GeneralRe: Conversion Pin
Christian Graus12-Sep-07 13:48
protectorChristian Graus12-Sep-07 13:48 
AnswerRe: Conversion Pin
Paras Kaneriya12-Sep-07 20:54
Paras Kaneriya12-Sep-07 20:54 
QuestionCount Decimals Pin
keyboard warrior12-Sep-07 7:23
keyboard warrior12-Sep-07 7:23 
AnswerRe: Count Decimals Pin
Sean Michael Murphy12-Sep-07 7:33
Sean Michael Murphy12-Sep-07 7:33 
AnswerRe: Count Decimals Pin
PIEBALDconsult12-Sep-07 7:57
mvePIEBALDconsult12-Sep-07 7:57 

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.