I save the DataTable that I use for DataSource on the Grid in the session
all the time.
Above the grid I have dropdownlist where the user select an activity to add
the the grid.. and then an Add button beside (this is all separated from the
GridControl). When the user clicks the Add button I add the new activity to
the datatable (based on the session variable I have save from the first
DataBound) and then rebind the grid.
Then Underneath the grid I havea save button for when the user is ready to
save it all into the database.. this means you can add as many rows you want
before you save. And if you realize you are doing it on a wrong week or
something.. you simple don't save:)
In the save Sub... I loop thru the grid and check a bunch of things (have
hidden columns for new or old records in the grid) for each row and save
each row at a time.
Does this help?
/Lars
"JJ" <JJ@discussions.microsoft.com> skrev i meddelandet
news:BB**********************************@microsof t.com...
So what are you using to decide if its a new rec or just an update to a
rec?
Do you have an add button in your details area i would assume instead of
in
the footer?
JJ
"Lars Netzel" wrote:
Why not have ONE grid with textboxes for each value... ?
I have made one myself that does this for a week at a time where you add
activities dynamically and show the totals in the footer
I have 7 textboxes (one for each day) on each row.. works fine.
/Lars
"JJ" <JJ@discussions.microsoft.com> skrev i meddelandet
news:8E**********************************@microsof t.com... > Hi,
>
> I am using a datagrid to display employee time sheets and need a
> running
> total for datagrid.
> So I am wondering since I am displaying totals in footer, should I use
> maybe
> a new datalist or datagrid for new records? So basically have 2 grids
> one
> for
> updates and the other for new records? If so should I use a panel so
> that
> in
> update mode it would hide the new records grid and vice versa? What do
> you
> guys think would look and work the best?
>
> Thanks,
>
> JJ