Click here to Skip to main content
15,891,864 members
Home / Discussions / C#
   

C#

 
GeneralDrag/drop component Pin
Accius5-Dec-07 2:13
Accius5-Dec-07 2:13 
GeneralRe: Drag/drop component Pin
Skippums5-Dec-07 3:33
Skippums5-Dec-07 3:33 
Generalmake Whole Grid Editable Pin
Archana New to Dotnet5-Dec-07 2:08
Archana New to Dotnet5-Dec-07 2:08 
GeneralRe: make Whole Grid Editable Pin
Sathesh Sakthivel5-Dec-07 2:25
Sathesh Sakthivel5-Dec-07 2:25 
GeneralListBox events Pin
Deian5-Dec-07 0:35
Deian5-Dec-07 0:35 
GeneralRe: ListBox events Pin
Jacky Yiu5-Dec-07 0:45
Jacky Yiu5-Dec-07 0:45 
GeneralRe: ListBox events Pin
Deian5-Dec-07 1:04
Deian5-Dec-07 1:04 
GeneralRe: ListBox events Pin
Justin Perez5-Dec-07 2:19
Justin Perez5-Dec-07 2:19 
Deian wrote:
I have looked at both events(ControlAdded and ControlRemoved) prior to my post, the documentation states they are for controls, not items. How to get notified after new item has been added to the listbox ?


I had encountered the same problem before. I couldn't find any such event that was usable. What I ended up doing, while it was extremely generic, was take a collection of all the items in the listbox, and compare the collection and the list, and when the count is different, you can "fire your event." It is pretty simple to find the item that has been added or removed.

Like I said, it is pretty generic and crappy. But, it got the job done. Worked just fine for me.

"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer

I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")

GeneralRe: ListBox events Pin
Deian5-Dec-07 2:36
Deian5-Dec-07 2:36 
GeneralRe: ListBox events Pin
Justin Perez5-Dec-07 2:50
Justin Perez5-Dec-07 2:50 
GeneralBinding Combo box with database Pin
sindhutiwari5-Dec-07 0:29
sindhutiwari5-Dec-07 0:29 
GeneralRe: Binding Combo box with database Pin
Jacky Yiu5-Dec-07 0:40
Jacky Yiu5-Dec-07 0:40 
GeneralSetting Labels text specific to the current system culture . Pin
PranavThakur5-Dec-07 0:08
PranavThakur5-Dec-07 0:08 
GeneralRemove "Delete-Key" on dataGridView Pin
M Riaz Bashir5-Dec-07 0:08
M Riaz Bashir5-Dec-07 0:08 
GeneralRe: Remove "Delete-Key" on dataGridView Pin
dan!sh 5-Dec-07 0:12
professional dan!sh 5-Dec-07 0:12 
GeneralRe: Remove "Delete-Key" on dataGridView Pin
M Riaz Bashir5-Dec-07 0:14
M Riaz Bashir5-Dec-07 0:14 
QuestionVista file access Pin
brain2cpu4-Dec-07 23:39
professionalbrain2cpu4-Dec-07 23:39 
GeneralRe: Vista file access Pin
mav.northwind4-Dec-07 23:49
mav.northwind4-Dec-07 23:49 
GeneralRe: Vista file access Pin
Pete O'Hanlon5-Dec-07 3:16
mvePete O'Hanlon5-Dec-07 3:16 
GeneralRe: Vista file access Pin
David Knechtges5-Dec-07 4:07
David Knechtges5-Dec-07 4:07 
Questionfile operation problem Pin
leovava4-Dec-07 23:17
leovava4-Dec-07 23:17 
GeneralRe: file operation problem Pin
CKnig5-Dec-07 0:47
CKnig5-Dec-07 0:47 
Generalupdate desktop project from web Pin
greekius4-Dec-07 22:36
greekius4-Dec-07 22:36 
GeneralRe: update desktop project from web Pin
Jacky Yiu4-Dec-07 23:47
Jacky Yiu4-Dec-07 23:47 
GeneralLoading treeview from database using BackGroundWorker class Pin
D i x y4-Dec-07 22:34
D i x y4-Dec-07 22:34 

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.