Another datagrid problem

databases Harare, Zimbabwe
  • 11 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 ).





  • 11 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).

Contribute

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.

“Perl - The only language that looks the same before and after RSA encryption.” - Keith Bostic