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. Web Development
  3. ASP.NET
  4. Sorting Data of Data Grid Control

Sorting Data of Data Grid Control

Scheduled Pinned Locked Moved ASP.NET
csharpcssasp-netalgorithms
5 Posts 4 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.
  • K Offline
    K Offline
    Khan Bangash
    wrote on last edited by
    #1

    Hi all, I have developed in asp.net with vb.net. There is a Data Grid on that page. I bring Data from Different tables to this Data Grid. Now I want to sort the data of this Data Grid. Is it possible ? If yes then how ? Any Example ? Pls Help its very urgent. Thanks in Advance.

    J S D 3 Replies Last reply
    0
    • K Khan Bangash

      Hi all, I have developed in asp.net with vb.net. There is a Data Grid on that page. I bring Data from Different tables to this Data Grid. Now I want to sort the data of this Data Grid. Is it possible ? If yes then how ? Any Example ? Pls Help its very urgent. Thanks in Advance.

      J Offline
      J Offline
      jcdevnet
      wrote on last edited by
      #2

      Actually what you can do is sort the actual table, you can either provide a sort expression on the default view of the of the DataTable and bind your DataGrid to that view using the DataSource property of the DataGrid

      Greets! Joel

      1 Reply Last reply
      0
      • K Khan Bangash

        Hi all, I have developed in asp.net with vb.net. There is a Data Grid on that page. I bring Data from Different tables to this Data Grid. Now I want to sort the data of this Data Grid. Is it possible ? If yes then how ? Any Example ? Pls Help its very urgent. Thanks in Advance.

        S Offline
        S Offline
        sathesh pandian
        wrote on last edited by
        #3

        you can use dataview to sort the records. assign the table.defaultview with the dataview. Then you can sort it with the column name. dim dtview as new dataview=table.defaultview dtview.sort(columnName)

        All The Best Sathesh Pandian

        K 1 Reply Last reply
        0
        • S sathesh pandian

          you can use dataview to sort the records. assign the table.defaultview with the dataview. Then you can sort it with the column name. dim dtview as new dataview=table.defaultview dtview.sort(columnName)

          All The Best Sathesh Pandian

          K Offline
          K Offline
          Khan Bangash
          wrote on last edited by
          #4

          Dear Actually I have a Data Grid and its different columns are set by different functions. For example first column is set by func1,2nd column is set by func2, similiry other columns are set by different functions. Now there is a column Customer Name, I want to sort this Data Grid with the help of this column. Is there any method with the help of which I can sort it. I want to sort this Data with the Data Which is in this Column, not with Data base table. How is that possible.

          1 Reply Last reply
          0
          • K Khan Bangash

            Hi all, I have developed in asp.net with vb.net. There is a Data Grid on that page. I bring Data from Different tables to this Data Grid. Now I want to sort the data of this Data Grid. Is it possible ? If yes then how ? Any Example ? Pls Help its very urgent. Thanks in Advance.

            D Offline
            D Offline
            Deepak the Cool
            wrote on last edited by
            #5

            If u can create the stored procedure into DB and use join query for all records thn use the order by clause for that. hope that'll help u.

            Deepak Smile a Lots,Its Costs Nothing

            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