473,396 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Stupid format question

I know, this is a very simple question but...

I want to bound an ObjectDataSource with
a DropDownList.

And I want to do it like that :

Residential
Condominium
Duplex
Triplex
Land
Commercial Lands...

These come from a class with properties and I just want to insert blank
space or better, tab character in it. I tried it but when it come to the
browser, all my spaces are trim.

Why ?


Aug 27 '07 #1
4 1072
if you use a real select, then you can use optgroup

<select>
<optgroup label="Residential">
<option>Condominium</option>
<option>Duplex</option>
<option>Triplex</option>
</optgroup>
<optgroup label="Land">
<option>Commercial</option>
</optgroup>
</select>
-- bruce (sqlwork.com)
Ghistos wrote:
I know, this is a very simple question but...

I want to bound an ObjectDataSource with
a DropDownList.

And I want to do it like that :

Residential
Condominium
Duplex
Triplex
Land
Commercial Lands...

These come from a class with properties and I just want to insert blank
space or better, tab character in it. I tried it but when it come to the
browser, all my spaces are trim.

Why ?

Aug 27 '07 #2
On Aug 27, 9:20 pm, Ghistos <Ghis...@discussions.microsoft.comwrote:
I know, this is a very simple question but...

I want to bound an ObjectDataSource with
a DropDownList.

And I want to do it like that :

Residential
Condominium
Duplex
Triplex
Land
Commercial Lands...

These come from a class with properties and I just want to insert blank
space or better, tab character in it. I tried it but when it come to the
browser, all my spaces are trim.

Why ?
use a non-breaking space character &nbsp;

Aug 27 '07 #3
Tks Bruce

I find on the net
http://www.codeproject.com/aspnet/Dr...ptionGroup.asp

A dotNet dropdownList with the OptionGroup and Item based on what you say to
me.

It works very well...

I tried the &nbsp in my class but this method not work or maybe it's me.

Tks again

Aug 27 '07 #4
Lit
Ghistos,

have you been able to incorporate all the bug fixes for that Control from
the link you provided?

If you know a download that has all the fixed I appreciate it if you can
share it with us.

using the control as is I am getting

Error 1 The name 'ddlItems' does not exist in the current context
DropDownListOptionGroup.aspx.cs

Thank you,

Lit
"Ghistos" <Gh*****@discussions.microsoft.comwrote in message
news:ED**********************************@microsof t.com...
Tks Bruce

I find on the net
http://www.codeproject.com/aspnet/Dr...ptionGroup.asp

A dotNet dropdownList with the OptionGroup and Item based on what you say
to
me.

It works very well...

I tried the &nbsp in my class but this method not work or maybe it's me.

Tks again

Aug 27 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

119
by: rhat | last post by:
I heard that beta 2 now makes ASP.NET xhtml compliant. Can anyone shed some light on what this will change and it will break stuff as converting HTML to XHTML pages DO break things. see,...
16
by: WindAndWaves | last post by:
Hi there I have $initstartdate = date("d-m-Y"); in my code How can I get it to be date() + 1 or 7 for that matter. Because my server is in the US and I am in New Zealand, they are always...
4
by: Uchiha Jax | last post by:
Hello everyone, I am a plenty silly person who is trying to learn .NET remoting through trial and error (all articles I read are going over my head at the moment (mostly) so I thought i'd give...
2
by: Ron Weldy | last post by:
I read that you don't need .cs files to deploy but I suppose if you are trying to reconstruct someone's work, you will need these files. Is that correct?
6
by: Adam Smith | last post by:
I have posted this and similar questions repeatedly and can't even raise a single response. I am being led to believe that this then 'Must be a stupid question' although people say that there is no...
15
by: sparks | last post by:
We get more and more data done in excel and then they want it imported into access. The data is just stupid....values of 1 to 5 we get a lot of 0's ok that alright but 1-jan ? we get colums...
3
by: Steven Smith | last post by:
Hi everyone, This code makes sense to me, but when I run it, it says "Loop Without Do". Any Suggestions? Thanks, Steven Smith Dim FirstPaymentDate As Date
19
by: Leslie Kis-Adam | last post by:
Hi everyone! Can anyone explain me this program? I'm getting really confused. thx in advance. Laszlo Kis-Adam <dfighter@freemail.hu> "
14
by: DavidOwens | last post by:
Hi there everybody iv designed a database, curently when the delete button is pushed, it deletes the record completly, but i dont want that i want it to just disable the dispenser. iv crreated,...
2
by: Lynx101 | last post by:
Hi, Is this a stupid question? Senario: Two tables linked together with an ID number. Question: When using a combo box, which refences another table by indexed autonumber, is there a way to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.