DropDownList Order

  • Thread starter Thread starter shapper
  • Start date Start date
S

shapper

Hello,

Is it possible to alphabetically order the items in a DropDownList
after being added to it?

Thanks,
Miguel
 
Presumably, you mean client-side with JavaScript...?

Surely you should assume he means server-side with asp.net seeing as that is
what this group is :)
 
Surely you should assume he means server-side with asp.net seeing as that
is what this group is :)

LOL! In that case, he'd be interested in sorting the options *before* adding
them, wouldn't he...
 
IMHO Aidy was right, Shapper meant sorting after all the items after
manually adding/binding the source...

So explain to me why he wouldn't simply sort the datasource *before* binding
it...?
 
shapper said:
Hello,

Is it possible to alphabetically order the items in a DropDownList
after being added to it?

Thanks,
Miguel

If you've databound it to an sql datasource, do your sort in your select
statement. Othewise, the array sorting sounds like a good idea.
 
So explain to me why he wouldn't simply sort the datasource *before*
binding it...?

Because he doesn't fully understand data binding and is here looking for a
solution. Anyone who fully understood the issue would, of course, have
worded it a different way. When dealing with Qs you sometimes need to read
between the lines.
 
Back
Top