Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 556
  • Last Modified:

Get Value of gridview field that is set to visible false

I have a Primary key that is invisible in the gridview. When the row is selected in the gridview i would like to get the value of this field.

I tried datakeynames with no luck so far
0
techpr0
Asked:
techpr0
  • 2
1 Solution
 
techpr0Author Commented:
using vb.net
0
 
nepaluzCommented:
some code?
invisible key....? datasource ....?
0
 
techpr0Author Commented:
this is the first few lines of the gridview
             <asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource2" 
                    AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" 
                    BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" 
                    CellPadding="4" ForeColor="Black" GridLines="Vertical" 
        Width="720px" PageSize="25" DataKeyNames="CertID">
          <RowStyle BackColor="#F7F7DE" />
          <Columns>
              <asp:CommandField ShowSelectButton="True" ButtonType="Image" 
                  SelectImageUrl="images/clean.png" />
             <asp:BoundField DataField="CertID" HeaderText="CertID" 
                InsertVisible="False" ReadOnly="True" SortExpression="CertID" Visible=false />
             <asp:BoundField DataField="Invoice Authorization" HeaderText="Invoice Authorization" 
                SortExpression="Invoice Authorization" >
              <HeaderStyle Font-Size="Small" />                
              <ItemStyle HorizontalAlign="Center" Width="30px" />
            </asp:BoundField>
             <asp:BoundField DataField="Serial Number" HeaderText="Serial Number" 
                SortExpression="Serial Number" >
              <HeaderStyle Font-Size="Small" HorizontalAlign="Center" />                
              <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField DataField="Name" HeaderText="Customer Name" SortExpression="Name">
              <HeaderStyle Font-Size="Small" HorizontalAlign="Center" />                
              <ItemStyle HorizontalAlign="Center" Width="170px" />
            </asp:BoundField>

Open in new window

0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now