Skip to content
Loading
  • Sreekanth Reddy
    Yes, It will add based on the rows count of the datagridview1 rows.
    If it has 2 rows it'll add 2 & like that. 
  • Laxmidhar Sahoo
    There is a textbox In your statement of  if exist in datagrid value from textbox1 ( column name: bar_code) to increment cell
  • Laxmidhar Sahoo

     
    I dont have textbox for this value.
     
    I post picture
  • Sreekanth Reddy
    Please put debugger and check what value you are getting for the expression "Convert.ToInt32(g1.Cells["kolicina"].Value) + 1;" by using quick watch & Let us know here too.So that we can try on that way.
    because your code seems everything was right.
    Thank you.
  • Laxmidhar Sahoo
    Your code is looking good .But in the foreach loop you may apply a if condition for checking the textbox value with g1.Cells["bar_kod"].Value
  • Not solution