Carriage return in Combobox

G

Guest

I have a simple Combo box on my Form, Data in it is Coming from database, Data is stored in database Through a form where i am using Textbox to enter data
The Source data to combobox contains carriagereturn,linefeed ('\n\r') , Since the Combo box can not display carriage return it displays it as symbol which looks very bad
Can any body suggest any way to avoid it. (It will be fine even if i am able to display data only till first carriage return symbol)
 
M

Morten Wennevik

Hi,

Could you provide more detail, sample code etc?
ComboBox should ignore carriage return just fine, or at least it did so
using a testTable with rows of strings with \n\r and \r\n at the end.

Happy coding!
Morten Wennevik [C# MVP]
 
G

Guest

As i said in my previous mail,
For an Exampl
I have One Multiline text box which i am using to take entry from user, user can type any number of lines
That data is saved in Database. Now we assign that as datasource to a combo box.
Since the combo box can not interpret Carriagereturn in middle of text. It shows them as a square symbols
For my requirement i just want to Show the first line of text(till first carriage return is encountered) in my Combobox
This is a desktop based application in C#

----- Morten Wennevik wrote: ----

Hi

Could you provide more detail, sample code etc
ComboBox should ignore carriage return just fine, or at least it did so
using a testTable with rows of strings with \n\r and \r\n at the end

Happy coding
Morten Wennevik [C# MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top