Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 458
  • Last Modified:

Help with sorting data in combobox

Hello,

How do you sort data in a combobox?  I   tried C1item.Sort = SortType.Asc but it does not work.

 Dim Item As New DataSet
            C1Item.Items.Clear()
            Item.ReadXml(Server.MapPath("~/App_Data/Manufacturer.xml"))
            C1Item.DataSource = Item.Tables(0)
            'C1Item.Items.Clear()
            C1Item.DataMember = "Item"
            C1Item.DataTextField = "Item"
            C1Item.DataValueField = "Item_ID"
            C1item.DataBind()
            C1item.Sort = SortType.Asc

Thanks

Victor
0
vcharles
Asked:
vcharles
  • 2
1 Solution
 
indrajitmahajanCommented:
Set Combo box's 'Sorted' Porperty to True
e.g.
C1item.Sorted = True
0
 
vcharlesAuthor Commented:
Hi,

This is a third party combobox, its sort properties are DESC or ASC,

V.
0
 
vcharlesAuthor Commented:
It works!
Thanks!
V.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now