Sort properties inside a category

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Polo

    #1

    Sort properties inside a category

    Hi All,

    I have defined some properties on a object with a category Attribute
    How can I use a custom sort inside a category ?

    See below

    By default :

    General information <- Category
    Adress
    Name
    ID
    Private Information <- Category
    Email
    Phone number

    I would like :

    General information <- Category
    ID
    Name
    Adress
    Private Information <- Category
    Phone number
    Email

    Thanks



  • Jeffrey Tan[MSFT]

    #2
    RE: Sort properties inside a category


    Hi Polo,

    Based on my understanding, your 3 property Adress, Name, ID are all
    added the attribute Category("Gener al"), so they will appear in the General
    category in property grid. So is with Phone number, Email which are
    placed in Private category.
    But I do not know why you said they original appear as :
    Adress
    Name
    ID

    Because so far as I think, .Net will order all the property in the same
    category alphabetically. Like this:
    Adress
    ID
    Name

    Beside this:
    For your requirement, do you want the order of all the property in the same
    category determine by yourself?

    If I misunderstand you, please feel free to tell me.

    Best regards,
    Jeffrey Tan
    Microsoft Online Partner Support
    Get Secure! - www.microsoft.com/security
    This posting is provided "as is" with no warranties and confers no rights.

    Comment

    • Polo

      #3
      Re: Sort properties inside a category

      In fact, I woul like to have a custom sort in the category

      ""Jeffrey Tan[MSFT]"" <v-jetan@online.mi crosoft.com> a écrit dans le message
      de news:07Jnh9XtDH A.984@cpmsftngx a06.phx.gbl...[color=blue]
      >
      > Hi Polo,
      >
      > Based on my understanding, your 3 property Adress, Name, ID are all
      > added the attribute Category("Gener al"), so they will appear in the[/color]
      General[color=blue]
      > category in property grid. So is with Phone number, Email which are
      > placed in Private category.
      > But I do not know why you said they original appear as :
      > Adress
      > Name
      > ID
      >
      > Because so far as I think, .Net will order all the property in the same
      > category alphabetically. Like this:
      > Adress
      > ID
      > Name
      >
      > Beside this:
      > For your requirement, do you want the order of all the property in the[/color]
      same[color=blue]
      > category determine by yourself?
      >
      > If I misunderstand you, please feel free to tell me.
      >
      > Best regards,
      > Jeffrey Tan
      > Microsoft Online Partner Support
      > Get Secure! - www.microsoft.com/security
      > This posting is provided "as is" with no warranties and confers no rights.
      >[/color]


      Comment

      • Vijaye Raji

        #4
        Re: Sort properties inside a category

        I don't think that is possible...

        vJ

        "Polo" <pb@rtech.be> wrote in message
        news:3fc70777$0 $2873$ba620e4c@ reader1.news.sk ynet.be...[color=blue]
        > In fact, I woul like to have a custom sort in the category
        >
        > ""Jeffrey Tan[MSFT]"" <v-jetan@online.mi crosoft.com> a écrit dans le[/color]
        message[color=blue]
        > de news:07Jnh9XtDH A.984@cpmsftngx a06.phx.gbl...[color=green]
        > >
        > > Hi Polo,
        > >
        > > Based on my understanding, your 3 property Adress, Name, ID are[/color][/color]
        all[color=blue][color=green]
        > > added the attribute Category("Gener al"), so they will appear in the[/color]
        > General[color=green]
        > > category in property grid. So is with Phone number, Email which[/color][/color]
        are[color=blue][color=green]
        > > placed in Private category.
        > > But I do not know why you said they original appear as :
        > > Adress
        > > Name
        > > ID
        > >
        > > Because so far as I think, .Net will order all the property in the same
        > > category alphabetically. Like this:
        > > Adress
        > > ID
        > > Name
        > >
        > > Beside this:
        > > For your requirement, do you want the order of all the property in the[/color]
        > same[color=green]
        > > category determine by yourself?
        > >
        > > If I misunderstand you, please feel free to tell me.
        > >
        > > Best regards,
        > > Jeffrey Tan
        > > Microsoft Online Partner Support
        > > Get Secure! - www.microsoft.com/security
        > > This posting is provided "as is" with no warranties and confers no[/color][/color]
        rights.[color=blue][color=green]
        > >[/color]
        >
        >[/color]


        Comment

        • Jeffrey Tan[MSFT]

          #5
          Re: Sort properties inside a category


          Hi Polo,

          I think may be you can get this done through implement
          ICustomTypeDesc riptor interface for your component. For its GetProperties()
          method, return your wanted property order. And there is a sort method of
          PropertyDescrip torCollection, you may adjust the property order through
          this method.

          Best regards,
          Jeffrey Tan
          Microsoft Online Partner Support
          Get Secure! - www.microsoft.com/security
          This posting is provided "as is" with no warranties and confers no rights.

          Comment

          • Jeffrey Tan[MSFT]

            #6
            Re: Sort properties inside a category


            Oh Polo,

            After some research, I found that this can not be done in VS.net property
            grid.

            Best regards,
            Jeffrey Tan
            Microsoft Online Partner Support
            Get Secure! - www.microsoft.com/security
            This posting is provided "as is" with no warranties and confers no rights.

            Comment

            Working...