Click here to Skip to main content
15,898,938 members

Comments by Member 10012743 (Top 15 by date)

Member 10012743 12-May-13 22:22pm View    
try this method:

in a for loop, add the cell values of the column by incrementing the rowindex.
and assign the value to the cell you need the output.

you can do it automatically by writing the code inside the cell validating event(and dont forget to check the column value)
Member 10012743 7-May-13 8:39am View    
could you send the coding?
Member 10012743 6-May-13 14:31pm View    
instead of :


SqlCommand command = new SqlCommand("select * from subject_table", con);

type:

SqlCommand command = new SqlCommand("select * from table_articles", con);

its would be ok.
just change the values according to your need.
just follow the format or the idea how its been performed.

if you like it use it.
better dont try to copy and paste.
First understand how it is done; so you can do this type of problems by yourself.

-Irshad
Member 10012743 6-May-13 14:27pm View    
try to add this statement before assigning values to listBox1:

listBox1.Items.Clear();

which will clear all the data in listBox1 before assigning new values.
Member 10012743 6-May-13 6:51am View    
or do one thing :

change the event;

private void listBox1_SelectedValueChanged(object sender, EventArgs e)
{

}

try this one:

private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
string url = listBox1.SelectedText;
webBrowser1.Navigate(url);
}