Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Get Value of gridview field that is set to visible false

Posted on 2010-08-27
4
Medium Priority
?
553 Views
Last Modified: 2012-06-27
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
Comment
Question by:techpr0
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 

Author Comment

by:techpr0
ID: 33543552
using vb.net
0
 
LVL 17

Expert Comment

by:nepaluz
ID: 33543647
some code?
invisible key....? datasource ....?
0
 
LVL 18

Accepted Solution

by:
Anil Golamari earned 1000 total points
ID: 33543656
0
 

Author Comment

by:techpr0
ID: 33543667
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

PowerShell Core for Advanced Linux Administrators

Understand advanced principals around Powershell Core with a focus on the Linux Administrator.  This course covers how to administer numerous environments across multiple platforms including Linux, Azure, AWS, and Google Cloud from a single shell instance.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question