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

Visual Basic

 
GeneralRe: User Control Pin
Christian Graus29-Jun-05 11:46
protectorChristian Graus29-Jun-05 11:46 
GeneralPRINT DATAGRID FROM VB.NET Pin
ZULUCHIEF28-Jun-05 8:37
ZULUCHIEF28-Jun-05 8:37 
GeneralRe: PRINT DATAGRID FROM VB.NET Pin
Robert Rohde28-Jun-05 11:25
Robert Rohde28-Jun-05 11:25 
Generalcrying for help! Pin
mian rashed28-Jun-05 7:51
mian rashed28-Jun-05 7:51 
GeneralRe: crying for help! Pin
Robert Rohde28-Jun-05 11:27
Robert Rohde28-Jun-05 11:27 
GeneralRe: crying for help! Pin
mian rashed28-Jun-05 22:53
mian rashed28-Jun-05 22:53 
GeneralRe: crying for help! Pin
Christian Graus28-Jun-05 13:43
protectorChristian Graus28-Jun-05 13:43 
GeneralDatagridview for VB.net - Basics Pin
bruceleecc28-Jun-05 7:49
bruceleecc28-Jun-05 7:49 
I am trying to add a simple datagridview to my form, and want it only to be able to display some arrays, have a user type/copy in some values in various columns and store their input as another array. Yet there is no resource I have found that shows me how to save simple input to a variable! help! I do not want it "bounded", datasourced, dataset, asp, sql, etc. etc. etc. just a plain and simple set of rows/columns to produce some arrays.

Also, I am finding that as I populate the grid with rows it runs extremely slow, and once I have it add over ~300 rows it just freezes up (it populates every hour for a selected time span). I was thinking it was trying to redraw every time it adds a row, but i can't find the option to turn off redraw (you could with datagrid). any thoughts? my code is below.... good god please help Cry | :((

Private Sub dgvMetLoad()

Me.Controls.Add(dgvMet)
dgvMet.ColumnCount = 5

With dgvMet.ColumnHeadersDefaultCellStyle
.Font = New Font(dgvMet.Font, FontStyle.Regular)
.Alignment = DataGridViewContentAlignment.MiddleCenter
End With

With dgvMet
.EditMode = DataGridViewEditMode.EditOnEnter
.BorderStyle = BorderStyle.FixedSingle
.Name = "dgvMet"
.Location = New Point(28, 307)
.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.DisplayedCellsExceptHeaders
.ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.Raised
.CellBorderStyle = DataGridViewCellBorderStyle.Single
.GridColor = SystemColors.ActiveBorder
.RowHeadersVisible = False

.Columns(0).Name = "Date"
.Columns(0).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
.Columns(0).DefaultCellStyle.BackColor = Color.Beige
.Columns(0).ReadOnly = True
.Columns(1).Name = "Time"
'add option for user to select LST or UTC
.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
.Columns(1).DefaultCellStyle.BackColor = Color.Beige
.Columns(1).ReadOnly = True
.Columns(2).Name = "Dew Pt"
.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
.Columns(3).Name = "Coef a"
.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
.Columns(4).Name = "Coef b"
.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight

.Size = New Size(313, 200)

.SelectionMode = DataGridViewSelectionMode.FullRowSelect
.MultiSelect = False
.BackgroundColor = Color.WhiteSmoke
.Dock = DockStyle.None
.BringToFront()
End With
End Sub

Private Sub dgvMetPopulate()
' Add a row for each string array.
'
Dim dtDate As DateTime = modPublicVar.dtDateBegin
Dim dtDateEnd As DateTime = modPublicVar.dtDateEnd

While dtDate <= dtDateEnd
Dim strDate, strTime As String
strDate = Format(dtDate.Date, "MM/dd/yyyy")
strTime = Convert.ToString(dtDate.TimeOfDay)

Dim row As String() = {strDate, strTime}
Me.dgvMet.Rows.Add(row)

dtDate = dtDate.AddHours(1)

End While
end sub
GeneralThoughts? Pin
bruceleecc29-Jun-05 7:14
bruceleecc29-Jun-05 7:14 
GeneralRe: Datagridview for VB.net - Basics Pin
Muhammad Ali Shaikh10-Feb-12 19:11
Muhammad Ali Shaikh10-Feb-12 19:11 
Generalwidth of the last column in datagrid Pin
aimar_2028-Jun-05 5:46
aimar_2028-Jun-05 5:46 
Generalprint a form Pin
daneshmand28-Jun-05 5:25
daneshmand28-Jun-05 5:25 
GeneralRe: print a form Pin
Dave Kreskowiak29-Jun-05 3:16
mveDave Kreskowiak29-Jun-05 3:16 
QuestionHow do I handle a closing form event? Pin
Qvicksilver28-Jun-05 5:07
Qvicksilver28-Jun-05 5:07 
AnswerRe: How do I handle a closing form event? Pin
Robert Rohde28-Jun-05 11:32
Robert Rohde28-Jun-05 11:32 
GeneralFile extension from PIDL Pin
Andy H28-Jun-05 3:54
Andy H28-Jun-05 3:54 
GeneralRe: File extension from PIDL Pin
Dave Kreskowiak28-Jun-05 4:22
mveDave Kreskowiak28-Jun-05 4:22 
GeneralRe: File extension from PIDL Pin
Andy H28-Jun-05 6:48
Andy H28-Jun-05 6:48 
GeneralRe: File extension from PIDL Pin
Dave Kreskowiak28-Jun-05 10:07
mveDave Kreskowiak28-Jun-05 10:07 
GeneralADO recordset.Find Pin
rushing28-Jun-05 3:04
rushing28-Jun-05 3:04 
GeneralRe: ADO recordset.Find Pin
jonathan1528-Jun-05 3:41
jonathan1528-Jun-05 3:41 
GeneralRe: ADO recordset.Find Pin
rushing28-Jun-05 3:57
rushing28-Jun-05 3:57 
GeneralRe: ADO recordset.Find Pin
jonathan1528-Jun-05 4:05
jonathan1528-Jun-05 4:05 
GeneralConverting String to Byte Arrays Pin
alex120528-Jun-05 0:47
alex120528-Jun-05 0:47 
GeneralRe: Converting String to Byte Arrays Pin
Dave Kreskowiak28-Jun-05 4:18
mveDave Kreskowiak28-Jun-05 4:18 

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.