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. datagrid issue

datagrid issue

Scheduled Pinned Locked Moved ASP.NET
helpquestion
3 Posts 2 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.
  • R Offline
    R Offline
    Ridge Howison
    wrote on last edited by
    #1

    Hello, Thanks for reading this post. Here is my issue. I have a datagrid which 5 bound columns(3 of which are not visible) and 1 button column. Column 1 is date of operation, column 2 is text of email sent by my company etc. My issue is i want to display the entire content of the email text(which can be 2000 characters) inside the cell and have a scroll bar inside the cell, so the page does not become too big. For each row i would like to see the Date, The text of the email and if it exceeds the height of the row, then have a scroll bar within the email text column. How can I do that ?? All help is most appreciated !! This is what i have now.

    F 1 Reply Last reply
    0
    • R Ridge Howison

      Hello, Thanks for reading this post. Here is my issue. I have a datagrid which 5 bound columns(3 of which are not visible) and 1 button column. Column 1 is date of operation, column 2 is text of email sent by my company etc. My issue is i want to display the entire content of the email text(which can be 2000 characters) inside the cell and have a scroll bar inside the cell, so the page does not become too big. For each row i would like to see the Date, The text of the email and if it exceeds the height of the row, then have a scroll bar within the email text column. How can I do that ?? All help is most appreciated !! This is what i have now.

      F Offline
      F Offline
      Fred_Smith
      wrote on last edited by
      #2

      I think the best you can sensibly do is change the message_text column to a templatecolumn and place a readonly, multiline textbox in there and set it's value to the database field. You will get greyed out scrollbars if the text is short but that can't be helped. You can use css stylesheet to try and make the textbox blend in with the grid background as much as possible. (I'm not really sure sorting by message_text will produce anything sensible either - you'd be better off leaving that out. Not even sur you can if it corresponds to a text (as opposed to varchar) database field...)

      R 1 Reply Last reply
      0
      • F Fred_Smith

        I think the best you can sensibly do is change the message_text column to a templatecolumn and place a readonly, multiline textbox in there and set it's value to the database field. You will get greyed out scrollbars if the text is short but that can't be helped. You can use css stylesheet to try and make the textbox blend in with the grid background as much as possible. (I'm not really sure sorting by message_text will produce anything sensible either - you'd be better off leaving that out. Not even sur you can if it corresponds to a text (as opposed to varchar) database field...)

        R Offline
        R Offline
        Ridge Howison
        wrote on last edited by
        #3

        Thank you...I think that works fine. I created a template column and added a div with overflow property set to auto. That ensured whenever length or width went beyond, it would add scroll bars. works great. Thanks

        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