Click here to Skip to main content
15,907,392 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How to Set Registry Rule in vb.net Pin
red hat bitz13-Nov-08 15:54
red hat bitz13-Nov-08 15:54 
GeneralRe: How to Set Registry Rule in vb.net Pin
Dave Kreskowiak13-Nov-08 18:21
mveDave Kreskowiak13-Nov-08 18:21 
GeneralRe: How to Set Registry Rule in vb.net Pin
Paul Conrad13-Nov-08 19:28
professionalPaul Conrad13-Nov-08 19:28 
AnswerRe: How to Set Registry Rule in vb.net Pin
Nanda_MR13-Nov-08 17:27
Nanda_MR13-Nov-08 17:27 
GeneralRe: How to Set Registry Rule in vb.net Pin
Paul Conrad13-Nov-08 19:29
professionalPaul Conrad13-Nov-08 19:29 
QuestionDataGridView column sort using different column value Pin
CAN Coder13-Nov-08 7:42
CAN Coder13-Nov-08 7:42 
AnswerRe: DataGridView column sort using different column value Pin
Mycroft Holmes13-Nov-08 16:00
professionalMycroft Holmes13-Nov-08 16:00 
GeneralRe: DataGridView column sort using different column value Pin
CAN Coder14-Nov-08 6:37
CAN Coder14-Nov-08 6:37 
Thanks for the reply. I Implemented the following to solve it (using the fruit example):


<br />
Private Sub SortButton_Click(ByVal sender As Object, _<br />
            ByVal e As System.Windows.Forms.MouseEventArgs) Handles DataGridView1.MouseClick<br />
<br />
        Dim hit As DataGridView.HitTestInfo = DataGridView1.HitTest(e.X, e.Y)<br />
        If hit.Type = DataGridViewHitTestType.ColumnHeader Then<br />
                If DataGridView1.Columns.Item(hit.ColumnIndex).Name = "Fruit" Then<br />
<br />
                Dim oldColumn As DataGridViewColumn = DataGridView1.SortedColumn<br />
                Dim newColumn As DataGridViewColumn = DataGridView1.Columns.Item("FruitCount")<br />
                Dim direction As ListSortDirection<br />
<br />
                ' If oldColumn is null, then the DataGridView is not currently sorted. <br />
                If oldColumn Is Nothing Then<br />
                    direction = ListSortDirection.Ascending<br />
                Else<br />
                    ' Sort FruitCount again, reversing the SortOrder.<br />
                    If Me.DataGridView1.SortOrder = SortOrder.Ascending Then<br />
                        direction = ListSortDirection.Descending<br />
                    Else<br />
                        direction = ListSortDirection.Ascending<br />
                    End If<br />
                End If<br />
<br />
                ' Sort the grid based on FruitCount<br />
                Me.DataGridView1.Sort(DataGridView1.Columns("FruitCount"), direction)<br />
                DataGridView1.Columns("Fruit").HeaderCell.SortGlyphDirection = direction + 1 <br />
            Else<br />
                DataGridView1.Columns("Fruit").HeaderCell.SortGlyphDirection = SortOrder.None<br />
            End If<br />
        End If<br />
<br />
    End Sub<br />



The other columns have autosort, so if the column I'm looking for is not selected (or any other random click) it just falls through to the default handlers. Also using column name instead of index since I allow the user to move (some) columns.
GeneralRe: DataGridView column sort using different column value Pin
Mycroft Holmes14-Nov-08 16:41
professionalMycroft Holmes14-Nov-08 16:41 
GeneralRe: DataGridView column sort using different column value Pin
CAN Coder15-Nov-08 1:26
CAN Coder15-Nov-08 1:26 
Question"{ " as a string in VB Pin
papy-boom13-Nov-08 5:15
papy-boom13-Nov-08 5:15 
AnswerRe: "{ " as a string in VB Pin
Dave Kreskowiak13-Nov-08 5:30
mveDave Kreskowiak13-Nov-08 5:30 
AnswerRe: "{ " as a string in VB Pin
sph3rex13-Nov-08 7:24
sph3rex13-Nov-08 7:24 
QuestionWebBrowser control, HTTPS SSL certificate security dialog Pin
akuma609913-Nov-08 4:49
akuma609913-Nov-08 4:49 
AnswerRe: WebBrowser control, HTTPS SSL certificate security dialog Pin
sph3rex13-Nov-08 10:17
sph3rex13-Nov-08 10:17 
AnswerRe: WebBrowser control, HTTPS SSL certificate security dialog Pin
BimJeam15-Nov-08 3:56
BimJeam15-Nov-08 3:56 
GeneralRe: WebBrowser control, HTTPS SSL certificate security dialog Pin
akuma609916-Nov-08 17:34
akuma609916-Nov-08 17:34 
GeneralRe: WebBrowser control, HTTPS SSL certificate security dialog Pin
BimJeam23-Nov-08 12:13
BimJeam23-Nov-08 12:13 
QuestionModulo Checksum Claculation Pin
MatthysDT13-Nov-08 3:40
MatthysDT13-Nov-08 3:40 
AnswerRe: Modulo Checksum Claculation Pin
Dave Kreskowiak13-Nov-08 4:53
mveDave Kreskowiak13-Nov-08 4:53 
GeneralRe: Modulo Checksum Claculation Pin
MatthysDT13-Nov-08 20:44
MatthysDT13-Nov-08 20:44 
GeneralRe: Modulo Checksum Claculation Pin
Dave Kreskowiak14-Nov-08 16:17
mveDave Kreskowiak14-Nov-08 16:17 
GeneralRe: Modulo Checksum Claculation Pin
MatthysDT16-Nov-08 20:41
MatthysDT16-Nov-08 20:41 
AnswerRe: Modulo Checksum Claculation Pin
Rajesh Anuhya13-Nov-08 22:08
professionalRajesh Anuhya13-Nov-08 22:08 
GeneralRe: Modulo Checksum Claculation Pin
MatthysDT13-Nov-08 22:44
MatthysDT13-Nov-08 22:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.