Click here to Skip to main content
15,667,983 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How to semd sms more than 160 character in 0ne SMS? Pin
Dave Kreskowiak15-May-12 4:21
mveDave Kreskowiak15-May-12 4:21 
GeneralRe: How to semd sms more than 160 character in 0ne SMS? Pin
rusydan.khir16-May-12 6:15
rusydan.khir16-May-12 6:15 
GeneralRe: How to semd sms more than 160 character in 0ne SMS? Pin
Dave Kreskowiak16-May-12 7:04
mveDave Kreskowiak16-May-12 7:04 
GeneralRe: How to semd sms more than 160 character in 0ne SMS? Pin
rusydan.khir19-May-12 5:04
rusydan.khir19-May-12 5:04 
AnswerRe: How to semd sms more than 160 character in 0ne SMS? Pin
johnjeric22-May-12 19:39
johnjeric22-May-12 19:39 
QuestionPaint Event Problem Pin
Clark Kent12315-May-12 3:52
professionalClark Kent12315-May-12 3:52 
AnswerRe: Paint Event Problem Pin
Dave Kreskowiak15-May-12 4:13
mveDave Kreskowiak15-May-12 4:13 
QuestionRe: Paint Event Problem Pin
Clark Kent12316-May-12 2:22
professionalClark Kent12316-May-12 2:22 
Yeah Dave, I figured that was the cause and I went ahead and removed it. That was my initial suspicion as well, but I just wanted someone more knowledgeable than myself to confirm it.

I know this is a tiny bit unrelated, but what my new suspicion is that my data grid view might be the cause of this painting annoyance. I emphasis might because once again I could use your advice.

In my data grid view I have added combo boxes to one column and now I receive this error every time per number of rows I have when I resize the form.
See code below.
VB
Private Sub frmEdit_System_Revised_Resize(sender As Object, e As System.EventArgs) Handles Me.Resize
Me.DataGridViewObj.Width = Me.Width / 2
Me.DataGridViewObj.Top = Me.ComboBoxObj.Top + Me.ComboBoxObj.Height
Me.DataGridViewObj.Height = (Me.MyPictureBox.Top) - (Me.ComboBoxObj.Top + Me.ComboBoxObj.Height)
End Sub


Maybe it's the way I insert data into the combo box inside my datagridview, but I receive this error continiously "datagridviewcomboboxcell value is not valid". I tried Googling this, but the typical reponses are to just suppress this error.

Maybe you can see what I am doing wrong. I would appreciate another set of eyes looking at this and pointing out what the problem is. Or maybe you can refer to me some literature that I can read on how to properly set data to a combobox column.

Inside my insert data sub routine...
VB
Dim objRowData(NumOfColToFill) As Object
Dim newButton As New DataGridViewButtonCell()
Dim newComboBox As New DataGridViewComboBoxCell()
Dim newRowToAdd As New DataGridViewRow()

newRowToAdd.SetValues(objRowData)
Me.DataGridViewObj.Rows.Add(newRowToAdd)

' Initialize the combo box
newComboBox.Items.Add("Data")
newComboBox.Items.Add("Data1")
newComboBox.Items.Add("Data2")
newComboBox.Items.Add("Data3")

Me.DataGridViewObj.Rows.Item(m_intRowCounter).Cells.Item(5) = newComboBox
Me.DataGridViewObj.Rows.Item(m_intRowCounter).Cells.Item(5).Value = "Data"

Me.DataGridViewObj.Rows.Item(m_intRowCounter).Cells.Item(0) = newButton
Me.DataGridViewObj.Rows.Item(m_intRowCounter).Cells.Item(0).Value = "Data"

Thanks! Smile | :)
AnswerRe: Paint Event Problem Pin
Dave Kreskowiak16-May-12 4:54
mveDave Kreskowiak16-May-12 4:54 
GeneralRe: Paint Event Problem Pin
Clark Kent12316-May-12 4:56
professionalClark Kent12316-May-12 4:56 
GeneralRe: Paint Event Problem Pin
Dave Kreskowiak16-May-12 7:05
mveDave Kreskowiak16-May-12 7:05 
GeneralRe: Paint Event Problem Pin
Clark Kent12316-May-12 7:27
professionalClark Kent12316-May-12 7:27 
AnswerRe: Paint Event Problem Pin
Luc Pattyn15-May-12 14:31
sitebuilderLuc Pattyn15-May-12 14:31 
GeneralRe: Paint Event Problem Pin
Clark Kent1238-Nov-12 4:30
professionalClark Kent1238-Nov-12 4:30 
QuestionChanging JPG in picturebox with loop Pin
Dr David Johnson PhD14-May-12 12:02
Dr David Johnson PhD14-May-12 12:02 
AnswerRe: Changing JPG in picturebox with loop Pin
Dave Kreskowiak14-May-12 13:18
mveDave Kreskowiak14-May-12 13:18 
GeneralRe: Changing JPG in picturebox with loop Pin
Dr David Johnson PhD14-May-12 15:29
Dr David Johnson PhD14-May-12 15:29 
AnswerRe: Changing JPG in picturebox with loop Pin
Luc Pattyn14-May-12 15:43
sitebuilderLuc Pattyn14-May-12 15:43 
GeneralRe: Changing JPG in picturebox with loop Pin
Dr David Johnson PhD14-May-12 17:14
Dr David Johnson PhD14-May-12 17:14 
AnswerRe: Changing JPG in picturebox with loop Pin
Luc Pattyn14-May-12 17:34
sitebuilderLuc Pattyn14-May-12 17:34 
GeneralRe: Changing JPG in picturebox with loop Pin
Dr David Johnson PhD14-May-12 17:59
Dr David Johnson PhD14-May-12 17:59 
GeneralRe: Changing JPG in picturebox with loop Pin
dg6yhw1115-May-12 6:38
dg6yhw1115-May-12 6:38 
GeneralRe: Changing JPG in picturebox with loop Pin
Dr David Johnson PhD15-May-12 11:24
Dr David Johnson PhD15-May-12 11:24 
AnswerRe: Changing JPG in picturebox with loop Pin
Luc Pattyn15-May-12 12:06
sitebuilderLuc Pattyn15-May-12 12:06 
QuestionDevshock.Net Pin
Midnight Ahri13-May-12 17:15
Midnight Ahri13-May-12 17:15 

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.