Detailsview, fields are not readonly when configured as readonly

Detailsview, fields are not readonly when configured as readonly

Old forum URL: forums.lhotka.net/forums/t/8093.aspx


Swylix posted on Friday, December 04, 2009

Hi,

Could anyone help me with the following problem: In my aspx page I have an asp:DetailsView bind to a CslaDataSource. In design mode i can see my combobox en fields, in the skin that I have configured.

Now it comes, when I create a new object:
* the readonly fields are still enabled
* my combobox is not shown
* the configured skin is not applied

Kind regards,

Swylix replied on Saturday, December 05, 2009

OK, solved it after a good sleep.


* readonly fields still enabled: when you create an object, it's not bind to the csladatasource. So my fix here is, set it to invisble on insert or create a template field and configure a label in the inserttemplate
* combobox not shown: be sure you edit the correct template "inserttemplate"
* skin not applied: skin is only applied when bind to the datasource, so on a selectobject. I think for insert, you have to use the alternatingtemplate and itemplate.

Kind Regards,

Copyright (c) Marimer LLC