B
bjkaledas
Hello,
I have the following code:
<asp:TemplateField HeaderText="Ship Date">
<ItemTemplate>
<aspropDownList id="ddlShipDate" Runat="Server"
SelectedValue='<%# GetShipDate(Eval("SHIPDATE")) %>'
AppendDataBoundItems="True" Font-Size="8pt">
<asp:ListItem Value="None">None</asp:ListItem>
<asp:ListItem Value="PROMPT">Prompt</asp:ListItem>
</aspropDownList>
</ItemTemplate>
</asp:TemplateField>
Public Function GetShipDate(ByVal currentshipdate As Object) As String
If currentshipdate Is DBNull.Value And Not currentshipdate = "PROMPT" Then
Return "None"
End If
Return (currentshipdate)
End Function
I need to include the actual value in the drop down list that is stored in
the ShipDate field in the database table.
I need another listitem something like this:
<asp:ListItem Value="Ship"><%# GetShipDate(Eval("SHIPDATE")) %></asp:ListItem>
but this does not work.
I need this because I have selections for the null values and those that
read "PROMPT", but not for other random values that exist. The user would be
able to select "None", "Prompt", or leave it at the date that was stored in
the table.
Thanks!
I have the following code:
<asp:TemplateField HeaderText="Ship Date">
<ItemTemplate>
<aspropDownList id="ddlShipDate" Runat="Server"
SelectedValue='<%# GetShipDate(Eval("SHIPDATE")) %>'
AppendDataBoundItems="True" Font-Size="8pt">
<asp:ListItem Value="None">None</asp:ListItem>
<asp:ListItem Value="PROMPT">Prompt</asp:ListItem>
</aspropDownList>
</ItemTemplate>
</asp:TemplateField>
Public Function GetShipDate(ByVal currentshipdate As Object) As String
If currentshipdate Is DBNull.Value And Not currentshipdate = "PROMPT" Then
Return "None"
End If
Return (currentshipdate)
End Function
I need to include the actual value in the drop down list that is stored in
the ShipDate field in the database table.
I need another listitem something like this:
<asp:ListItem Value="Ship"><%# GetShipDate(Eval("SHIPDATE")) %></asp:ListItem>
but this does not work.
I need this because I have selections for the null values and those that
read "PROMPT", but not for other random values that exist. The user would be
able to select "None", "Prompt", or leave it at the date that was stored in
the table.
Thanks!