Ver Mensaje Individual
  #2 (permalink)  
Antiguo 06/05/2005, 10:55
Avatar de RootK
RootK
Moderador
 
Fecha de Ingreso: febrero-2002
Ubicación: México D.F
Mensajes: 8.004
Antigüedad: 23 años
Puntos: 50
Puedes crear una funcion de tipo protected que te regrese la info que necesitas.

Supongamos que tienes un grid así:

Cita:
<asp:DataGrid id="DataGrid1" runat="server">
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<%# CheckValue(Container.DataItem("campo")) %>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid>
Y en tu codebehind recibes el valor y regresas el texto que necesitas.

Cita:
Protected Function CheckValue(ByVal iValue As Integer) As String

If iValue = 0 Then
Return "Sin stock"
Else
Return "Seleccionar"
End If

End Function
Salu2
__________________
Nadie roba nada ya que en la vida todo se paga . . .

Exentrit - Soluciones SharePoint & Net