Re: DataGridView, Custom Buisness Object, And Sorting

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

    Re: DataGridView, Custom Buisness Object, And Sorting

    On 2008-04-22, Tom Shelton <tom_shelton@YO UKNOWTHEDRILLco mcast.netwrote:
    Ok... I haven't really used the DataGridView before - I've always used
    a third party grid, but I now have a project were I have to use this
    particular control. I've been searching the documentation, the web, etc
    - and as near as I can tell I'm doing everything correctly - but, I can
    not get the sorting working correctly.
    >
    Nevermind... My needs were simple, so I just changed all the columns to
    Programmatic and am handling the sorting myself :)

    --
    Tom Shelton
  • Cor Ligthert[MVP]

    #2
    Re: DataGridView, Custom Buisness Object, And Sorting

    Tom,

    Did you not forgot the bindingsource, AFAIK is this a kind of healing for
    all kind of problems.



    Cor


    "Tom Shelton" <tom_shelton@YO UKNOWTHEDRILLco mcast.netschree f in bericht
    news:%23Fo1rjMp IHA.3428@TK2MSF TNGP02.phx.gbl. ..
    On 2008-04-22, Tom Shelton <tom_shelton@YO UKNOWTHEDRILLco mcast.netwrote:
    >Ok... I haven't really used the DataGridView before - I've always used
    >a third party grid, but I now have a project were I have to use this
    >particular control. I've been searching the documentation, the web, etc
    >- and as near as I can tell I'm doing everything correctly - but, I can
    >not get the sorting working correctly.
    >>
    >
    Nevermind... My needs were simple, so I just changed all the columns to
    Programmatic and am handling the sorting myself :)
    >
    --
    Tom Shelton

    Comment

    • Tom Shelton

      #3
      Re: DataGridView, Custom Buisness Object, And Sorting

      On 2008-04-23, Cor Ligthert[MVP] <notmyfirstname @planet.nlwrote :
      Tom,
      >
      Did you not forgot the bindingsource, AFAIK is this a kind of healing for
      all kind of problems.
      >

      >
      Cor
      >
      No. I tried that as well. Same result :) But, thanks.

      --
      Tom Shelton

      Comment

      • Steve Gerrard

        #4
        Re: DataGridView, Custom Buisness Object, And Sorting

        Tom Shelton wrote:
        On 2008-04-23, Cor Ligthert[MVP] <notmyfirstname @planet.nlwrote :
        >Tom,
        >>
        >Did you not forgot the bindingsource, AFAIK is this a kind of
        >healing for all kind of problems.
        >>
        >http://msdn2.microsoft.com/en-us/lib...ingsource.aspx
        >>
        >Cor
        >>
        >
        No. I tried that as well. Same result :) But, thanks.
        Tom, maybe you need to override/implement the SortDirectionCo re property of
        BindingList? It always returns Ascending by default.



        Comment

        • Tom Shelton

          #5
          Re: DataGridView, Custom Buisness Object, And Sorting

          On Apr 22, 10:00 pm, "Steve Gerrard" <mynameh...@com cast.netwrote:
          Tom Shelton wrote:
          On 2008-04-23, Cor Ligthert[MVP] <notmyfirstn... @planet.nlwrote :
          Tom,
          >
          Did you not forgot the bindingsource, AFAIK is this a kind of
          healing for all kind of  problems.
          >>
          Cor
          >
          No.  I tried that as well.  Same result :)  But, thanks.
          >
          Tom, maybe you need to override/implement the SortDirectionCo re property of
          BindingList? It always returns Ascending by default.
          hmmm... maybe. I'll look at that. Thanks.

          --
          Tom Shelton

          Comment

          • Tom Shelton

            #6
            Re: DataGridView, Custom Buisness Object, And Sorting

            On 2008-04-23, Steve Gerrard <mynamehere@com cast.netwrote:
            Tom Shelton wrote:
            >On 2008-04-23, Cor Ligthert[MVP] <notmyfirstname @planet.nlwrote :
            >>Tom,
            >>>
            >>Did you not forgot the bindingsource, AFAIK is this a kind of
            >>healing for all kind of problems.
            >>>
            >>http://msdn2.microsoft.com/en-us/lib...ingsource.aspx
            >>>
            >>Cor
            >>>
            >>
            >No. I tried that as well. Same result :) But, thanks.
            >
            Tom, maybe you need to override/implement the SortDirectionCo re property of
            BindingList? It always returns Ascending by default.
            >
            Steve! You are the Man! That was it. A couple of lines of code, and
            bling - it works.

            Thanks. I'm going to have to read those docs a tad closer next time :)

            --
            Tom Shelton

            Comment

            Working...