Click here to Skip to main content
15,901,666 members
Please Sign up or sign in to vote.
4.50/5 (2 votes)
See more:
Dear All

I have a listbox control in which data comes from table States . Table has only one column . Data is stored like this
C#
PB
HR
CHD
DEL

Now in the form in the listbox control it will display all these 4 records . I want in addition to these Listbox control should display "New" at the end in ListBox , when user click on New it should open a form of New States creation and allow to add a new State , and then update the list box. How is it possible using C#?

Thanks

[EDIT] Unchecked Checkbox 'Plain text only. Ignore HTML tags and entities' [/EDIT]
Posted
Updated 6-Jun-11 5:16am
v2

Just add a row to the source query with 'New' by using a UNION clause.
 
Share this answer
 
Comments
Espen Harlinn 6-Jun-11 17:22pm    
Good idea, my 5
Abhinav S 7-Jun-11 0:17am    
Thank you.
Can you just position a control under the listbox, of type button or textbox? You could even create your own user control that combines these 2 for formatting purposes. This is how I would to it anyhow.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900