L
Lee Gillie
I am using the DataGridView in virtual mode.
I respond to data needed, RowErrorTextNeeded, and such.
I have done a number of these sorts of apps just fine.
Trying to indicate error conditions for selected rows which I am about
to perform a complex operation for, showing a different error perhaps
for each row. Lets test by setting error condition for all selected rows...
I have the ShowRowErrors set to TRUE, and respond to RowErrorTextNeeded,
which debugger shows me is being called, and I even call
UpdateRowErrorText. But I have yet to see an error glyph in the row
header or error message / error tooltip anywhere.
Whadam I doin wrong?
' Attempting to set error and error text for all selected rows
RowErrors.Clear()
dgvCurrentTime.ShowRowErrors = True
For Each dgvr In dgvCurrentTime.SelectedRows
idx = dgvCurrentTime.Rows.IndexOf(dgvr)
' NEITHER OF THIS SHOW THE ERROR GLYPH OR MY ROW ERROR MESSAGE
dgvCurrentTime.Rows(idx).ErrorText = "problem"
RowErrors.Add(idx, "problem")
' RowErrors is a dictionary keyed on row index for
' responding to RowErrorTextNeeded
dgvCurrentTime.UpdateRowErrorText(idx)
' Does cause my RowErrorTextNeeded to be called, though
' It just won't show it in the grid!! Why even ask then?
Next
I respond to data needed, RowErrorTextNeeded, and such.
I have done a number of these sorts of apps just fine.
Trying to indicate error conditions for selected rows which I am about
to perform a complex operation for, showing a different error perhaps
for each row. Lets test by setting error condition for all selected rows...
I have the ShowRowErrors set to TRUE, and respond to RowErrorTextNeeded,
which debugger shows me is being called, and I even call
UpdateRowErrorText. But I have yet to see an error glyph in the row
header or error message / error tooltip anywhere.
Whadam I doin wrong?
' Attempting to set error and error text for all selected rows
RowErrors.Clear()
dgvCurrentTime.ShowRowErrors = True
For Each dgvr In dgvCurrentTime.SelectedRows
idx = dgvCurrentTime.Rows.IndexOf(dgvr)
' NEITHER OF THIS SHOW THE ERROR GLYPH OR MY ROW ERROR MESSAGE
dgvCurrentTime.Rows(idx).ErrorText = "problem"
RowErrors.Add(idx, "problem")
' RowErrors is a dictionary keyed on row index for
' responding to RowErrorTextNeeded
dgvCurrentTime.UpdateRowErrorText(idx)
' Does cause my RowErrorTextNeeded to be called, though
' It just won't show it in the grid!! Why even ask then?
Next