المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : autogenerate number in datagridview



C# Programming
06-08-2009, 12:22 PM
Hello Experts!!

As we all know that we have to include a item number whenever i add in 1 item into the datagrid.
eg.
ItemNo Name Address
1. Mary Canada
2. John USA
i have included an Item no column in my datagrid but i dont know how can i make it work. i want to increment the item no by 1 everytime i add in a new record. but after when i exit the form and come back again. the item no will start at 1 again, it will not continue on with the last number. i will "reset" and start from 1 again. Hope someone will be able to help me!
Any doubts, you can clarify with me. hope i managed to explain what i want to do.