Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Datagrid: Displaying Ids

Author  Topic 

ninel
Posting Yak Master

141 Posts

Posted - 2005-07-19 : 16:21:57
I have a datagrid that is populated from a dataset.
The dataset contains TableId, EmployeeId, LoginTime, LogoutTime.

HTML Code:
[Code]
<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>
[/code]


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

jhermiz

3564 Posts

Posted - 2005-07-19 : 16:35:21
so bring it into the query as another column but set the visiblity to false so that the end user does not see it.

jon



Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Imperfection living for perfection --
[url]http://jhermiz.blogspot.com/[/url]
Go to Top of Page
   

- Advertisement -