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. GridView not Display Name [modified]

GridView not Display Name [modified]

Scheduled Pinned Locked Moved ASP.NET
dockerhelp
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.
  • L Offline
    L Offline
    lrsalunkhe
    wrote on last edited by
    #1

    Respected, Sir, My GridView do not display name in template field my code as your reference is : Text='<%# GetClassName(DataBinder.Eval(Container.DataItem,"CLASSID")) %>' I am calling a function for name by passing ID and display in template field class but it can not work. please help me. Thanks.

    modified on Tuesday, January 26, 2010 5:31 AM

    P 1 Reply Last reply
    0
    • L lrsalunkhe

      Respected, Sir, My GridView do not display name in template field my code as your reference is : Text='<%# GetClassName(DataBinder.Eval(Container.DataItem,"CLASSID")) %>' I am calling a function for name by passing ID and display in template field class but it can not work. please help me. Thanks.

      modified on Tuesday, January 26, 2010 5:31 AM

      P Offline
      P Offline
      Pranay Rana
      wrote on last edited by
      #2

      For this kind of issue i must suggest you use : RowDatabound event of the grid view and do the code hope below thing work for you public void sumRows ( Object src, GridViewRowEventArgs e ) { if ( e.Row.RowType == DataControlRowType.DataRow ) { TableCellCollection cells = e.Row.Cells; int priceTotal = Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, _ "UnitPrice")) //do code to assign value to columns of the grid } }

      L 1 Reply Last reply
      0
      • P Pranay Rana

        For this kind of issue i must suggest you use : RowDatabound event of the grid view and do the code hope below thing work for you public void sumRows ( Object src, GridViewRowEventArgs e ) { if ( e.Row.RowType == DataControlRowType.DataRow ) { TableCellCollection cells = e.Row.Cells; int priceTotal = Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, _ "UnitPrice")) //do code to assign value to columns of the grid } }

        L Offline
        L Offline
        lrsalunkhe
        wrote on last edited by
        #3

        Thanks For replay

        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