Sachin Gaur
Sachin Gaur

Reputation:

How can we set the visibility of a button placed inside a Infragistrics Windows Grid control

I have a form where i have used Infragistics windows grid control to display the data. In this, i have placed a button on one of the cell. I want to set its visibility either True or False based on the row condition. I have handled the InitializeRow event of UltraWinGrid control and able to disable the button. But i am unable to set the button's visible to False.

Upvotes: 1

Views: 3542

Answers (2)

LastBye
LastBye

Reputation: 1173

At first yo must achieve the row and cell , then use findControl method and assign that to a button , now the button is in your hand . you can set the visibility :)

Upvotes: -1

Christoffer Lette
Christoffer Lette

Reputation: 14836

UltraGridRow row = ...

row.Cells[buttonCellIndex].Hidden = true;

(I'm using the UltraGrid in Infragistics NetAdvantage for Windows Forms 2008 Vol. 2 CLR 2.0.)

Upvotes: 2

Related Questions