Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Ordering sub-elements in a PropertyGrid

Ordering sub-elements in a PropertyGrid

Scheduled Pinned Locked Moved C#
csharpcsstutorialquestion
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    Wags
    wrote on last edited by
    #1

    I'm using a PropertyGrid in C# to display ConfigurationElements. I have an implementation of a ExpandableObjectConverter TypeConverter to display the sub-elements (with descriptions) in the property grid. E.g.

    Item 1
    First sub-item
    Item 1 ID
    Second sub-item
    x
    Item 2
    First sub-item
    Item 2 ID
    Second sub-item
    x
    ...

    I want to display the sub-elements in a specific order - not alphabetically (e.g. The ID before the other sub-elements). Could anyone please tell me how to specify the ordering? (I've Googled it, looked at CodeProject articles, looked on MSDN - where I (momentarily) thought I'd found a solution using SortProperties - which turns out not to be overridable.) Any ideas would be much appreciated. P.S. I tried posting this in the Quick Answers - but I can't see my post (so please don't flame me for cross-posting if you can see it in both places).

    "...there's what people want to hear, there's what people want to believe, there's everything else, THEN there's the truth!" - New York D.A., The International

    D 1 Reply Last reply
    0
    • W Wags

      I'm using a PropertyGrid in C# to display ConfigurationElements. I have an implementation of a ExpandableObjectConverter TypeConverter to display the sub-elements (with descriptions) in the property grid. E.g.

      Item 1
      First sub-item
      Item 1 ID
      Second sub-item
      x
      Item 2
      First sub-item
      Item 2 ID
      Second sub-item
      x
      ...

      I want to display the sub-elements in a specific order - not alphabetically (e.g. The ID before the other sub-elements). Could anyone please tell me how to specify the ordering? (I've Googled it, looked at CodeProject articles, looked on MSDN - where I (momentarily) thought I'd found a solution using SortProperties - which turns out not to be overridable.) Any ideas would be much appreciated. P.S. I tried posting this in the Quick Answers - but I can't see my post (so please don't flame me for cross-posting if you can see it in both places).

      "...there's what people want to hear, there's what people want to believe, there's everything else, THEN there's the truth!" - New York D.A., The International

      D Offline
      D Offline
      DaveyM69
      wrote on last edited by
      #2

      Link to QA post[^]

      Dave

      If this helped, please vote & accept answer!

      Binging is like googling, it just feels dirtier. (Pete O'Hanlon)
      BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)

      W 1 Reply Last reply
      0
      • D DaveyM69

        Link to QA post[^]

        Dave

        If this helped, please vote & accept answer!

        Binging is like googling, it just feels dirtier. (Pete O'Hanlon)
        BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)

        W Offline
        W Offline
        Wags
        wrote on last edited by
        #3

        Thanks Dave, but if I view all questions under QA (All Questions | Latest) I don't see it. Am I being a dumbass?

        "...there's what people want to hear, there's what people want to believe, there's everything else, THEN there's the truth!" - New York D.A., The International

        D 1 Reply Last reply
        0
        • W Wags

          Thanks Dave, but if I view all questions under QA (All Questions | Latest) I don't see it. Am I being a dumbass?

          "...there's what people want to hear, there's what people want to believe, there's everything else, THEN there's the truth!" - New York D.A., The International

          D Offline
          D Offline
          DaveyM69
          wrote on last edited by
          #4

          Right now I see it second entry on page 2, check your filters on the right hand side!

          Dave

          If this helped, please vote & accept answer!

          Binging is like googling, it just feels dirtier. (Pete O'Hanlon)
          BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)

          W 1 Reply Last reply
          0
          • D DaveyM69

            Right now I see it second entry on page 2, check your filters on the right hand side!

            Dave

            If this helped, please vote & accept answer!

            Binging is like googling, it just feels dirtier. (Pete O'Hanlon)
            BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)

            W Offline
            W Offline
            Wags
            wrote on last edited by
            #5

            Thanks Dave. I can see it now.

            "...there's what people want to hear, there's what people want to believe, there's everything else, THEN there's the truth!" - New York D.A., The International

            D 1 Reply Last reply
            0
            • W Wags

              Thanks Dave. I can see it now.

              "...there's what people want to hear, there's what people want to believe, there's everything else, THEN there's the truth!" - New York D.A., The International

              D Offline
              D Offline
              DaveyM69
              wrote on last edited by
              #6

              :thumbsup:

              Dave

              If this helped, please vote & accept answer!

              Binging is like googling, it just feels dirtier. (Pete O'Hanlon)
              BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups