Hi.
I am using an excel file and there is 5 column. One of them has 3 rows of data. And the others 5,7 and 10 rows of data. I mean there are empty rows in some columns. When I display alternately this columns in datagridview, there are showing empty rows too.
I want to count this rows which has data. I mean if a columns has 3 rows of data, I want to "3" number. I hope I could explain.
Loading
thiago costaPosted Sep 26, 2009, 9:58 PM
to count the number of rows..
Hopefully this will work for you. Good luck
private void buttonExecute_Click(object sender, EventArgs e)
{
SQLDataAccess dataAccess = new SQLDataAccess();
dataAccess.Select("Account", "SELECT user_no, login_flag from USER_PROFILE WHERE login_flag=1100");
//dataGridView1.DataSource = dataAccess.Data;
labelCountRows.Text = dataAccess.Data.Rows.Count.ToString() + " Players ON";
}