AddNew Row button is here... ok Where is the Remove Row button?
Please guide me or to have 2 similar buttons (addNewRow - removeCurrentRow), or to hide teh addnewRow button and add that 2 buttons manually near the grid.
If not, how can the user remove rows?
Hi,
There's no button to remove a row. But users can delete a row in the grid by selecting that row and pressing the "Delete" key on the keyboard.
If you want to give the users a button, you could simply call the DeleteSelected method on the grid in your button_click event.
I understand...
But what should I do to select a row, if a row is composed only from editable cells? Actually, I can't select a entire row because of editable cells. I can add a new Row because of the add button, but I can't remove rows.
Secondly, I don't want to add heterogeneous interfaces: I need 2 similar (functionally and visually) add/remove buttons, not a add grid button, and a remove windows button.
So I probably remove the Add button, if its possible, and add 2 "external" buttons Add and Remove.
I suppose the add action is not very complicated, but, finally, don't really understand the need of this "add" button, if any "remove" is not proposed...
You could turn on the RowSelectors.
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { UltraGridLayout layout = e.Layout; UltraGridOverride ov = layout.Override; ov.RowSelectors = DefaultableBoolean.True; }
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { UltraGridLayout layout = e.Layout; UltraGridOverride ov = layout.Override;
ov.RowSelectors = DefaultableBoolean.True; }
Or, you could delete the active row when no rows are selected:
this.ultraGrid1.ActiveRow.Delete(true);