Hi,
Recently I'm using UltraGird and want to implement the delete row action.Here is what I got, I implement a delete button on the winform, and with the button click event like this:
private void del_click(object sender, EventArgs e)
{
this.PerformAction(UltraGridAction.DeleteRows, false, true);
}
What if I also want to delete the selected row when I focued on the row's cell? In another words, when I focued on the cell, and I click the delete button, how could I delete the entire row which the cell within? Should I get the row index and then to delete it ?
Could you please help me with that? Thanks for your concern.
Hi Richard,
Thank you for posting in our forums.
What you can do in order to achieve this is in your button click event to check if the ActiveCell property is null. If it isn’t get the cell’s row and select it:
if (ultraGrid1.ActiveCell != null)
ultraGrid1.ActiveCell.Row.Selected = true;
I have attached a sample demonstrating this suggestion.
Please let me know if you have any additional questions.
Hi, Dimitar
That's exactly what I need, thanks very much.