Please help me I am attaching image.Send me code in C# if u know
thankin
g u
g uKnow the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Dorababu MekaPosted Sep 24, 2012, 7:23 AM
for (int i = 0; i < dataGridView1.Rows.Count; i++)
{
if (dataGridView1.Rows[i].Cells[0].Value == null)
{
DateTime dt = DateTime.Now;
string str = dt.ToString("dd-MM-yyyy-t.\\M");
str=str+"-"+i; // Here you will get like 24-09-2012-P.M-0 if you want to change for 1 means assign I to another variable and increment it by 1
dataGridView1.Rows[i].Cells[0].Value = str;
}
}
Later part if you need to increment it by 1;
arun darlyPosted Sep 24, 2012, 6:20 AM
I want to generate code fore auto generation of number is in the above mentioned type current date and selected shift +1
That is today date is 24-09-12, and if selected shift is A.M then
Number should generate like 24-09-12-A.M-1, 24-09-12-A.M-2, 24-09-12-A.M-3………
thanking you
Dorababu MekaPosted Sep 24, 2012, 5:57 AM