Another datagrid problem

databases Harare, Zimbabwe
  • 15 years ago

    Why can I not cut and paste into this frame?

    Anyway the problem is this: I have a datagrid on which simple totals are performed. The idea is that it performs a bit like a spreadsheet, i.e. anytime there is a new data entry or edit the totals are recalculated.

    But, the only time I can get it to total correctly is when I put breakpoints into the code and step through it. If I run it without breakpoints or as a standalone the latest edit is totally ignored. I can get around this to a certain extent if I click on another row or column and manually call the calcTotals() method. I thought I should force a write of the rset to the database so inserted an .update method into a _afterEdit event for the datagrid. This then called the calcTotals method in a _AfterUpdate event. No joy. I have stepped through all the relevant code and when it comes to doing the totalling the previous value (of the edit) is used despite the new value appearing on the dataGrid (unless of course I click on another cell ).

  • 15 years ago

    Hmm - cut & paste works fine for me - what browser are you using? Exclamation [:)]

    Can I just ask how you're calculating the totals at the moment? ItemDataBound? Directly from the original data source? Or just enumerating the rows in the DataGrid itself?

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“If debugging is the process of removing software bugs, then programming must be the process of putting them in.” - Edsger Dijkstra