Click here to Skip to main content
15,945,119 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
i m encountering a strange problem which i have never encountered before.
Im reading values from excel database and displaying it directly in data grid as a result. The excel sheet cell contains bold , italics and strike-through and super script text within a same cell , but the data grid result is not showing it. It displays the plain text. I cant user font property at cell level because the sane cell may contain plain as well as different type of text mentioned above.

Is there any way to achieve it ?
Please help me my whole graduate project has stopped becuase of this error..

Thanks
Posted

1 solution

wrote:
Please help me my whole graduate project has stopped becuase of this error..


One would think you'd have done some research before you started. All .NET controls that show text, show plain text, only a rich text control will show text using formatting like bold, italics, etc. Even then, I'm not sure how you're getting data from Excel ( which is NOT a database, BTW ), if the text is compatible with RTF or not. I'd think that if it was, the extra formatting information you're recieving would be screwing up your data grid in ways that you would have mentioned, if it were so.

your first step is to get the data including the formatting information. Your second is to make sure that data is compatible with the rich text control. Your third is to use rich text controls to show your data. There are alternatives, but none of them are pretty IMO.
 
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