Hi this is what i have so far, i would like to skip the first two items in the datalist, prevent them from displaying, how can one go from here: thanks
protected void dlRisksDataBound(object sender, DataListItemEventArgs e)
{
HyperLink tmpLnk = (HyperLink)e.Item.FindControl("HyperLink1");
Label tmpLbl = (Label)e.Item.FindControl("Label1");
int RiskID;
RiskID = int.Parse(tmpLbl.Text);
if (RiskD == 16 || RiskD == 7)
{
skip first 2 items in datalist
start to display from 3rd on
}
////
idea of front page:
<aspataList ID="dlRisks" runat="server" OnItemCommand="dlRisks_ItemCommand" OnItemCreated="dlRisks_ItemCreated"
DataKeyField="RiskTypeID" OnItemDataBound="dlRisksDataBound" DataSourceID="SqlDataSource1">
<ItemTemplate>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1%" valign="top"><asp:Image ID="imgBall" runat="server" ImageUrl="~/Images/members-area/subnav-bullets/green.gif" Width="28" Height="20" />
<asp:Label ID="Label2" runat="server" Text='<%# Eval("PresentRisk") %>' Visible="false"></asp:Label>
</td>
<td valign="top"> <asp:HyperLink CssClass="subnav" ID="HyperLink1" runat="server"><%# Eval("RiskType")%></asp:HyperLink>
<asp:Label ID="Label1" runat="server" Text='<%# Eval("RiskTypeID") %>' Visible="false"></asp:Label></td>
</tr>
</table>
</ItemTemplate>
</aspataList>
protected void dlRisksDataBound(object sender, DataListItemEventArgs e)
{
HyperLink tmpLnk = (HyperLink)e.Item.FindControl("HyperLink1");
Label tmpLbl = (Label)e.Item.FindControl("Label1");
int RiskID;
RiskID = int.Parse(tmpLbl.Text);
if (RiskD == 16 || RiskD == 7)
{
skip first 2 items in datalist
start to display from 3rd on
}
////
idea of front page:
<aspataList ID="dlRisks" runat="server" OnItemCommand="dlRisks_ItemCommand" OnItemCreated="dlRisks_ItemCreated"
DataKeyField="RiskTypeID" OnItemDataBound="dlRisksDataBound" DataSourceID="SqlDataSource1">
<ItemTemplate>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1%" valign="top"><asp:Image ID="imgBall" runat="server" ImageUrl="~/Images/members-area/subnav-bullets/green.gif" Width="28" Height="20" />
<asp:Label ID="Label2" runat="server" Text='<%# Eval("PresentRisk") %>' Visible="false"></asp:Label>
</td>
<td valign="top"> <asp:HyperLink CssClass="subnav" ID="HyperLink1" runat="server"><%# Eval("RiskType")%></asp:HyperLink>
<asp:Label ID="Label1" runat="server" Text='<%# Eval("RiskTypeID") %>' Visible="false"></asp:Label></td>
</tr>
</table>
</ItemTemplate>
</aspataList>