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.
If I have a selected record which is then deleted from the list the gridgroupingcontrol does not seem to raise a selectedrecordchanged event, which I would expect it would.
In either case, I need to be able to handle this event in some fashion, and I tried looking around and handling RecordDeleted to check if that record was selected, but RecordDeleted never seems to be called.
ADAdministrator Syncfusion Team December 14, 2006 06:00 AM UTC
Hi Ossama,
By default, the GridGroupingControl have two type of selection modes (http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=344). i.e., record based selection and cell based selection. The SelectedRecordChanged event only fires in record based selection mode. If you want to detect the selection changes in the cell based selection mode, you need to handle the TableModel.SelectionChanging event.
Do you want to cancel the default record deletion? If so, you can set the TableDescriptor.AllowRemove property to FALSE.
Kindly try it and let us know if you need any further assistance.
Best regards, Haneef
OAOssama AlamiDecember 14, 2006 05:09 PM UTC
I am in the record-based selection mode. The problem is that when a selected record is removed from the underlying binding list I don't get a selectedrecordchanged event, so I have no way of knowing if selection has changed. I use selection in this grid to drive another part of the application, so I need to know when it has changed.
JNJayakumar Natarajan Syncfusion Team December 14, 2006 11:54 PM UTC
Hi Ossama, Grid.SourceListRecordChanging / SourceListRecordChanged events are raised when the records are removed from the underlying list. The selection events are disabled when the records are removed and cleared. You can make use of the SourceListListChanged event to detect if the record to be revmoved is selected:
if (e.ListChangedType == ListChangedType.ItemDeleted) { Console.WriteLine("Is the record selected? :" + this.gridGroupingControl1.Table.Records[e.NewIndex].IsSelected()); } }
Best regards, Jay
ADAdministrator Syncfusion Team December 15, 2006 08:46 PM UTC