Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to show 2 columns in drop down list
Message
From
10/11/2006 15:59:43
Alexandre Palma
Harms Software, Inc.
Alverca, Portugal
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01168759
Message ID:
01168857
Views:
22
This message has been marked as the solution to the initial question of the thread.
also I notice since I did nbsp; code it put the space, so add the # before
For Each row in dsData.tables(0).Rows
    dropdownlist.items.Add(New ListItem(cstr(row("id")).Trim().PadRight(10,cchar(" ")).Replace(" ", "nbsp;") & cstr(row("description")), cstr(row("id"))))
Next row
>I did find the description of these functions in .net help.
>I will have to read your code a few times to understand it, I am still learning.
>Thank you very much.
>
>>this is vb.net code you can always look in the help file for .net
>>
>>>I would prefer to do it in my SQL select. But I am not familiar with the functions cstr() and cchar(). Where do I learn about them?
>>>
>>>Thank you.
>>>
>>>>Ok I bet is a HTML prb so what will need to do on that case is convert the scaces to  
>>>>You can do it on your select or you can do it in code I would say in code.
>>>>so in your code you will have something like this
>>>>
>>>>For Each row in dsData.tables(0).Rows
>>>>    dropdownlist.items.Add(New ListItem(cstr(cstr(row("id")).Trim().PadRight(10,cchar(" ")).Replace(" ", " ") & row("description")), cstr(row("id"))))
>>>>Next row
>>>>
>>>>
>>>>something along this lines.
>>>>
>>>>
>>>>>>Dimitry did you saw the hml that got generated to see if the spaces appears in the html?
>>>>>>
>>>>>
>>>>>Alexandre,
>>>>>
>>>>>Yes, the HTML source does show the spaces. I wish there was a way to replace the spaces with NBSP. So, why do you think DDL ignores my spaces?
Alexandre Palma
Senior Application Architect
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform