G
Guest
I am a Delphi programmer who is excited about converting to .Net (however
still novice in .Net), and I need your help to understand some data
manupulation concepts.
I am using
I have a typed DataGrid bound to an access database, which has a table with
2 datetime fields: Date1 and Date2.
I added an unbound column to the grid called ELAPSED, which will diplay the
difference in days between the 2 dates. So the grid looks like this:
DATE1 DATE2 DIFF
------------------------------------------
__/__/____ __/__/____ 999 days
__/__/____ __/__/____ 999 days
__/__/____ __/__/____ 999 days
__/__/____ __/__/____ 999 days
__/__/____ __/__/____ 999 days
I wrote a method to calculate the difference in days (using TimaSpan), and I
want to run this method for each row, as it's been "filled" from the
database. Additionally, I want this method to be run as I change DATE1 or
DATE2 in the grid, so that the it reflects the correct difference in days.
Please help me to achieve this, explaining in what event(s) I should place
the call to my method.
PS: In Delphi I would put it in the TField's OnChange event...
Thank you very much!!!!!
- Gus
still novice in .Net), and I need your help to understand some data
manupulation concepts.
I am using
I have a typed DataGrid bound to an access database, which has a table with
2 datetime fields: Date1 and Date2.
I added an unbound column to the grid called ELAPSED, which will diplay the
difference in days between the 2 dates. So the grid looks like this:
DATE1 DATE2 DIFF
------------------------------------------
__/__/____ __/__/____ 999 days
__/__/____ __/__/____ 999 days
__/__/____ __/__/____ 999 days
__/__/____ __/__/____ 999 days
__/__/____ __/__/____ 999 days
I wrote a method to calculate the difference in days (using TimaSpan), and I
want to run this method for each row, as it's been "filled" from the
database. Additionally, I want this method to be run as I change DATE1 or
DATE2 in the grid, so that the it reflects the correct difference in days.
Please help me to achieve this, explaining in what event(s) I should place
the call to my method.
PS: In Delphi I would put it in the TField's OnChange event...
Thank you very much!!!!!
- Gus