473,563 Members | 2,653 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

adding item to listbox

13 New Member
hai

i had 1 prblm of adding item to listbox..

but i succeeded that with the help of datasouce..

but i am not able to modify items in listbox..how can i do that


my coding are


cmd1=new OleDbCommand("S elect Address From Tbl_Address where SI_No=("+textBo x1.Text+")",con );
ad=new OleDbDataAdapte r(cmd1);
DataSet ds=new DataSet();
ad.Fill(ds,"Tbl _Address");
DataView dv=ds.Tables["Tbl_Addres s"].DefaultView;
listBox2.DataSo urce = dv;
listBox2.Displa yMember = "Address";
Jan 31 '07 #1
2 1411
kenobewan
4,871 Recognized Expert Specialist
Here is an FAQ that may help:
ASP.NET FAQ
Jan 31 '07 #2
Sandeep akhare
29 New Member
hi
write this line where you want make changes in the text box control items
ListBox1.Items[index].Text = "Some other value";
index-> means item index in list box
Jan 31 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
3599
by: Paul T. Rong | last post by:
I have a listbox (of product names) control on my form. I want to pass the selected item (a product name) to a subform, and the product unitprice should apear automatically next to the product name in the subform. Is it possible? How do I do this? Thanks in advance. Paul from Slovakia
2
23343
by: John R. | last post by:
I want to have a listbox that shows a checkbox and a textbox. I created a user control that has a checkbox and a textbox in it and have been trying to add it to a listbox but I can't get it to show up for each item I add to the listbox. foreach (Column column in columns) { ColumnsListBox.Items.Add(column.Name);...
1
1886
by: John R. | last post by:
How do I create an item for a listbox? I want to do something like this EXCEPT for a listbox: ListViewItem item = new ListViewItem(); item.Text = column.Name; int height = item.Bounds.Height; listView1.Items.Add(item); I want to use the item's properties for something else.
0
1805
by: John R. | last post by:
I want to add a textbox next to each item in a Listbox on a Windows Form. The items need to be scrollable so I thought that maybe this is possible with an Owner Draw listbox. Searching the web and newsgroups I don't find an example anywhere how I could add a textbox or other control to an Owner Draw listbox. Can someone show me how I'd...
3
2714
by: Ryan Taylor | last post by:
Hello. I have an application where I need the user to be able to add items to a listbox. I've implemented this via javascript. The listbox is an <asp:ListBox>. However, when the user submits the form those items do not get posted. My listbox.Items.Count always returns 0. I want the user to be able to add items without having to resort to...
6
3651
by: Papa.Coen | last post by:
I've just spend a lot of time solving the following problem: I used dotNet 2.0 / Visualstudio 2005 / C# / aspx, enable viewstate is set on all controls. I have 2 listboxes; the left contains items that can be (dynamically) added to the right box. Adding the first item went fine, it shows up in the right box. Adding the second item resulted...
6
1504
by: mrmagoo | last post by:
I'm trying to add an object to a listbox. I'm using a DataReader from a resultset from a stored procedure. It works except when there are NULL in any of the rows. Then I get an error: An unhandled exception of type 'System.InvalidCastException' occurred in microsoft.visualbasic.dll Additional information: Cast from type 'DBNull' to type...
14
18669
by: Paul_Madden via DotNetMonster.com | last post by:
Basically I have a listbox to which I add simple STRING items- I have a progress bar which I increment whenever I populate another portion of the complete set of items I wish to add. What I observe is that as more and more are added, population of the list box takes longer and longer. ie the first 10th of the item set are added much much...
2
2961
by: =?Utf-8?B?TWFobW91ZCBTaGFiYW4=?= | last post by:
i have a problem in adding new listbox items i don't need to allow adding multible items with the same textvalue ex: if current items are: green red
0
7583
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7885
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7948
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6250
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3642
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1198
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
923
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.