We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Delete Highlighted Record instead of Selected Record

Thread ID:





72876 Apr 9,2008 01:36 PM UTC Apr 23,2008 11:03 PM UTC WinForms 3
Tags: GridControl
Asked On April 9, 2008 01:36 PM UTC

Dear Sir:

I use this code to delete selected record row, if I expand mouse selection rows to several rows, it just can only select one record each time, thus delete one row each BtnDelete_click event.
I expect to enumerate each highlighted (alpha blend) rows and then delete it all, but didn't have idea to work it out.

GGC.TableOptions.AllowSelection = GridSelectionFlags.None
GGC.TableOptions.ListBoxSelectionMode = SelectionMode.MultiExtended

Sub BtnDelete_Click()
Dim el As Element = GGC.Table.GetInnerMostCurrentElement()
If Not el Is Nothing Then
Dim rec As Record = el.GetRecord()
End If
End Sub

How to make it work perfectly in VB?

Best Regards,

Sri Rajan [Syncfusion]
Replied On April 11, 2008 11:06 PM UTC

Hi Harry,

Thank you for your patience.

To delete all the highlighted s n GroupingGrid, Please refer the code below.

Private Sub buttonAdv1_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim selRecords As Syncfusion.Grouping.SelectedRecordsCollection
selRecords = Me.gridGroupingControl1.Table.SelectedRecords

For Each record As Syncfusion.Grouping.SelectedRecord In selRecords
Next record
End Sub

Please let me know if this helps.

Best Regards,

Replied On April 19, 2008 02:03 AM UTC

Hello Srirajan,

Thanks, but it only worked on parent table, I need to delete selected records work on child or nested tables as well.
How to work it out?

Best Regards,

Johnson [Syncfusion]
Replied On April 23, 2008 11:03 PM UTC

Hi Harry,

To delete ChildTable records when selected, you need to get the selected records from the corresponding table. The code's are below,

Private Sub buttonAdv1_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim selRecords As Syncfusion.Grouping.SelectedRecordsCollection
Table tab = Me.gridGroupingControl1.GetTable("ChildTable Name")
selRecords = tab .SelectedRecords

Dim i As Integer = selRecords.Count
Do While i < 0
i -= 1
End Sub

Please let me know if you need further assistance.

Best regards,


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon