Click here to Skip to main content
15,914,163 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionDataGridView..... Pin
moomoooomoo9-Oct-07 23:32
moomoooomoo9-Oct-07 23:32 
QuestionConstant Module Or File ? Pin
barney_19729-Oct-07 22:09
barney_19729-Oct-07 22:09 
AnswerRe: Constant Module Or File ? Pin
Tom Deketelaere9-Oct-07 22:51
professionalTom Deketelaere9-Oct-07 22:51 
GeneralRe: Constant Module Or File ? Pin
barney_19729-Oct-07 23:21
barney_19729-Oct-07 23:21 
QuestionOld array function does not work in VB 2005? Pin
Nasbcn9-Oct-07 22:05
Nasbcn9-Oct-07 22:05 
AnswerRe: Old array function does not work in VB 2005? Pin
Tom Deketelaere9-Oct-07 22:47
professionalTom Deketelaere9-Oct-07 22:47 
GeneralRe: Old array function does not work in VB 2005? Pin
Nasbcn9-Oct-07 23:37
Nasbcn9-Oct-07 23:37 
QuestionSort Unbound Datagridview column Pin
helelark1239-Oct-07 20:25
helelark1239-Oct-07 20:25 
Hello,

I am adding a column to datagridview.
The column values are numbers or empty string depending of the records returned from my SQL.
When I am sorting the column, it is sorted like string:

123
15
20
25
...

instead of
15
20
25
123

Please help

This is a part of my code:

'add the column to the datagridview
datagridview1.Columns.Add("SCQTYMV", "Qty Moved-In")


'CellFormatting Event
Private Sub DataGridView1_CellFormatting(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles DataGridView1.CellFormatting

Try
With CType(sender, DataGridView)
If e.ColumnIndex = .Columns("SCQTYMV").Index Then
If .Rows(e.RowIndex).Cells("SCQTYMV").Value.ToString = "" Then
e.Value = ""
Else
e.Value = Cint(.Rows(e.RowIndex).Cells("SCQTYMV").Value)
End If
End If
End With

Catch ex As Exception
MessageBox.Show(ex.Message, "DataGridView1_CellFormatting", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub


Shay Noy

QuestionDataset Pin
vidya1109-Oct-07 20:12
vidya1109-Oct-07 20:12 
AnswerRe: Dataset [modified] Pin
vidya11010-Oct-07 0:15
vidya11010-Oct-07 0:15 
GeneralRe: Dataset Pin
Vimalsoft(Pty) Ltd10-Oct-07 23:13
professionalVimalsoft(Pty) Ltd10-Oct-07 23:13 
Questionforms loading [modified] Pin
chamee1239-Oct-07 19:13
chamee1239-Oct-07 19:13 
AnswerRe: forms loading Pin
Christian Graus9-Oct-07 19:32
protectorChristian Graus9-Oct-07 19:32 
AnswerRe: forms loading Pin
manni_n10-Oct-07 2:29
manni_n10-Oct-07 2:29 
QuestionEXCEPTION FROM HRESULT Pin
dienadel9-Oct-07 18:06
dienadel9-Oct-07 18:06 
AnswerRe: EXCEPTION FROM HRESULT Pin
Christian Graus9-Oct-07 18:29
protectorChristian Graus9-Oct-07 18:29 
AnswerRe: EXCEPTION FROM HRESULT Pin
ChandraRam9-Oct-07 21:41
ChandraRam9-Oct-07 21:41 
QuestionUsing TAP messaging protocol Pin
Jack Black X9-Oct-07 17:35
Jack Black X9-Oct-07 17:35 
Questioncheckbox defaults not set on batabound vb form with strong typed dataset Pin
pa281409-Oct-07 15:22
pa281409-Oct-07 15:22 
Questionimages in the button Pin
shri509-Oct-07 14:50
shri509-Oct-07 14:50 
AnswerRe: images in the button Pin
Luc Pattyn9-Oct-07 14:56
sitebuilderLuc Pattyn9-Oct-07 14:56 
QuestionCreating Tab Delimited Output File Pin
Swisher249-Oct-07 13:18
Swisher249-Oct-07 13:18 
AnswerRe: Creating Tab Delimited Output File Pin
Christian Graus9-Oct-07 13:23
protectorChristian Graus9-Oct-07 13:23 
AnswerRe: Creating Tab Delimited Output File [modified] Pin
Luc Pattyn9-Oct-07 13:55
sitebuilderLuc Pattyn9-Oct-07 13:55 
AnswerRe: Creating Tab Delimited Output File Pin
Dave Kreskowiak9-Oct-07 17:14
mveDave Kreskowiak9-Oct-07 17:14 

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.