I have a class that I've written that inherits DataGrid. Inside the
constructor I set several properties such as AllowPaging and
AllowSorting to true, which is what I want the default values to be.
In the consumer, which is a web form, I tested changing the properties
to the opposite of their default values. When I run the page, the
values in the consumer are ignored, and only the 'default' values are
recognized. I thought I was perhaps missing something, so I got a copy
of Dino Esposito's code for his SuperGrid. He too sets default values
in his constructor. Again, the same thing happened, so whatever I'm
missing he missed in his code too, apparently.
I have tried many iterations of this, including not using the
constructor and instead using the OnInit, putting the class in a
different project and compiling it separately, putting it in a Web
Control library, etc., etc. Nothin has worked; I still can't modify
the values. As a matter of fact, when I used the Web Custom Control
class structure, everytime I would change the value in the designer,
it would reset to its default value upon building.
What am I doing wrong?