Button Column Different Button Text Problem

07-31-2007, 12:01 PM
I have 2 button colums inserted into a DataGridView. I need the text for each button to be different depending on whether or not another cell in the same row is populated. Is there a way that I can set the text for each button in the button column based on a formula, rather than having the text for each button be exactly the same?

It would be really cool if I could make it mouseover so that all the other buttons stay blank and only the one that is moused over executes the if statement to decide what to put in the button text for that specific cell. Here is how the button column is created:

'Insert BtnColumn
Dim BtnColumn As New DataGridViewButtonColumn
With BtnColumn
.HeaderText = "Button"
.Name = "clmButton"
End With
DataGridView1.Columns.Insert(10, BtnColumn)


EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum