Ask a Question related to ASP.NET Data Grid Control, Design and Development.

  1. #1

    Default Datagrid sort

    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 Guest

  2. Similar Questions and Discussions

    1. sort in datagrid
      Hi, I have some columns in my datagrid which are date type. I want to sort on them. What would be the best way to do it. Based on a article to...
    2. Sort datagrid
      Hello Group, I have a datagrid which needs to be sorted but the column headers should not be clickable on certain conditions( say on the "print...
    3. bidirectional sort with datagrid
      Can someone show me how to turn this into a bi-directional sort allowing ascending and descending using the default datagrid allowsorting attribute?...
    4. datagrid won't sort
      I have a datagrid that won't sort. The event handler is firing and return label text, just not the sort. Here's my Sub Page_Load and Sub...
    5. Ado sort error-Ado Sort -Relate, Compute By, or Sort operations cannot be done on column(s) whose key length is unknown or exceeds 10 KB.
      Ado Sort -Relate, Compute By, or Sort operations cannot be done on column(s) whose key length is unknown or exceeds 10 KB. hi, guys i have asp...
  3. #2

    Default Re: Datagrid sort

    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" <Arne@discussions.microsoft.com> wrote in message
    news:F0937BBA-92A9-4355-8971-7C8C3AD191F7@microsoft.com...
    > 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 Guest

  4. #3

    Default Re: Datagrid sort

    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" <Arne@discussions.microsoft.com> wrote in message
    > news:F0937BBA-92A9-4355-8971-7C8C3AD191F7@microsoft.com...
    > > 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 Guest

  5. #4

    Default Re: Datagrid sort

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


    "Arne" <Arne@discussions.microsoft.com> wrote in message
    news:51919A72-561E-4ECD-B1B5-54BE7EFCBB1F@microsoft.com...
    > 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" <Arne@discussions.microsoft.com> wrote in message
    > > news:F0937BBA-92A9-4355-8971-7C8C3AD191F7@microsoft.com...
    > > > 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 Guest

  6. #5

    Default Re: Datagrid sort

    Yes I have

    "Elton Wang" wrote:
    > Do you have SortExpression = "Data_Field_Name" in the template column?
    >
    >
    > "Arne" <Arne@discussions.microsoft.com> wrote in message
    > news:51919A72-561E-4ECD-B1B5-54BE7EFCBB1F@microsoft.com...
    > > 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" <Arne@discussions.microsoft.com> wrote in message
    > > > news:F0937BBA-92A9-4355-8971-7C8C3AD191F7@microsoft.com...
    > > > > 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 Guest

  7. #6

    Default Re: Datagrid sort

    It seems that the template column should be sortable. Could you post your
    html code of the datagrid?


    Elton Wang Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139