Hello,
Thank you for your help. I have been trying to get your code to work in my application with not much of luck.
Here is what I have, a textBox and a button. The textBox is there to capture a unique value from the database. based of the results that are returned from the database the system will show the button or not.
For example a user type in "12345" and then clicks "Add". The system will then do a database look up and add the row to the gridview but depending of the "_itemType" value that is returned from the database I make a decision to show the button or not. or even to rename the button if needed.
my code will need to be something like this
GridViewDataRowInfo rowInfo = new GridViewDataRowInfo(radGridView1.MasterView);
if (i._itemType == "act") {
//rowInfo.Cells["UpdateInfo"].ColumnInfo.IsVisible = true;
} else if (i._itemType == "bct"){
//rowInfo.Cells["UpdateInfo"].ColumnInfo.IsVisible = true;
//change the button label
} else {
//rowInfo.Cells["UpdateInfo"].ColumnInfo.IsVisible = false;
}
How can I get this line of code to work in on button click event
GridCommandCellElement commandCell = e.CellElement as GridCommandCellElement;
thank you for your help