[SOLVED]Datagridview removerow problem

Answered
0
0

Hi,

or there’s a problem or it’s me that I did not understand how it works.
please try deleting a row (with the CANC key) in the attached example.
is rowindex wrong?

try normal and setting parent

regards

Cristian

  • You must to post comments
Best Answer
0
0

Check the UserDeletingRow and UserDeletedRow events.

  • Cristian Zerbinati
    these events are only for selected row… the childs rows are not under event. What do you suggest?
  • Luca (ITG)
    e.Row.ChildRows gives you the rows that are being deleted together with the parent row.
  • Cristian Zerbinati
    ok I do a recursive function because ChildRows dont’ return the sub-ChildRows. The children rows deleted, are not marked as DataRowState.Deleted, the GetChanges return only the parent row
  • You must to post comments
0
0

Hi Cristian,

the problem that Luca mentioned with the RowRemoved event sent initially is logged as WJ-8990 and a fix is included in the latest Wisej development build (1.4.99).

Best regards
Frank

  • You must to post comments
0
0

Yes! How did I do to not see the UserDeletingRow and UserDeletedRow events!?,
thank you Luca Sky Walker

 

  • You must to post comments
0
0

Check the UserDeletingRow and UserDeletedRow events.

  • You must to post comments
0
0

The e.RowIndex is correct. It’s the index of the removed row. The sample app is using the deleted index to read the value from the row collection, but the row has been deleted (removed from the collection) so the index is referring to the next row now. The event RowsRemoved is fired after the rows have been removed. There is no event fired before the rows are removed – it’s entirely up to the application.

There is a bug with the initial RowRemoved (index 0) events with count 0. Logged will be fixed in the current dev build.

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.