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. Display Datagrid horizontally

Display Datagrid horizontally

Scheduled Pinned Locked Moved ASP.NET
5 Posts 3 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.
  • I Offline
    I Offline
    iamdking
    wrote on last edited by
    #1

    Hello Friends ..This is Amit..and i want to use datagrid control in webpage..This control will display name and image ..Is it possible to display datagrid horizontally..detault view of datagrid is vertical...Tell me if u know..please...............

    V 1 Reply Last reply
    0
    • I iamdking

      Hello Friends ..This is Amit..and i want to use datagrid control in webpage..This control will display name and image ..Is it possible to display datagrid horizontally..detault view of datagrid is vertical...Tell me if u know..please...............

      V Offline
      V Offline
      Vsree
      wrote on last edited by
      #2

      Hi Can you please explain your need in detail. Normally for displaying in Horizontal format,we use Datalist control.

      I 1 Reply Last reply
      0
      • V Vsree

        Hi Can you please explain your need in detail. Normally for displaying in Horizontal format,we use Datalist control.

        I Offline
        I Offline
        iamdking
        wrote on last edited by
        #3

        hello...Actually I use 2 datalists say dtlist1 and dtlist2 and two pagers say pager1 and pager2 for each of them resp..and when the page is loaded dtlist2 is displayed by default. When user clicks on a button second dtlist2 is displayed...and after clicking on the pager for that datalist ..It shows first datalist i.e. dtlist1 ....becoz on page load dtlist2 is to displayed..To avoid such confict in pager..i decide to use datagrid which has its own pager..Then the problem occurs to show datagrid horizontally...Do u have any solution.....

        L V 2 Replies Last reply
        0
        • I iamdking

          hello...Actually I use 2 datalists say dtlist1 and dtlist2 and two pagers say pager1 and pager2 for each of them resp..and when the page is loaded dtlist2 is displayed by default. When user clicks on a button second dtlist2 is displayed...and after clicking on the pager for that datalist ..It shows first datalist i.e. dtlist1 ....becoz on page load dtlist2 is to displayed..To avoid such confict in pager..i decide to use datagrid which has its own pager..Then the problem occurs to show datagrid horizontally...Do u have any solution.....

          L Offline
          L Offline
          luckyve
          wrote on last edited by
          #4

          Hi. I had this problem too:( but I couldnt find any way ... I dont think it is possible ... just you can work with datalist.

          1 Reply Last reply
          0
          • I iamdking

            hello...Actually I use 2 datalists say dtlist1 and dtlist2 and two pagers say pager1 and pager2 for each of them resp..and when the page is loaded dtlist2 is displayed by default. When user clicks on a button second dtlist2 is displayed...and after clicking on the pager for that datalist ..It shows first datalist i.e. dtlist1 ....becoz on page load dtlist2 is to displayed..To avoid such confict in pager..i decide to use datagrid which has its own pager..Then the problem occurs to show datagrid horizontally...Do u have any solution.....

            V Offline
            V Offline
            Vsree
            wrote on last edited by
            #5

            hi Have 'Prev' and 'Next' LinkButtons outside the datalist. Then Add like <asp:datalist id="dl1" Runat="server" RepeatDirection="Horizontal" RepeatColumns="20" CellSpacing="7"> <ItemTemplate> -------Add ur Template Column---- </ItemTemplate> </asp:datalist> Then bind the Datalist with the datasource.For Previous and Next Buttons, maintain the PageCount in a Viewstate and for Prev,decrement it by 1 and for Next,increment it by 1. While binding the datasource,select the data from the db with respect to the ItemCount--from RepeatColumns,PageCount and TotalPageCount meaning that, the records which lies between the specified count given by ItemCount and pagecount,select the items from the db... Try this:)

            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