Datgrid: Displaying ids

ninel

Active member
Joined
Mar 23, 2005
Messages
32
Location
Land O Lakes, Florida
Programming Experience
3-5
I have a datagrid that is populated from a dataset.
The dataset contains TableId, EmployeeId, LoginTime, LogoutTime.

HTML Code:
VB.NET:
[left]<form id="Form1" method="post" runat="server"> <asp:datagrid id="grdResults" style="Z-INDEX: 116; LEFT: 56px; POSITION: absolute; TOP: 568px" runat="server" Width="900px" Font-Names="Tahoma" Height="50px" PageSize="1" CellPadding="1" AutoGenerateColumns="False" BorderColor="Silver" BorderStyle="Solid" CellSpacing="1" HorizontalAlign="Center" Font-Size="Smaller"> <Columns> <asp:BoundColumn DataField="itmPunchtimeid" HeaderText="ID"></asp:BoundColumn> <asp:BoundColumn DataField="EmployeeId" HeaderText="Last Name"></asp:BoundColumn> <asp:BoundColumn DataField="LoginTime" HeaderText="Start Time"></asp:BoundColumn> <asp:BoundColumn DataField="LogoutTime" HeaderText="End Time"></asp:BoundColumn> </Columns> </asp:datagrid> </form> [/left]

I need the EmployeeId displayed, but the itmPunchTimeId behind it. This way when I redirect to another page I pass the itmPunchTimeId and not the EmployeeId.
I need to use itmPunchTimeId because EmployeeId is not unique in the table.

Thanks,
Ninel
 
Since I see you have the itmPunchTimeId in a bound column as well as EmployeeId, are you not wanting to have the itmPunchTimeId visible in the grid? If so, just set its visible property to false. That way you can still pass the value on redirect.

Or maybe I just don't understand your question.

Blokz
 
Back
Top