Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / October 2006

Tip: Looking for answers? Try searching our database.

How? setting DataGridView row error text and indicator

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lee Gillie - 28 Oct 2006 00:03 GMT
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
Lee Gillie - 30 Oct 2006 23:03 GMT
I could find no way to get the error icon to appear except for one
single row at a time. Not what I needed.

So I eliminated the header column, and added an image column, and I
reflect add/edit state myself, as well as the error indicator I need for
indicating feedback individualized for each row when performing
multi-row operations.

Seems short sighted and artificially constrained, that you can not do
that with a row header though.

- Lee

> I am using the DataGridView in virtual mode.
> I respond to data needed, RowErrorTextNeeded, and such.
[quoted text clipped - 29 lines]
>     ' It just won't show it in the grid!! Why even ask then?
> Next

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.