Click here to Skip to main content
15,889,651 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to select each line of a textbox separately like click a button. Suppose, every line have a word, I want to do some operation of this word separately. But I don't. Now what have I do?
Posted

Your best bet would be use a Listbox and then have a list of words to interact with.
 
Share this answer
 
Comments
Member 8454009 9-Mar-12 10:16am    
I can use datagridview for searching a column from a database by the following code:

string sql = "select word from database_1";
OleDbCommand vcom = new OleDbCommand(sql, vcon);
DataSet ds = new DataSet();
OleDbDataAdapter da = new OleDbDataAdapter(vcom);
da.Fill(ds, "res");
dataGridView1.DataSource = ds.Tables["res"];
da.Dispose();
vcom.Dispose();

But how can I search a column use listbox from a database?
Well, if you have a multiline textbox, go to MouseClick event and use the MouseEventArgs e, you can get the X and Y value.

Is this what you want? Hope it helps.

Regards, Felipe.
 
Share this answer
 
better you go for listboxes..........
 
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