Home Forums WinForms controls Xceed Grid for WinForms Full width, fixed? Reply To: Full width, fixed?

User (Old forums)
Member
Post count: 23064

It’s not very clear:

——————————
An unhandled exception of type ‘System.Reflection.TargetInvocationException’ occurred in Xceed.Grid.dll

Additional information: Exception has been thrown by the target of an invocation.
——————————

What I do is this:

———————
grdTitles.SelectedRows.Clear()
grdTitles.DataRows.Clear() <– This line throws the exception.
———————

I should mention that the exception does not come when the list is first populated – I can run the commands then without problems.

grdTitles.SelectedRows.Count is “1” before the SelectedRows.Clear(), and it is “0” right after, but the “DataRows.Clear()” then fails.

Could the problem be “grdTitles.CurrentRow”? – When I check for “grdTitles.CurrentRow Is Nothing” it returns False both before and after the SelectedRows.Clear(). But I can’t set the CurrentRow to nothing, as “grdTitles.CurrentRow = Nothing” throws another exception.

Regards,

Brian

Imported from legacy forums. Posted by Brian (had 542 views)