"Debug" in design mode ?

Jarod

Regular
Joined
Feb 5, 2003
Messages
82
Location
Bruxelles
Hello

Here is my problem. I hav extended the control DataGrid. It is working fine but I have found a strange problem : when I change the property ReadOnly ni design mode (everything is ok in runtime), I have an error.
I can change it from False to True, but not from True to False. My error is "not set to an instance of an object".
I think that it is a side effect of an overloading I have done but can't find where.
As it is working in runtime mode, I can't find my error with debugger unless there is a way to "debug" what's happening in design mode.
Does someone has an idea ?
 
Yes
I can change any property thru the designer (seeing the direct result on the screen) but dealing with ReadOnly give me an error.
Doing those same changes in runtime works as it is supposed to change.
 
Ok, however, as the code is nearly 700 lines and as I don't really know which part can be involved, can you give me any mail address where I can send you the complete file ?
 
Ok here is a project I made for you to be able to "test" the problem.

The form1 just have an instance of my custom DataGrid. I have set the ReadOnly property to True and now can'tchange it to false via the designer

Feel free to criticize any part of the code you find weird or written not very correct
 

Attachments

I looked at the code in NotePad (I don't have .NET right now) anyway...

What happens when you change the ReadOnly in AdvancedDataGrid.vb ?
 
In the designer, I have a popup appearing saying :
"Invalid Property Value"
and in teh details section:
"Object reference not set to an instance of an object."
 
oh...
You're right :-S
And doing another test, I have found that it is due to the fact that no datasource is present.
If I add a dataSource like
Visual Basic:
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
    Me.DataGrid1.DataSource = New DataTable().DefaultView
    Me.DataGrid1.ReadOnly = False
  End Sub
I don't have the problem.
But I still can't see why changing the ReadOnly property can have a problem if no datasource is present....
Still searching...
 
Back
Top