Hi
I am getting this error in WebGrid: 'Style' Property cannot be set declaratively
after I upgraded
Gary
What version did you upgrade from?
The WebGrid used to allow setting of Style properties directly, allowing the whole object to be updated. But (and it has been a while) that mechanism did not play nicely with CLR2. If memory serves, it had something to do with the way when a page deserialized, the object was created differently if the accessor allow for setting of objects rather than having the object created by the Grid and exposing sub properties of it.
Actually it seems it was done in 2006v3
http://help.infragistics.com/Help/NetAdvantage/NET/2008.1/CLR2.0/html/WebGrid_Breaking_Changes_in_WebGrid.html
Anyway, you would either have to change your object reference to point to the Style object off the Grid directly, or take the style you make and use the .CopyFrom() method off the grid style to import it.
I upgraded from v6.2 to v10.3 and i am facing the same issue, any help would be greatly appreciated.
System.Web.HttpException: The 'Style' property cannot be set declaratively.