473,407 Members | 2,306 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

grid footer summary

Hi to all.
I need to make a grid that sums up columns at the footer.
I have 2 data views one for the grid and one for the summary.
From what i read, i understand that it's not easy to do with the data grid
web control.
So i'm looking for a better way.
Thanks.
Nov 18 '05 #1
4 1086
You can do just about whatever you want in the itemcreated event for the
footer or pager.

"Sharon Tal" <ta*******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi to all.
I need to make a grid that sums up columns at the footer.
I have 2 data views one for the grid and one for the summary.
From what i read, i understand that it's not easy to do with the data grid
web control.
So i'm looking for a better way.
Thanks.

Nov 18 '05 #2
Hi Rick.
Thanks for the idea, it works and its simple.

void Item_Created(Object sender, DataGridItemEventArgs e)
{
if(e.Item.ItemType == ListItemType.Footer)
{
IEnumerator cellEnum = e.Item.Cells.GetEnumerator();

while(cellEnum.MoveNext())
{
TableCell tc = (TableCell)cellEnum.Current;
tc.Text = "some value";
}
}
}

"Rick Spiewak" <ri*********@mindspring.com> wrote in message
news:uV**************@TK2MSFTNGP11.phx.gbl...
You can do just about whatever you want in the itemcreated event for the
footer or pager.

"Sharon Tal" <ta*******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi to all.
I need to make a grid that sums up columns at the footer.
I have 2 data views one for the grid and one for the summary.
From what i read, i understand that it's not easy to do with the data grid web control.
So i'm looking for a better way.
Thanks.


Nov 18 '05 #3
If you want to be sure what column you're working with, I would make the
column a template column, and put a label (or other control of your
choosing) into the footer template. Then, you can find it by ID with
..findcontrol . This also helps if you decide to rearrange your columns, as
you won't be dependent on the ordering!

"Sharon Tal" <ta*******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi Rick.
Thanks for the idea, it works and its simple.

void Item_Created(Object sender, DataGridItemEventArgs e)
{
if(e.Item.ItemType == ListItemType.Footer)
{
IEnumerator cellEnum = e.Item.Cells.GetEnumerator();

while(cellEnum.MoveNext())
{
TableCell tc = (TableCell)cellEnum.Current;
tc.Text = "some value";
}
}
}

"Rick Spiewak" <ri*********@mindspring.com> wrote in message
news:uV**************@TK2MSFTNGP11.phx.gbl...
You can do just about whatever you want in the itemcreated event for the
footer or pager.

"Sharon Tal" <ta*******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi to all.
I need to make a grid that sums up columns at the footer.
I have 2 data views one for the grid and one for the summary.
From what i read, i understand that it's not easy to do with the data grid web control.
So i'm looking for a better way.
Thanks.



Nov 18 '05 #4
Yes i was wondering how to do that.
Thanks again.
"Rick Spiewak" <ri*********@mindspring.com> wrote in message
news:eZ**************@TK2MSFTNGP11.phx.gbl...
If you want to be sure what column you're working with, I would make the
column a template column, and put a label (or other control of your
choosing) into the footer template. Then, you can find it by ID with
.findcontrol . This also helps if you decide to rearrange your columns, as
you won't be dependent on the ordering!

"Sharon Tal" <ta*******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi Rick.
Thanks for the idea, it works and its simple.

void Item_Created(Object sender, DataGridItemEventArgs e)
{
if(e.Item.ItemType == ListItemType.Footer)
{
IEnumerator cellEnum = e.Item.Cells.GetEnumerator();

while(cellEnum.MoveNext())
{
TableCell tc = (TableCell)cellEnum.Current;
tc.Text = "some value";
}
}
}

"Rick Spiewak" <ri*********@mindspring.com> wrote in message
news:uV**************@TK2MSFTNGP11.phx.gbl...
You can do just about whatever you want in the itemcreated event for the footer or pager.

"Sharon Tal" <ta*******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
> Hi to all.
> I need to make a grid that sums up columns at the footer.
> I have 2 data views one for the grid and one for the summary.
> From what i read, i understand that it's not easy to do with the
data grid
> web control.
> So i'm looking for a better way.
> Thanks.
>
>



Nov 18 '05 #5

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

Similar topics

2
by: Galina | last post by:
Hello I have a report, which lists records. Each record has money paid field. Money paid can be 0 or not 0. I calculate and print summary of money for a group in the group footer, as well as...
1
by: GP | last post by:
Hi, I have a requirement for which I need to add a text "Page" before the page numbers of the datagrid. It should look like " Page 1 Page 2 Page 3.......", all these being hyper links. I would...
4
by: sck10 | last post by:
Hello, I have a repeater that is bound to a SQL Server table. I would like to place a summary in the footer for the item count and product cost. I have two fields. One for the product name...
1
by: asharda | last post by:
I have a custom property grid. I am using custom property grid as I do not want the error messages that the propertygrid shows when abphabets are entered in interger fields. The custom property...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.