473,511 Members | 14,990 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

datagrid design question

JJ
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
Nov 19 '05 #1
4 1641
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

Nov 19 '05 #2
JJ
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


Nov 19 '05 #3
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


Nov 19 '05 #4
Check out this article, here i have explained how you can add and update the
datagrid at same time.

Editing and Inserting Multiple Rows at Once:
http://www.microsoft.com/india/msdn/...Questions.aspx

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"JJ" <JJ@discussions.microsoft.com> wrote in message
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


Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1046
by: Tom S | last post by:
Whenever I put a DataGrid onto an ASP page that has C# code-behind, the code-behind method for DataGrid_SelectionChanged() doesn't fire off unless I've double clicked the DataGrid in design view...
2
2705
by: SammyBar | last post by:
Hi, I'm trying to bind a custom collection class to a data grid, following the guidelines from the article http://msdn.microsoft.com/msdnmag/issues/05/08/CollectionsandDataBinding/default.aspx....
2
3251
by: magister | last post by:
Hello, I have xml like this.... <test> <question>sdfsa</question> <section><question>43ga</question> <question>asdf</question> </test>
3
2529
by: Diego TERCERO | last post by:
Hi... I'm working on a tool for editing text resources for a family of software product my company produces. These text resources are found in a SQL Server database, in a table called...
1
1110
by: Peter | last post by:
Hello, Thanks for reviewing my question. I hope this is a simple question. I would like to know if I have a datagrid attached to a dataset, which in turn is associated with a table, is there a...
1
1481
by: Tom S | last post by:
Whenever I put a DataGrid onto an ASP page that has C# code-behind, the code-behind method for DataGrid_SelectionChanged() doesn't fire off unless I've double clicked the DataGrid in design view...
2
2316
by: Sky | last post by:
Hello: Another question about trying to wring functionality from a DataGrid... Have a DB table of "Contacts" -- 14 or more fields per record Show in datagrid -- but only 5 columns (First,Last,...
4
2108
by: The Alchemist | last post by:
I am having a problem with a dynamically-generated Datagrid. It is important to point out that this problem does not exist with a design-time created Datagrid, but only with a dynamically generated...
0
2065
by: | last post by:
I have a question about spawning and displaying subordinate list controls within a list control. I'm also interested in feedback about the design of my search application. Lots of code is at the...
7
3018
by: Mark B | last post by:
Can someone write some VB.Net example code for me that does this: 1) Creates a gridview control with the results of a SQL stored procedure that has 1 parameter (text) 2) Adds an extra column...
0
7137
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7349
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7074
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7506
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5063
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4734
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3210
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1572
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
445
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.