TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Israel
631
1.3k
217.3k
Should sumarize totals's column with blank rows as null or 0
Jan 5 2017 8:30 AM
Hi!
When I make a filter its stuggs or block. Doesnt do the filter. I realize that the my Totals's column have some blank rows. Then how can I do to considerate all blank rows as null or "0".
conn.Open();
OleDbCommand cmd = conn.CreateCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "select * from cadastramento where year= ?";
var param1 = new OleDbParameter("@year", OleDbType.VarChar); // use actual type of 'name' here
param1.Value = cbxYear.Text; // or whatever
cmd.Parameters.Add(param1);
cmd.ExecuteNonQuery();
DataTable dt = new DataTable();
OleDbDataAdapter da = new OleDbDataAdapter(cmd);
da.Fill(dt);
conn.Close();
dGVCons.DataSource = dt;
this.dGVCons.RowsDefaultCellStyle.BackColor = Color.AliceBlue;
this.dGVCons.AlternatingRowsDefaultCellStyle.BackColor = Color.Beige;
int sum = 0;
for (int i = 0; i < dGVCons.Rows.Count; ++i)
{
sum += Convert.ToInt32(dGVCons.Rows[i].Cells["
total_Clothes
"].Value);
lblTotalClothes.Text = " " + sum.ToString();
int sum1 = 0;
for (int i1 = 0; i1 < dGVCons.Rows.Count; ++i1)
{
sum1 += Convert.ToInt32(dGVCons.Rows[i1].Cells["
total_Shoes
"].Value);
lblTotalShoes.Text = " " + sum1.ToString();
Reply
Answers (
6
)
how to restore backup data using asp.net
Programming Logic