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.
private void butDelete_Click(object sender,EventArgs e) { if (grdDisplayItems.Table.CurrentRecord != null) { if (grdDisplayItems.Table.Records.Count == 1) { grdDisplayItems.Table.Records[0].Delete(); } else { this.grdDisplayItems.Table.CurrentRecord.Delete(); } //this.grdDisplayItems.Table.Records[0].Delete(); } } The delete method deletes all records except for the record that iis left out.for e if we have 4 records it deletes 3 records succesfully but the last record is not deleted at all
if the grid has just one record then also the record is not getting deleted I am getting an exception object refrence not set to an instanc eof an object
Stack trace: StackTrace " at System.Data.DataView.GetRow(Int32 index)\r at System.Data.DataView.System.Collections.IList.RemoveAt(Int32 index)\r at Syncfusion.Grouping.Table.DeleteRecord(Record r)\r at Syncfusion.Grouping.Record.Delete()" string
BMBharath M Syncfusion Team October 11, 2010 05:54 PM UTC
Hi Harshini,
We regret for the inconvenience caused.
I am afraid that I am unable to reproduce the reported issue. Could you please update us the type of data that you are binding to grid and if possible, please provide us full grid definition from both ASPX and CS?