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

about groupView.SelectItem

Thread ID:





11699 Mar 12,2004 11:56 PM UTC Mar 13,2004 03:29 PM UTC WinForms 1
Tags: Tools
Asked On March 12, 2004 11:56 PM UTC

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

Administrator [Syncfusion]
Replied On 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.


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

This page will automatically be redirected to the 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

Live Chat Icon For mobile
Live Chat Icon