954,593 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Perform Calculation in Gridview itemtemplate

I want to perform calculation in gridview :NetAmount=(ServiceAmount*Quantity)*Discount
I had written code in rowdatabound but it is not working,i amnew to programming help me solve this proble i would appreciate if some one share ther knowledge my Axpx code is:




_____________________________________________________________

My cs code is;


//TextBox TxtServiceCode = GridView1.Controls[0].Controls[0].FindControl("TxtServiceCode") as TextBox;
//DataSet dss = new DataSet();
//SqlConnection MyConnection = new SqlConnection("server=prog;database=mydatabase;UID=sa;PWD=nato123;");
//SqlCommand sqlcmd = new SqlCommand("select * from [ServiceCode]", MyConnection);
//SqlDataAdapter adp = new SqlDataAdapter(sqlcmd);
//DataSet ds = new DataSet();
//adp.Fill(ds);
//GridView1.DataSource = ds.Tables[0];
//GridView1.DataBind();

saikumars
Newbie Poster
4 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: