Solved

Get Value of gridview field that is set to visible false

Posted on 2010-08-27
4
545 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 250 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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

Suggested Solutions

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

734 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