Click here to Skip to main content
15,914,795 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is it poosible to change datatype in datatable or dataset
Posted
Comments
Uday P.Singh 17-Jun-11 3:38am    
are you populating it with data?
Bhaumik Lathia 17-Jun-11 6:26am    
yes
I want to display string data in double field is it possible?
Sandeep Mewara 17-Jun-11 5:07am    
If you add on more on what and why details to your question, you can get better help/.
Bhaumik Lathia 17-Jun-11 5:23am    
There Is a one column in datatabel it is double i want to convert that column in string if is it possible can u give me that code

Filled Datatables do not entertain a change in the schema.

But you can do this:
1.Make a new datatable

2.Use datatable's Clone method to create the datatable with the same structure and make changes to that column.

3.In the end use datatable's ImportRow method to populate it with data.

hope this helps :)
 
Share this answer
 
Comments
Bhaumik Lathia 17-Jun-11 5:23am    
There Is a one column in datatable it is double i want to convert that column in string if is it possible can u give me that code
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900