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. button field in gridview

button field in gridview

Scheduled Pinned Locked Moved ASP.NET
sysadmin
3 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.
  • S Offline
    S Offline
    sunnu 2
    wrote on last edited by
    #1

    I have two in gridview in which i am using one for datakeynames and another for display name. so when i click on name button i want get the text of that button control in gridview_rowcommand <asp:GridView ID="gvAlRecord" runat="server" AutoGenerateColumns="False" DataKeyNames="ARGSequenceNumber" Height="200px" onrowcommand="gvAlRecord_RowCommand" Width="100%" onrowdatabound="gvAlRecord_RowDataBound" onrowcreated="gvAlRecord_RowCreated"> <Columns> <asp:ButtonField ButtonType="Link" CommandName="Sequence_No" DataTextField="ARGSequenceNumber" HeaderText="Sequence No" SortExpression="ARGSequenceNumber" /> <asp:ButtonField ButtonType="Link" CommandName="Provider" DataTextField="ARGProviderName" HeaderText="Provider" SortExpression="ARGProviderName" /> </Columns> <FooterStyle BackColor="#CCCCCC" ForeColor="Black" /> <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" /> <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#0099FF" Font-Bold="True" ForeColor="White" /> <AlternatingRowStyle BackColor="#DCDCDC" /> </asp:GridView>

    N M 2 Replies Last reply
    0
    • S sunnu 2

      I have two in gridview in which i am using one for datakeynames and another for display name. so when i click on name button i want get the text of that button control in gridview_rowcommand <asp:GridView ID="gvAlRecord" runat="server" AutoGenerateColumns="False" DataKeyNames="ARGSequenceNumber" Height="200px" onrowcommand="gvAlRecord_RowCommand" Width="100%" onrowdatabound="gvAlRecord_RowDataBound" onrowcreated="gvAlRecord_RowCreated"> <Columns> <asp:ButtonField ButtonType="Link" CommandName="Sequence_No" DataTextField="ARGSequenceNumber" HeaderText="Sequence No" SortExpression="ARGSequenceNumber" /> <asp:ButtonField ButtonType="Link" CommandName="Provider" DataTextField="ARGProviderName" HeaderText="Provider" SortExpression="ARGProviderName" /> </Columns> <FooterStyle BackColor="#CCCCCC" ForeColor="Black" /> <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" /> <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#0099FF" Font-Bold="True" ForeColor="White" /> <AlternatingRowStyle BackColor="#DCDCDC" /> </asp:GridView>

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      Please format the code or markup you post using the pre tags. (look a the code block item above the textbox where you entered you post) Are you asking a question? I must have missed it.


      I know the language. I've read a book. - _Madmatt

      1 Reply Last reply
      0
      • S sunnu 2

        I have two in gridview in which i am using one for datakeynames and another for display name. so when i click on name button i want get the text of that button control in gridview_rowcommand <asp:GridView ID="gvAlRecord" runat="server" AutoGenerateColumns="False" DataKeyNames="ARGSequenceNumber" Height="200px" onrowcommand="gvAlRecord_RowCommand" Width="100%" onrowdatabound="gvAlRecord_RowDataBound" onrowcreated="gvAlRecord_RowCreated"> <Columns> <asp:ButtonField ButtonType="Link" CommandName="Sequence_No" DataTextField="ARGSequenceNumber" HeaderText="Sequence No" SortExpression="ARGSequenceNumber" /> <asp:ButtonField ButtonType="Link" CommandName="Provider" DataTextField="ARGProviderName" HeaderText="Provider" SortExpression="ARGProviderName" /> </Columns> <FooterStyle BackColor="#CCCCCC" ForeColor="Black" /> <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" /> <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#0099FF" Font-Bold="True" ForeColor="White" /> <AlternatingRowStyle BackColor="#DCDCDC" /> </asp:GridView>

        M Offline
        M Offline
        MyDevBank
        wrote on last edited by
        #3

        Do you want to effect the Row when clicking on one of the buttons ? mydevbank.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