techpr0
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
I tried datakeynames with no luck so far
some code?
invisible key....? datasource ....?
invisible key....? datasource ....?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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>
ASKER