Disabling a button in datagridview in vb.net

Discussion Disabling a button in datagridview in vb.net

  • 23 Februari 2012 17:02
     
     

    I have a datagridview in which i have a button column and a text column. I want that as soon as value in text cell is "xyz" the button in the row gets disabled , in vb.net.Can someone please tell me how to do it .

Semua Balasan

  • 07 Agustus 2012 10:34
     
     

    In your button definition you can add something like this:

    enabled='<%#Convert.ToString(Eval("YourDataFieldName"))<>"xyz"%>'