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. Image for the cookie policy date

about groupView.SelectItem

I have dynamically generating the GroupBar/GroupView and handling the GroupViewItemSelected event,but the sender.selectItem is -1 for ever at runtime.so can you help i? :( source code: Dim gv as new GroupView gv.name="gv1" Dim gvi as new GroupViewItem gvi.text="TEST" gv.groupViewItems.add(gvi) ..... AddHandler gv.GroupViewItemSelected, AddressOf gvGroupViewItemSelected Private Sub gvGroupViewItemSelected(ByVal sender As Object, ByVal e As System.EventArgs) If TypeOf sender Is GroupView Then MessageBox.Show(sender.SelectedItem) End If End Sub

1 Reply

AD Administrator Syncfusion Team March 13, 2004 03:29 PM UTC

Hi, Please handle the GroupViewSelectedItemEvent as shown below : Public Sub gview_GroupViewItemSelected(sender As Object, e As EventArgs) Dim gv As GroupView = sender MessageBox.Show(gv.GroupViewItems(gv.SelectedItem).Text) End Sub Accessing just the sender.SelectedItem will give you the index of the selected GroupViewItem. I have also attached a sample application that illustrates this. Please take a look at it and let me know if you need further assistance. Regards, Guru Patwal Syncfusion, Inc.

Loader.
Live Chat Icon For mobile
Up arrow icon