)
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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to synchronize the ComboBox item selection with the WinForms GridListControl?

Platform: WinForms |
Control: GridListControl |
Published Date: January 12, 2017 |
Last Revised Date: January 2, 2020
Tags: selection

Synchronize the selected combobox item

The selected Combobox value can be synchronized with the GridListControl by setting the SelectedIndex property of GridListControl based on the ComboBox selection in SelectedIndexChanged event of ComboBox.

C#

//Triggering the event 
this.comboBoxAdv1.SelectedIndexChanged += new EventHandler(comboBoxAdv1_SelectedIndexChanged);
 
//Event Customization 
void comboBoxAdv1_SelectedIndexChanged(object sender, EventArgs e)
{
    //Set the SelectedIndex property of GridListControl.
    this.gridListControl2.SelectedIndex = this.comboBoxAdv1.SelectedIndex;
}

 

VB

'Triggering the event 
AddHandler comboBoxAdv1.SelectedIndexChanged, AddressOf comboBoxAdv1_SelectedIndexChanged
 
'Event Customization
Private Sub comboBoxAdv1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
    'Set the SelectedIndex property of GridListControl.
    Me.gridListControl2.SelectedIndex = Me.comboBoxAdv1.SelectedIndex
End Sub

 

Screenshot

Synchronize the selected combobox value with GridListControl

Samples:

C# GridListControl CS

VB GridListControl VB

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

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

Up arrow icon

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

Live Chat Icon For mobile
Live Chat Icon