Currency format in gridview

Hi all,

I am binding gridview at runtime (autogenerated columns true) without using boundfield or template in aspx file. Stored procedure is getting data into datatable and further gridview datasource is being bind with datatable.

I want to apply currency to one of the column in datatable( but I dont want to do this in Stored procedure).

Can you please tell me how can I apply currency to the dynamically created columns of gridview?

Is there any reason behind, if there is no reason then don't try to build the application more complex, my suggestion is use simple boundfield like below and apply DataFormatString what format you want and set HtmlEncode to false.

Though it is dynamically created gridview but still it fires 'rowdatabound' event when data gets attached to its 'data source' property.Try to use that event and check the column name and replace it with the currency signbelow is the code snippet