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

MultiSelect rows when RowHeadersVisible=false

Thread ID:

Created:

Updated:

Platform:

Replies:

1208 Oct 3,2002 11:21 AM Sep 3,2003 05:30 AM Windows Forms 3
loading
Tags: FAQ
C C Hyman
Asked On October 3, 2002 11:21 AM

I have found George Shepherd's Windows Forms FAQ for datagrids to be the most helpful in solving my datagrid problems. I hope someone can help me with a new datagrid problem. How do I mulitselect rows for a grid that has tablestyles.RowHeadersVisible=false? I have tried the following two approaches. 1) I tried the following (from George Shepherd's Windows Forms FAQ 5.8 example). This selected the new row selected, but this automatically unselected the previous row. FAQ 5.8 Private Sub dataGrid1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles dataGrid1.MouseUp Dim pt = New Point(e.X, e.Y) Dim hti As DataGrid.HitTestInfo = dataGrid1.HitTest(pt) If hti.Type = DataGrid.HitTestType.Cell Then dataGrid1.CurrentCell = New DataGridCell(hti.Row, hti.Column) dataGrid1.Select(hti.Row) End If End Sub 2) I have tried the VB sample Project from George Shepherd's Windows Forms FAQ 5.36 for the multiselect using the override of the OnMouseDown and OnCurrentCellChanged. This works great for the multiselect if RowHeadersVisible=true. Once RowHeadersVisible=False this no longer works. Please help! Thank you

Jody Harris
Replied On May 8, 2003 11:08 PM

I am having the exact same problem. Did anyone answer you on this question? If so what was the result? Please help ASAP > I have found George Shepherd's Windows Forms FAQ for datagrids to be the most helpful in solving my datagrid problems. > I hope someone can help me with a new datagrid problem. > > How do I mulitselect rows for a grid that has tablestyles.RowHeadersVisible=false? > > I have tried the following two approaches. > > 1) I tried the following (from George Shepherd's Windows Forms FAQ 5.8 example). > This selected the new row selected, but this automatically unselected the previous row. > > FAQ 5.8 > Private Sub dataGrid1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles dataGrid1.MouseUp > Dim pt = New Point(e.X, e.Y) > Dim hti As DataGrid.HitTestInfo = dataGrid1.HitTest(pt) > If hti.Type = DataGrid.HitTestType.Cell Then > dataGrid1.CurrentCell = New DataGridCell(hti.Row, hti.Column) > dataGrid1.Select(hti.Row) > End If > End Sub > > 2) I have tried the VB sample Project from George Shepherd's Windows Forms FAQ 5.36 for the multiselect using > the override of the OnMouseDown and OnCurrentCellChanged. > This works great for the multiselect if RowHeadersVisible=true. Once RowHeadersVisible=False this no longer works. > > Please help! > > Thank you >

John Smith
Replied On September 3, 2003 01:32 AM

Yes, I too am now having this problem. I know it was several months ago that this post was started, but there must be a solution to this!!!

John Smith
Replied On September 3, 2003 05:30 AM

To answer my own question, see the following posting: http://www.syncfusion.com/forums/message.asp?MessageID=6779

CONFIRMATION

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.

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.

;