Hi
I am using ItemTemplate inside the gridview i have tried your code it works absolutely fine but i am having problem regarding width of table header and template fields although i have fixed them as 150px but still doesn't looks good please provide solution to it, below is my code...Thanx in advance...:)
<div class="tbl_height" style ="background-repeat:repeat-x; margin:0;padding:0; font-size:x-small">
<table cellspacing="0" border="1" style="border-collapse:collapse;" id="GdvAgencyList" rules="all">
<thead>
<tr class="sorting even">
<th scope="col" style=" text-align:center; width:150px">ClientName</th>
<th scope="col" style=" text-align:center; width:150px">JobNumber</th>
<th scope="col" style=" text-align:center; width:150px">PositionType</th>
<th scope="col" style=" text-align:center; width:150px">LivingPosition</th>
<th scope="col" style="text-align:center; width:150px" >JobType</th>
<th scope="col" style="text-align:center; width:150px" >City</th>
<th scope="col" style="text-align:center; width:150px">Agency Zip</th>
<th scope="col" style=" text-align:center; width:150px">Status</th>
<th scope="col" style=" text-align:center; width:150px">Post Date</th>
</tr>
</thead>
</table>
</div>
<div id="divGdvAllclientjobList" class="tbl_height" style="overflow:auto;">
<asp:GridView ID="GdvAllclientjobList" runat="server" AutoGenerateColumns="False" OnRowDataBound="GdvAgencyList_RowDataBound" ShowHeader="false">
<HeaderStyle CssClass="sorting" />
<Columns>
<asp:TemplateField HeaderText="Client Name" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" >
<ItemTemplate>
<%-- <a id="test" href="ClientProfile.aspx?id=<%#Eval("Cliealias")%>&Jobid=<%#Eval("JobidAlias")%>&Type=<%#Eval("TypeAlias")%>&ClientName=<%#Eval("ClieNamealias")%>&ty=<%#Eval("Jobinfo")%>"><%#Eval("ClientName")%></a>--%>
<%-- <input type="hidden" id="Hiddjobtype" value="<%# Eval("Jobinfo")%>"/>--%>
<%-- <a href="ClientInformation.aspx?id=<%#Eval("Cliealias")%>&ty=<%#Eval("Jobinfo")%>&Jobid=<%#Eval("JobidAlias")%>&ClientName=<%#Eval("ClieNamealias")%>"><%#Eval("JobNumber")%></a>--%>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="JobNumber" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" >
<ItemTemplate>
<%-- <a href="ClientInformation.aspx?id=<%#Eval("Cliealias")%>&ty=<%#Eval("Jobinfo")%>&Jobid=<%#Eval("JobidAlias")%>&ClientName=<%#Eval("ClieNamealias")%>"><%#Eval("JobNumber")%></a>--%>
<a href="../AgencyBackendClient/MyJobInfo.aspx?kies=<%#Eval("JobidAlias")%>&ty=<%#Eval("Jobinfo")%>&Clientid=<%#Eval("Cliealias")%>" title="">(J10<%# Eval("JobNumber")%>)</a>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="PositionType" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" >
<ItemTemplate>
<%#Eval("PositionType")%>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="LivingPosition" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" >
<ItemTemplate>
<%#Eval("LivingPosition")%>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="JobType" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" >
<ItemTemplate>
<%#Eval("JobType")%>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="City" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" >
<ItemTemplate>
<%#Eval("City")%>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Zip" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" >
<ItemTemplate>
<%#Eval("Zip")%>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Status" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" >
<ItemTemplate>
<%#Eval("status")%>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Post Date" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<%#Eval("CreatedDate")%>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left"></ItemStyle>
</asp:TemplateField>
</Columns>
<EmptyDataTemplate>
<table cellspacing="0" border="1" style="border-collapse:collapse;" id="GdvAgencyList" rules="all">
<thead>
<tr class="sorting even">
<th align="center" scope="col"> </th><th scope="col">Agency Name</th><th scope="col">Agency Email</th><th scope="col">Agency Address</th><th scope="col">Agency City</th><th scope="col">Agency State</th><th scope="col">Agency Country</th><th scope="col">Agency Zip</th><th scope="col">Agency Phone</th><th scope="col">Agency Fax</th>
</tr>
</thead>
</table>
<br />
<span style="color: Red">No Record Exists</span>
</EmptyDataTemplate>
</asp:GridView>
</div>