Last post Sep 03, 2008 05:17 PM by levalencia
Sep 03, 2008 03:12 PM|levalencia|LINK
I need to customize the appearence of the textboxes inside the gridview and detailsview.
I need to customize also the appearance of the buttons.
Currently I have the following.
<asp:DetailsView ID="DetailsView1" runat="server"
style="text-align: center" DataKeyNames="Id">
<RowStyle CssClass="formRow" />
<asp:CommandField NewText="Nuevo" ShowInsertButton="True" ButtonType="Button" />
<HeaderStyle CssClass="tableHead" />
<AlternatingRowStyle CssClass="formAlternateRow" />
Sep 03, 2008 04:06 PM|marcind|LINK
Could you clarify which elements you want to customize and how?
You could start by applying CSS styles and modifying the field templates.
Sep 03, 2008 04:08 PM|scothu|LINK
This appears to be almost a duplicate of the other
thread we had going on.My last post in the thread explained how Dynamic Data generates the fields for particular columns. There is a directory called DynamicData\FieldTemplates and in this directory are the templates used for showing, editing and inserting
various types of data in Dynamic Data. If you want to modify these and have them change globally you can just modify the ones in the directory (to say add a ValidatorCallout). You can also create new versions of these and enable the by adding a UIHint attribute
on your entity that species which field template you want to use. You can also manually in your pages override these by using a DynamicField in the field collection and specifying the UIHint on the DynamicField. You can read more about field templates in the
Sep 03, 2008 04:18 PM|levalencia|LINK
I want to modify the textboxes for example.
I see that they can be customized via the text_edit control right? is there any other way? I mean inside a templatefield or soemthing?
Sep 03, 2008 04:44 PM|marcind|LINK
The field template controls can be customized where they are declared - inside the field template user control.
You can pass additional parameters to the field templates by adding extra attributes to the DynamicField or DynamicControl controls. If the underlying field template declares properties that match the names fo the attributes, then the values of the properties
will be set to be the values of the attributes. You can then use the values in the properties to further customize the UI inside of your field template.
Sep 03, 2008 05:17 PM|levalencia|LINK
Thanks scott, you are the best.