Faccruz 0 Denunciar post Postado Julho 8, 2009 Boa tarde, tenho essa tela Quero alterar o text do botão (é um CommandField - Select) de acordo com um campo da tabela. Como faço isso? Estou no VS2k8, BD Access, VB.NET (ASP.NET) Compartilhar este post Link para o post Compartilhar em outros sites
quintelab 91 Denunciar post Postado Julho 8, 2009 De uma olhada e veja se ajuda: http://www.sitepoint.com/forums/showthread.php?t=535244 Abraços... Compartilhar este post Link para o post Compartilhar em outros sites
Faccruz 0 Denunciar post Postado Julho 10, 2009 De uma olhada e veja se ajuda: http://www.sitepoint.com/forums/showthread.php?t=535244 Abraços... Muito obrigado. Essa dica funcionou parcialmente, pois a primeira linha continuou com o Selecionar. Compartilhar este post Link para o post Compartilhar em outros sites
Faccruz 0 Denunciar post Postado Julho 10, 2009 consegui resolver, nada como um chute nos fundilhos para engrenar, rsrs Segue para quem precisar If e.Row.RowType = DataControlRowType.DataRow Then 'Alterando o TEXT do CommandButton Dim TXTSelect As String = DataBinder.Eval(e.Row.DataItem, "DESCSTATUS") Dim gvw As GridView Dim cf As Button 'é um CommandField mesmo, mas para dar certo tem que "jogar" como button gvw = TryCast(sender, GridView) cf = TryCast(e.Row.Controls(0).Controls(0), Button) If TXTSelect = "NOVA" Then cf.Text = "Concluir" ElseIf TXTSelect = "CANCELADA" Then cf.Text = "Cancelado" ElseIf TXTSelect = "ANDAMENTO" Then cf.Text = "Em andamento" cf.Enabled = False ElseIf TXTSelect = "CONCLUIDA" Then cf.Text = "Finalizada" cf.Enabled = False End If End If Muito obrigado. Compartilhar este post Link para o post Compartilhar em outros sites