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. How to use LinkButton in GridView.

How to use LinkButton in GridView.

Scheduled Pinned Locked Moved ASP.NET
tutorialdockerhelp
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

    Dear Programmers, I am getting mad now to get what I want. I have searched 100 of articles but not found my desired one. I am using a gridview and want to give use a linkbutton as providing the option to the user to move the data of the rows of gridview up and down. To give a better understanding I am giving you an example. I want that if user press the Up (LinkButton) Button on the gridview in second row than the data of second row will be shifted to first row and data of first row will be shifted to the second row. I am also giving you my code. In this I only want to get the indexposition or row position on which I am pressing the Up or Down Button. Please Help me to get rid of it otherwise I will be get mad because I am trying to get this from more than a week. My code of gridivew is: Width="400px" > ]]>'> Visible="<%# IIf(CType(Container, GridViewRow).RowIndex = 0, false, true) %>" > Visible='<%# IIf(CType(Container, GridViewRow).RowIndex =8, false, true) %>' > Please friends help me. I will be thankful to all those in advance who will reply me. Th

    W 1 Reply Last reply
    0
    • Z Zeeshan Ahmed Memon

      Dear Programmers, I am getting mad now to get what I want. I have searched 100 of articles but not found my desired one. I am using a gridview and want to give use a linkbutton as providing the option to the user to move the data of the rows of gridview up and down. To give a better understanding I am giving you an example. I want that if user press the Up (LinkButton) Button on the gridview in second row than the data of second row will be shifted to first row and data of first row will be shifted to the second row. I am also giving you my code. In this I only want to get the indexposition or row position on which I am pressing the Up or Down Button. Please Help me to get rid of it otherwise I will be get mad because I am trying to get this from more than a week. My code of gridivew is: Width="400px" > ]]>'> Visible="<%# IIf(CType(Container, GridViewRow).RowIndex = 0, false, true) %>" > Visible='<%# IIf(CType(Container, GridViewRow).RowIndex =8, false, true) %>' > Please friends help me. I will be thankful to all those in advance who will reply me. Th

      W Offline
      W Offline
      www Developerof NET
      wrote on last edited by
      #2

      Although i haven`t worked with a scnerio as above , I once designed a page where the grid contains a dropdownlist and on its selection change i had to get its index. Following is the code... ASPX Page .... .... ASPX.CS protected void DropDown_SelectedIndexChanged(object sender, EventArgs e) { DropDownList list = (DropDownList)sender; TableCell cell = list.Parent as TableCell; DataGridItem item = cell.Parent as DataGridItem; i=item.ItemIndex;//you get the item index.. .... .... When you fail to plan, you are planning to fail.

      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