Click here to Skip to main content
14,303,639 members

Visual Basic

 
PinnedHOW TO ANSWER A QUESTION PinPopular
Chris Maunder12-Jul-09 22:40
adminChris Maunder12-Jul-09 22:40 
PinnedHow to get an answer to your question PinPopular
Chris Maunder10-Nov-05 16:30
adminChris Maunder10-Nov-05 16:30 
GeneralFind a File on the Desktop per Location Pin
tooli13hrs 42mins ago
membertooli13hrs 42mins ago 
QuestionOutputDebugString Pin
Member 1368314914-Sep-19 10:37
memberMember 1368314914-Sep-19 10:37 
AnswerRe: OutputDebugString Pin
Mycroft Holmes14-Sep-19 12:49
memberMycroft Holmes14-Sep-19 12:49 
AnswerRe: OutputDebugString Pin
Eddy Vluggen15-Sep-19 12:45
mveEddy Vluggen15-Sep-19 12:45 
GeneralRe: OutputDebugString Pin
Member 1368314916-Sep-19 5:53
memberMember 1368314916-Sep-19 5:53 
Questionvb.net in sql data fetching on dataGridView problem Pin
Member 1227528514-Sep-19 3:49
memberMember 1227528514-Sep-19 3:49 
AnswerRe: vb.net in sql data fetching on dataGridView problem Pin
Dave Kreskowiak14-Sep-19 5:31
mveDave Kreskowiak14-Sep-19 5:31 
AnswerRe: vb.net in sql data fetching on dataGridView problem Pin
Mycroft Holmes14-Sep-19 12:44
memberMycroft Holmes14-Sep-19 12:44 
Questioni want to erase two datatables with a single button please help Pin
Augusto1008-Sep-19 7:35
memberAugusto1008-Sep-19 7:35 
AnswerRe: i want to erase two datatables with a single button please help Pin
Dave Kreskowiak8-Sep-19 16:59
mveDave Kreskowiak8-Sep-19 16:59 
GeneralRe: i want to erase two datatables with a single button please help Pin
Augusto10010-Sep-19 7:44
memberAugusto10010-Sep-19 7:44 
GeneralRe: i want to erase two datatables with a single button please help Pin
Dave Kreskowiak10-Sep-19 8:51
mveDave Kreskowiak10-Sep-19 8:51 
GeneralRe: i want to erase two datatables with a single button please help Pin
Augusto10011-Sep-19 4:14
memberAugusto10011-Sep-19 4:14 
GeneralRe: i want to erase two datatables with a single button please help Pin
Richard MacCutchan11-Sep-19 5:39
protectorRichard MacCutchan11-Sep-19 5:39 
GeneralRe: i want to erase two datatables with a single button please help Pin
Richard Deeming11-Sep-19 23:33
mveRichard Deeming11-Sep-19 23:33 
GeneralRe: i want to erase two datatables with a single button please help Pin
Augusto10011-Sep-19 4:16
memberAugusto10011-Sep-19 4:16 
GeneralRe: i want to erase two datatables with a single button please help Pin
Richard MacCutchan11-Sep-19 6:38
protectorRichard MacCutchan11-Sep-19 6:38 
GeneralRe: i want to erase two datatables with a single button please help Pin
Augusto10013-Sep-19 6:58
memberAugusto10013-Sep-19 6:58 
GeneralRe: i want to erase two datatables with a single button please help Pin
Richard Deeming13-Sep-19 7:21
mveRichard Deeming13-Sep-19 7:21 
AnswerRe: i want to erase two datatables with a single button please help Pin
Richard Deeming10-Sep-19 1:33
mveRichard Deeming10-Sep-19 1:33 
QuestionHow to perform non-case search in DataGridViewComboBoxColumn Pin
speedbump993-Sep-19 8:09
memberspeedbump993-Sep-19 8:09 
SuggestionRe: How to perform non-case search in DataGridViewComboBoxColumn Pin
CHill603-Sep-19 23:38
protectorCHill603-Sep-19 23:38 
GeneralRe: How to perform non-case search in DataGridViewComboBoxColumn Pin
speedbump994-Sep-19 4:58
memberspeedbump994-Sep-19 4:58 
Sorry for the confusion.

The error from my post in more clear terms are:

Private Sub DataGridView1_DataError(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewDataErrorEventArgs) Handles MyBase.DataError
{
' DataGridViewDataErrorContexts.Display
' DataGridViewDataErrorContexts.Formatting
Debug.WriteLine(e.Context.ToString())
}

My ComboBox code would not do you any good because it is full of structure data references which would not make sense to you but here is what causes the problem, hopefully more clear.

When I initialize the DataGridView columns, for the combobox object I load the list value which is the filename of the source xml file which happens to be "Foodlion" (note case).
Dim cmb As New DataGridViewComboBoxColumn()
cmb.Items.Add("Foodlion")

I then create a row with the value for the ComboBox which happens to be "FoodLion" (case difference)
because that's the way it was originally created in the xml file.
Me.Rows.Add(dataArray())

This causes the above error whenever the cell is Formatted by the DataGridView.
Making sure the data and the combobox list item are the same case fixes the problem.

So something in the DataGridView formatting doesn't like the case difference. Therefore
that's why I 'assumed' that the ComboBox or underlying code was doing a case sensitive
search; My Bad.

Your Q. Why not load the combobox using either the .ToLower() or .ToUpper() functions?

When the xml file is created the filename is saved in the xml data (in a particular case).
The 'case' of the filename of the file that is stored on disk can change. When I enumerate
the xml files on disk (Directory.GetFiles(path, "*.xml")), I use that filename to load into
the combobox list as above (cmb.Items.Add("Foodlion"). If its' case is not the same as what is stored in the xml file,
I get the DataError.

I just asked the question in case someone may have encountered this type of issue with DataGridViewComboBoxColumn.
I think I have found a work around 'HACK' by saving the filename in the xml file in a particular
format and then formatting the filename from disk the same way.
I hate to HACK code.

Again, sorry for the confusion. Frown | :(
Hope this is clearer.

Thanks Smile | :)

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.