my gridview is displaying following values like this:-
id item_name price
----------------------------------------
1 abc 1231
2 def 2465
but i've to display price with "USD" which is come from web.config file.
so, it should be display like this:-
id item_name price
----------------------------------------
1 abc USD 1231
2 def USD 2465
how can i do that.
please provide me accurate solution.
i need it very urgently.
thanks.
3 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

Santhosh Kumar JayaramanPosted Sep 28, 2012, 1:53 AM
http://humrahimcs.wordpress.com/2010/09/21/how-to-add-currency-symbol-in-gridview-priceamount-column/
Priyank KharePosted Sep 28, 2012, 1:49 AM
because i think it will display an error during addition of price like "usd 1231 + usd 2465"
what will i do to resolve this problem.?
Santhosh Kumar JayaramanPosted Sep 28, 2012, 1:38 AM
before binding the datatable to gridview.
foreach(DataRow dr in datatable1)
{
dr["price"]=ConfigurationSettings.AppSettings["Currency"] + dr["Price"].ToString();
}
and in web.config.