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. Help me Please

Help me Please

Scheduled Pinned Locked Moved ASP.NET
cssdockerhelpquestion
2 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.
  • Z Offline
    Z Offline
    Zeeshan Ahmed Memon
    wrote on last edited by
    #1

    Friends, I want to hide the button named down inside Item Template on last row. How can I do this. For first row I have done this Visible="<%# IIf(CType(Container, GridViewRow).RowIndex = 0, false, true)>" CommandName="MoveUp" CommandArgument="<%# Container.DataItemIndex %" >; Now the same code I want to use to hide last row in Grid View. How can I do this.

    D 1 Reply Last reply
    0
    • Z Zeeshan Ahmed Memon

      Friends, I want to hide the button named down inside Item Template on last row. How can I do this. For first row I have done this Visible="<%# IIf(CType(Container, GridViewRow).RowIndex = 0, false, true)>" CommandName="MoveUp" CommandArgument="<%# Container.DataItemIndex %" >; Now the same code I want to use to hide last row in Grid View. How can I do this.

      D Offline
      D Offline
      dilipv 0
      wrote on last edited by
      #2

      hi Zeeshan Memon, I think answer exists in your question only.

      Zeeshan Memon wrote:

      Visible="<%# IIf(CType(Container, GridViewRow).RowIndex = 0, false, true)>" CommandName="MoveUp" CommandArgument="<%# Container.DataItemIndex %" >;

      You should find RowCount of your gridview because your gridview is 0 based indexed. Just need to check index is RowCount-1 OR not then you show and hide your control. <asp:linkbutton id="lblUp" runat="server" font-underline="true" forecolor="blue" text="Up"> Visible="<%# IIf(CType(Container, GridViewRow).RowIndex = CType(Container, GridViewRow).RowCount -1, false, true)>" CommandName="MoveUp" CommandArgument="<%# Container.DataItemIndex %" >; Hope this will help you. Thanks & Regards Dilipv

      Dilip Kumar Vishwakarma Programmer .Net Consulting

      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