473,321 Members | 1,748 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,321 software developers and data experts.

Please help not understanding calling function on event?

7
i found this excerpt on another site

to get the sum of a column in gridview u can use the below function
double runningtotal ;
Expand|Select|Wrap|Line Numbers
  1. public void detailsGridView_RowDataBound(object sender, GridViewRowEventArgs e)
  2.    {
  3.    if (e.Row.RowType == DataControlRowType.DataRow)
  4.    {
  5.  
  6.    runningtotal += Convert.ToDouble(DataBinder.Eval(e.Row.DataItem, " type the field name"));
  7.    }
  8.    else if (e.Row.RowType == DataControlRowType.Footer)
  9.    {
  10.        e.Row.Cells[0].Text = "Totals:";
  11.        e.Row.Cells[1].Text = runningtotal.ToString("0");
  12.        e.Row.Cells[0].HorizontalAlign = HorizontalAlign.Right;
  13.        e.Row.Cells[1].Font.Bold = true;
  14.  
  15.    }
  16.    }
Pls don't forget to call the function detailsGridView_RowDataBound on rowdatabound

what does it mean to
Pls don't forget to call the function detailsGridView_RowDataBound on rowdatabound
and how does one do this?
Jul 18 '07 #1
1 1146
l3d007
7
nm guys I figured it out...


have to declare every event in the GridView control like the following:

<asp:GridView ID="gvSearchList" runat="server"
DataSourceID="dsSearchList"
DataKeyNames="ServiceIdea_ID"
OnSelectedIndexChanged="gvSearchList_SelectedIndex Changed">

except for my event
Jul 18 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

72
by: Stephen Poley | last post by:
I have quite often (as have probably many of you) come across HTML forms with irritating bits of Javascript attached. The last straw on this particular camel's back was a large form I was asked to...
1
by: lawrence | last post by:
I'm trying to gain a better understanding of javascript by studying examples. I noticed this in an online tutorial. I don't get the use of "this". >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> You might want...
4
by: John | last post by:
Hi all, I have posted this type of question quite a few times but to date, no-one has actually been able to provide me with a solution. I really need to understand how to do this properly. My...
20
by: BB | last post by:
Hello all, I am trying to override OnPaint in a custom textbox control (so I can drawstring a caption, etc.). In the code below, I get the "painting the form" message as expected, but not the...
2
by: SStory | last post by:
Here is the situation. I want to display Icons, Type of file etc from a file extension. Upon initial program load I may only need icons for certain files. But other operations will require...
3
by: Miguel | last post by:
Hi, I'm new to .NET and am using VB .NET as I am from a VB background. I am having difficulty understanding the way .NET handles, passes and uses objects. I have had a look at the Micrsoft Data...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
4
by: garyusenet | last post by:
The following code was supplied by a kind poster as a solution to a problem i was having. But it's not quite working. I have commented the code myself below. Can you please read my comments to make...
5
by: Stinky Pete | last post by:
Hi (again) ;-) I'm still very much at the bottom of a steep learning curve with VB, so any and all help is always appreciated. I've found some code to generate the user names who have logged...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.