jigar patel

jigar patel

  • NA
  • 93
  • 3.5k

datagrid number take 0 if i open new form

May 18 2017 2:16 AM
hello, 
i create simple two form like student master, teacher master.
in student master use textboxes for studentname, address, city, contact no.
also use buttons for add, save, delete
also use datagridview
 
when i insert value in fields like name ,address, city then click to add button for adding that form data in datagridview. and all ok then save in database.
 
now all ok on multiple entries in student form.
 
 
but problem is in student master form i use button which open teacher master form.
in teacher master form structure same as  student master form.
 
now main problem is entry time of student form i entry some data add in datagridview number is automatically , now if i click buton which is open teacher master,
then i open teacher master and add data in that form.
and move on to this form and when i click add button then datagrid value in number use 0 of starting position.
solve this. 

Answers (1)