Click here to Skip to main content
15,905,028 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: length of URL Pin
albCode20-Jul-06 1:15
albCode20-Jul-06 1:15 
GeneralRe: length of URL Pin
psamy20-Jul-06 1:21
psamy20-Jul-06 1:21 
GeneralRe: length of URL Pin
albCode20-Jul-06 2:12
albCode20-Jul-06 2:12 
QuestionHow to run asp.net? Pin
asprajesh20-Jul-06 0:54
asprajesh20-Jul-06 0:54 
AnswerRe: How to run asp.net? Pin
Paddy Boyd20-Jul-06 0:58
Paddy Boyd20-Jul-06 0:58 
AnswerRe: How to run asp.net? Pin
Jerry Hammond20-Jul-06 3:08
Jerry Hammond20-Jul-06 3:08 
QuestionNeed Guidline for Certification Pin
Sandeep Akhare20-Jul-06 0:52
Sandeep Akhare20-Jul-06 0:52 
AnswerRe: Need Guidline for Certification Pin
Paddy Boyd20-Jul-06 1:34
Paddy Boyd20-Jul-06 1:34 
GeneralRe: Need Guidline for Certification Pin
Sandeep Akhare20-Jul-06 1:42
Sandeep Akhare20-Jul-06 1:42 
GeneralRe: Need Guidline for Certification Pin
Malcolm Smart21-Jul-06 2:45
Malcolm Smart21-Jul-06 2:45 
GeneralRe: Need Guidline for Certification Pin
Paddy Boyd21-Jul-06 2:46
Paddy Boyd21-Jul-06 2:46 
AnswerRe: Need Guidline for Certification Pin
Jerry Hammond20-Jul-06 3:16
Jerry Hammond20-Jul-06 3:16 
QuestionSpell Check. Pin
Vipin Venugopal20-Jul-06 0:12
Vipin Venugopal20-Jul-06 0:12 
AnswerRe: Spell Check. Pin
minhpc_bk20-Jul-06 8:03
minhpc_bk20-Jul-06 8:03 
AnswerRe: Spell Check. Pin
Dustin Metzgar20-Jul-06 8:06
Dustin Metzgar20-Jul-06 8:06 
QuestionHow to get silent post back field values Pin
Sayed Muhammad Imran20-Jul-06 0:06
Sayed Muhammad Imran20-Jul-06 0:06 
AnswerRe: How to get silent post back field values Pin
Paddy Boyd20-Jul-06 0:55
Paddy Boyd20-Jul-06 0:55 
GeneralRe: How to get silent post back field values Pin
Mohammed Amine20-Jul-06 2:45
Mohammed Amine20-Jul-06 2:45 
QuestionHow to calculate amount in datagrid. Pin
ypsyong19-Jul-06 23:47
ypsyong19-Jul-06 23:47 
AnswerRe: How to calculate amount in datagrid. Pin
_AK_19-Jul-06 23:53
_AK_19-Jul-06 23:53 
GeneralRe: How to calculate amount in datagrid. Pin
ypsyong20-Jul-06 0:03
ypsyong20-Jul-06 0:03 
GeneralRe: How to calculate amount in datagrid. Pin
_AK_20-Jul-06 0:17
_AK_20-Jul-06 0:17 
here is the sample code which will help you:

public void dg_OnItemDataBound(object sender, DataGridItemEventArgs e)<br />
		{<br />
			if(e.Item.ItemType==ListItemType.Item || e.Item.ItemType==ListItemType.AlternatingItem)<br />
			{<br />
				DataRow drv = e.Item.DataItem;<br />
				Label lbl = (Label)e.Item.FindControl("lblValue");<br />
				lbl.Text = drv["Quantity"].ToString() * drv["Unit Price"].ToString();<br />
				DropDownList dd = (DropDownList)e.Item.FindControl("ddl");<br />
				string str = "javascript:return ValFunc(" + dd.ClientID.ToString() + ");";<br />
				dd.Attributes.Add("onChange",str);<br />
<br />
<br />
			}<br />
		}


Here label control will be there in your datagrid as template column and will display the calculated value.
Also you have to take care about the casting.

Best Regards,
Apurva Kaushal
GeneralRe: How to calculate amount in datagrid. Pin
ypsyong20-Jul-06 0:26
ypsyong20-Jul-06 0:26 
GeneralRe: How to calculate amount in datagrid. Pin
_AK_20-Jul-06 0:30
_AK_20-Jul-06 0:30 
QuestionResxResourceWriter Pin
Spykraft19-Jul-06 22:53
Spykraft19-Jul-06 22:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.