Datagrid sort

Discussion in 'ASP .Net Datagrid Control' started by Arne, Aug 25, 2005.

  1. Arne

    Arne Guest

    I have a datagrid that sorts. The sort doesn't seem to execute on my template
    column. It only works on my bound columns.
    Arne, Aug 25, 2005
    #1
    1. Advertising

  2. Arne

    Elton Wang Guest

    Hi Arne,



    When conducting sort to a datagrid, it actually sorts underlying data source
    of datagrid. And you need to implement sort function by yourself, in
    datagrid_SortCommand event.



    Could you show your sorting code?





    "Arne" <> wrote in message
    news:...
    > I have a datagrid that sorts. The sort doesn't seem to execute on my

    template
    > column. It only works on my bound columns.
    Elton Wang, Aug 25, 2005
    #2
    1. Advertising

  3. Arne

    Arne Guest

    Elton,
    THe header for each bound column is underlined, meaning it is sortable. The
    sort event fires when the operator clicks column and the sort events is
    implemented.
    The header for the template column is not underlined and the sort event
    doesn't fire.

    "Elton Wang" wrote:

    > Hi Arne,
    >
    >
    >
    > When conducting sort to a datagrid, it actually sorts underlying data source
    > of datagrid. And you need to implement sort function by yourself, in
    > datagrid_SortCommand event.
    >
    >
    >
    > Could you show your sorting code?
    >
    >
    >
    >
    >
    > "Arne" <> wrote in message
    > news:...
    > > I have a datagrid that sorts. The sort doesn't seem to execute on my

    > template
    > > column. It only works on my bound columns.

    >
    >
    >
    Arne, Aug 25, 2005
    #3
  4. Arne

    Elton Wang Guest

    Do you have SortExpression = "Data_Field_Name" in the template column?


    "Arne" <> wrote in message
    news:...
    > Elton,
    > THe header for each bound column is underlined, meaning it is sortable.

    The
    > sort event fires when the operator clicks column and the sort events is
    > implemented.
    > The header for the template column is not underlined and the sort event
    > doesn't fire.
    >
    > "Elton Wang" wrote:
    >
    > > Hi Arne,
    > >
    > >
    > >
    > > When conducting sort to a datagrid, it actually sorts underlying data

    source
    > > of datagrid. And you need to implement sort function by yourself, in
    > > datagrid_SortCommand event.
    > >
    > >
    > >
    > > Could you show your sorting code?
    > >
    > >
    > >
    > >
    > >
    > > "Arne" <> wrote in message
    > > news:...
    > > > I have a datagrid that sorts. The sort doesn't seem to execute on my

    > > template
    > > > column. It only works on my bound columns.

    > >
    > >
    > >
    Elton Wang, Aug 26, 2005
    #4
  5. Arne

    Arne Guest

    Yes I have

    "Elton Wang" wrote:

    > Do you have SortExpression = "Data_Field_Name" in the template column?
    >
    >
    > "Arne" <> wrote in message
    > news:...
    > > Elton,
    > > THe header for each bound column is underlined, meaning it is sortable.

    > The
    > > sort event fires when the operator clicks column and the sort events is
    > > implemented.
    > > The header for the template column is not underlined and the sort event
    > > doesn't fire.
    > >
    > > "Elton Wang" wrote:
    > >
    > > > Hi Arne,
    > > >
    > > >
    > > >
    > > > When conducting sort to a datagrid, it actually sorts underlying data

    > source
    > > > of datagrid. And you need to implement sort function by yourself, in
    > > > datagrid_SortCommand event.
    > > >
    > > >
    > > >
    > > > Could you show your sorting code?
    > > >
    > > >
    > > >
    > > >
    > > >
    > > > "Arne" <> wrote in message
    > > > news:...
    > > > > I have a datagrid that sorts. The sort doesn't seem to execute on my
    > > > template
    > > > > column. It only works on my bound columns.
    > > >
    > > >
    > > >

    >
    >
    >
    Arne, Aug 26, 2005
    #5
  6. Arne

    Elton Wang Guest

    It seems that the template column should be sortable. Could you post your
    html code of the datagrid?
    Elton Wang, Aug 26, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eugene
    Replies:
    0
    Views:
    475
    Eugene
    Sep 28, 2004
  2. nobody
    Replies:
    0
    Views:
    528
    nobody
    Jun 1, 2004
  3. JerryJ
    Replies:
    11
    Views:
    1,385
    Dave Moore
    Apr 28, 2004
  4. John Black
    Replies:
    6
    Views:
    2,043
    John Harrison
    May 28, 2004
  5. Navin
    Replies:
    1
    Views:
    670
    Ken Schaefer
    Sep 9, 2003
Loading...

Share This Page