Rank: Member Groups: Member
Joined: 4/6/2008 Posts: 11
|
Hi!
I have a grid inside a CallBackPanel displaying 4 punches per date on a Time and Attendance application. Each punch is a diferent record from the database table. In order to update each record I need two reference values: Punch date, which I already have as the Grid Key value, and the old punch time which is going to be replaced.
How can I recall the old punch time for each modified item in the grid and include it in the update query?
I want to be able to edit various punches from various dates in the grid before saving them to the database. The reason is that after all the changes are made I call a function to make some calculations from different tables and I don't want to do that after each punch modification.
Thanks.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
I am not exactly sure about what a punch really is in your case, but there are two ways for you to store additional data with the Grid:
1. Store multiple values in the Grid's DataKey field. For example, you can do "SELECT field_A + '|' + field_B as field_C" with your SQL and then store field_C in the Grid. Whenver you use the key data, you would split it to get the two individual values;
2. Store additional values into a hidden column. You can add an additional column but set the column's Visible to false. That way the data will be carried along with the Grid, but the column won't be visible to the user;
Hope this helps.
Thanks!
|
Rank: Member Groups: Member
Joined: 4/6/2008 Posts: 11
|
Thanks for your help, I solved it!
|