Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey Everyone

I want to Remove Last white spaces of record in data table(row) in c#



pls help me


Thanks
Vishal Jodh
Posted
Updated 20-Nov-12 23:05pm
v2
Comments
choudhary.sumit 21-Nov-12 5:00am    
post your code.. how u r filling ur datatable!!
__TR__ 21-Nov-12 5:09am    
Use Trim[^] method to remove whitespaces.
Bhushan Shah1988 21-Nov-12 5:51am    
you can use .Trim() method at the time of filling data in DataTable.
David_Wimbley 22-Nov-12 23:19pm    
I agree, use .Trim() or if you end up doing it in SQL write UPDATE TableName SET FieldName = LTRIM(RTRIM(FieldName))

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