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. Edit Template in Gridview

Edit Template in Gridview

Scheduled Pinned Locked Moved ASP.NET
helptutorialquestion
4 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.
  • S Offline
    S Offline
    sparlay_pk
    wrote on last edited by
    #1

    I want to edit template in gridview. how can I place an icon in a template, and then how to use it. The problem with me is that i am placing gif or png image file, which does not show any property. so how can i make my own icon from these images.

    A A V 3 Replies Last reply
    0
    • S sparlay_pk

      I want to edit template in gridview. how can I place an icon in a template, and then how to use it. The problem with me is that i am placing gif or png image file, which does not show any property. so how can i make my own icon from these images.

      A Offline
      A Offline
      Abhishek Sur
      wrote on last edited by
      #2

      I dont get your problem. You might easily show an Image control inside EditTemplate of the gridview to show an image... :confused:

      Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


      My Latest Articles-->** Simplify Code Using NDepend
      Basics of Bing Search API using .NET
      Microsoft Bing MAP using Javascript

      1 Reply Last reply
      0
      • S sparlay_pk

        I want to edit template in gridview. how can I place an icon in a template, and then how to use it. The problem with me is that i am placing gif or png image file, which does not show any property. so how can i make my own icon from these images.

        A Offline
        A Offline
        Abhijit Jana
        wrote on last edited by
        #3

        What is your actual problem or Business requirement ?

        Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

        1 Reply Last reply
        0
        • S sparlay_pk

          I want to edit template in gridview. how can I place an icon in a template, and then how to use it. The problem with me is that i am placing gif or png image file, which does not show any property. so how can i make my own icon from these images.

          V Offline
          V Offline
          Vimalsoft Pty Ltd
          wrote on last edited by
          #4

          you can use an image control. lets say you are Displaying a username you can bind a Username to a Label and bind the icon to a image control. like this

                                        <ItemTemplate>
                                        <asp:CheckBox ID="CheckBox1" runat="server" />&nbsp;<br />
                                        <asp:Label ID="myLabel" runat="server" Text= '<%# Eval("Title")%>'/>
                                        <asp:Image ID="myicon" runat="server" ImageUrl="~/icon.gif" />
                                        </ItemTemplate>
          

          hope this Helps

          Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

          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