The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I have the following data in a grid (with 1 child GridHierarchyLevel) :
Parent 1
Child 1
Parent 2
Child 1
"Append Row"
If the children are collapsed and I select Parent 2, I get a RowIndex of 2 from the selected range and pass it to DeleteAtRowIndex - this works.
If the children are expanded and I select Parent 2, I get a RowIndex of 3 from the selected range and pass it to DeleteAtRowIndex - this doesn''t work because it thinks I''m trying to delete the "append row".
What am I missing here? What conversion should I be performing on the row indices in the selection range to get an index that DeleteRowAtIndex wants?
ADAdministrator Syncfusion Team June 16, 2004 06:11 PM UTC
In a Expand-type grid, you will not be able to use DeleteAtRowIndex to delete arbitrary rows.
It is easier to work directly with the CurrencyManager. From the grid row index, you can get the GridBoundRecordState of the row. From the recordstate, you can get the currencymanager and the position in the list. From there, you can use currencyManager.List.RemoveAt to remove the datarow. See this thread for some code snippets.
http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=15342