Link to home
Start Free TrialLog in
Avatar of techpr0
techpr0Flag for United States of America

asked on

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
Avatar of techpr0
techpr0
Flag of United States of America image

ASKER

using vb.net
some code?
invisible key....? datasource ....?
ASKER CERTIFIED SOLUTION
Avatar of Anil Golamari
Anil Golamari
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of techpr0

ASKER

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