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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. using Template columns

using Template columns

Scheduled Pinned Locked Moved ASP.NET
databasehelp
4 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.
  • M Offline
    M Offline
    Mr Sam
    wrote on last edited by
    #1
    1. i have a template image column. i want to use different images, suppose if database row contains a doctype as pdf then show a small pdf image in the template column image, if its doc then show a small doc image in the template column image. 2) I also have a template button column on click of which i want to open the location of file associated with that particular row which is also stored in the database. Please help me in this regard. Thankyou

    Bye

    P P 2 Replies Last reply
    0
    • M Mr Sam
      1. i have a template image column. i want to use different images, suppose if database row contains a doctype as pdf then show a small pdf image in the template column image, if its doc then show a small doc image in the template column image. 2) I also have a template button column on click of which i want to open the location of file associated with that particular row which is also stored in the database. Please help me in this regard. Thankyou

      Bye

      P Offline
      P Offline
      Parwej Ahamad
      wrote on last edited by
      #2

      (1) In item create event fire (for 2.0 Row data bound) of data grid while loading the row from the database in this event you can check and set the image url. (2) When you click on the button the item comman (for 2.0 Row command) event fire. you can as per your requirement.

      Parwej Ahamad g_parwez@rediffmail.com

      M 1 Reply Last reply
      0
      • P Parwej Ahamad

        (1) In item create event fire (for 2.0 Row data bound) of data grid while loading the row from the database in this event you can check and set the image url. (2) When you click on the button the item comman (for 2.0 Row command) event fire. you can as per your requirement.

        Parwej Ahamad g_parwez@rediffmail.com

        M Offline
        M Offline
        Mr Sam
        wrote on last edited by
        #3

        Can you plz specify the code for it

        Bye

        1 Reply Last reply
        0
        • M Mr Sam
          1. i have a template image column. i want to use different images, suppose if database row contains a doctype as pdf then show a small pdf image in the template column image, if its doc then show a small doc image in the template column image. 2) I also have a template button column on click of which i want to open the location of file associated with that particular row which is also stored in the database. Please help me in this regard. Thankyou

          Bye

          P Offline
          P Offline
          postmaster programmingknowledge com
          wrote on last edited by
          #4

          In ItemDataBound event: Dim img As System.Web.UI.WebControls.Image img = CType(e.Item.FindControl("ImageName"), System.Web.UI.WebControls.Image) img.ImageUrl = "Image/Check1.ico" http://www.programmingknowledge.com/[^]

          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