Results 1 to 2 of 2

Thread: Sorting a BindingSource

  1. #1
    Member Thomas Dean's Avatar
    Join Date
    Login to Give a bone

    Default Sorting a BindingSource

    Hello all. I was wondering if anyone could help me with sorting a bindingsource. In the Revit SDK 2015 samples, there is project called LevelsProperty. It has a datagridview linked to bindingsource1 that gets populated with Revit Level information. I would like to keep the datagridview sorted by "Elevation" but I can't figure out how to do this. By reading online, the bindingsource should be able to be sorted by using the line below but this doesn't seem to do anything.

    bindingSource1.Sort = "Elevation DESC"; // doesn't work but does not produce an error

    Any ideas?

  2. #2
    Active Member
    Join Date
    Saint-Omer, Pas-de-Calais, France
    Login to Give a bone

    Default Re: Sorting a BindingSource

    SystemLevelsDatum is a List<LevelsDataSource>. It does not implement IBindingList or IBindingListView interfaces, so it does not support sorting ( Try to replace List<LevelsDataSource> by System.ComponentModel.BindingList<LevelsDataSource>
    Manager and software developer

Similar Threads

  1. Object sorting
    By dgleason in forum AutoCAD General
    Replies: 4
    Last Post: 2008-04-22, 05:37 AM
  2. Material sorting
    By ronie_ernanto in forum AutoCAD 3D (2007 and above)
    Replies: 0
    Last Post: 2007-12-05, 01:56 PM
  3. Schedule Sorting
    By jnj1502 in forum ACA General
    Replies: 4
    Last Post: 2007-07-18, 04:58 PM
  4. Sorting Schedules
    By rob.walters in forum ACA General
    Replies: 3
    Last Post: 2007-02-15, 02:10 PM
  5. Schedule Sorting
    By chris.macko in forum Revit Architecture - General
    Replies: 5
    Last Post: 2007-01-17, 06:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts