You must Sign In to post a response.
  • Category: Windows

    Data Grid view cell calculating values problem

    I am creating windows application using c# 2010, In my application I am using datagridview for billing purpose, here my grid view having 6 cells.

    I am entered first time cell values on 2rd & 3rd cells that time cell calculating values shown on 5th cell. It's correct,

    But again second time I am entered the values on cell 2rd, 3rd & 4th cell that time calculating values shown only 6th cell but calculating results shown on again 5th cell, I want my calculating values shown on 6th cell only. Don't want again 5th cell.

    How to solve this error. Any one give me ideas.
  • #768487
    Hi,

    In you code , your program calculates and shows values in cell 5 whenever you enter 2nd and 3rd cell value.
    This will happen each and every time.
    You can overcome this on change of cell 4 i.e. by checking whether cell 5 has text, then make it blank.

  • #768497
    Hi,

    Refer the below.
    according to my understanding, Try to check the 4th cell value before asigning values in 5th cell/6th cell.
    Make it like if 4th cell value null then assign the calculated value to 5th cell
    else if 4th cell value not null then assign the calculated value to 6th cell(if you have any value in 5th cell, make it as blank)


    Hope this will help you

    Regards,
    SonyShiva
    Never lose hope..You never know what tomorrow will bring


  • Sign In to post your comments