This is a migrated thread and some comments may be shown as answers.

Template Edit - Can not change Template format / back color

2 Answers 74 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 22 Oct 2008, 03:03 PM
Hi..
I'm using a Form Template in RadGrid for editing. The RadGrid is set to use a skin but when I set the Template to White it does not show White..
What is wrong with the following?  Thanks!

 

<telerik:RadGrid ID="RadGridCorrespondence" runat="server" AllowPaging="True" AllowSorting="True"

 

 

AutoGenerateColumns="False" AutoGenerateEditColumn="True" Font-Names="Verdana"

 

 

Font-Size="Small" GridLines="None" GroupingEnabled="False" OnItemCommand="RadGridCorrespondence_ItemCommand"

 

 

OnItemDataBound="RadGridCorrespondence_ItemDataBound" OnNeedDataSource="RadGridCorrespondence_NeedDataSource"

 

 

OnItemInserted="RadGridCorrespondence_ItemInserted" OnItemUpdated="RadGridCorrespondence_ItemUpdated"

 

 

Skin="WebBlue" Width="99%" DataSourceID="ObjectDataSourceCorrespondence">

 

 

<ValidationSettings EnableValidation="False" />

 

 

<AlternatingItemStyle Font-Names="Verdana" Font-Size="Small" />

 

 

<ItemStyle Font-Names="Verdana" Font-Size="Small" />

 

 

<PagerStyle Mode="Slider" />

 

 

<MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Bottom" DataKeyNames="CorrespondenceID, CategoryID, AddressID"

 

 

HorizontalAlign="NotSet" Width="100%" DataSourceID="ObjectDataSourceCorrespondence">

 

 

<CommandItemSettings AddNewRecordText="Add New Communications Record" />

 

 

<RowIndicatorColumn>

 

 

<HeaderStyle Width="20px" />

 

 

</RowIndicatorColumn>

 

 

<ExpandCollapseColumn>

 

 

<HeaderStyle Width="20px" />

 

 

</ExpandCollapseColumn>

 

 

<Columns>

 

 

<telerik:GridBoundColumn DataField="CorrespondenceID" HeaderText="CorrespondenceID"

 

 

UniqueName="CorrespondenceID" DataType="System.Int32" ReadOnly="True" SortExpression="CorrespondenceID"

 

 

Display="false" Visible="false">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridDropDownColumn DataField="CorrespondenceTypeID" DataType="System.Int32"

 

 

HeaderText="Communication Type" DataSourceID="SqlDataSourceCORRESPONDENCETYPE"

 

 

ListTextField="CorrespondenceType" ListValueField="CorrespondenceTypeID"

 

 

UniqueName="CorrespondenceTypeID" />

 

 

<telerik:GridBoundColumn DataField="Subject" HeaderText="Subject of Email" SortExpression="Subject"

 

 

UniqueName="Subject">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridDropDownColumn DataField="CategoryID" DataType="System.Int32" HeaderText="Category of Letter"

 

 

DataSourceID="SqlDataSourceFullCategoryList" ListTextField="CategoryName" ListValueField="CategoryID"

 

 

UniqueName="CategoryID" EnableEmptyListItem="true" EmptyListItemText="" EmptyListItemValue="0">

 

 

</telerik:GridDropDownColumn>

 

 

<telerik:GridBoundColumn DataField="CorrespondenceText"

 

 

DataType="System.String" HeaderText="Communication Comment"

 

 

UniqueName="CorrespondenceText" />

 

 

<telerik:GridBoundColumn DataField="DateIn" DataType="System.DateTime" HeaderText="Date In"

 

 

SortExpression="DateIn" UniqueName="DateIn" ReadOnly="true">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="DateOut" DataType="System.DateTime" HeaderText="Date Out"

 

 

SortExpression="DateOut" UniqueName="DateOut" ReadOnly="true">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="UpdateDate" DataType="System.DateTime" HeaderText="Update Date"

 

 

SortExpression="UpdateDate" UniqueName="UpdateDate" ReadOnly="true">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridDropDownColumn DataField="AddressID" DataType="System.Int32" HeaderText="Address"

 

 

DataSourceID="SqlDataSourceCorrespondenceAddress" ListTextField="AddressLine"

 

 

ListValueField="AddressID" UniqueName="AddressID" EnableEmptyListItem="true" EmptyListItemText="" EmptyListItemValue="0">

 

 

</telerik:GridDropDownColumn>

 

 

</Columns>

 

 

<EditFormSettings CaptionFormatString="Add Communications Record" ColumnNumber="2" EditFormType="Template">

 

 

<EditColumn ButtonType="ImageButton" CancelText="Cancel Edit" InsertText="Insert Communications Record"

 

 

UpdateText="Update Communications Record">

 

 

</EditColumn>

 

 

 

<FormTableStyle BackColor="White" CellPadding="2" CellSpacing="0" Height="110px" />

 

 

<FormMainTableStyle BackColor="White" CellPadding="3" CellSpacing="0" GridLines="None"

 

 

Width="100%" />

 

 

 

 

<FormTableItemStyle Wrap="False" />

 

 

<FormTableAlternatingItemStyle Wrap="False" />

 

 

<FormTableButtonRowStyle HorizontalAlign="Right" />

 

 

<FormTemplate>

 

 

<table>

 

 

<tr>

 

 

<td class="style48">

 

 

<asp:Label ID="Label2" runat="server" Font-Bold="False" Font-Names="Verdana" Font-Size="Small"

 

 

Text="Communications Type"></asp:Label>

 

 

</td>

 

 

<td>

 

 

<table class="style59">

 

 

<tr>

 

 

<td>

 

 

<telerik:RadComboBox ID="cmbCorrespondenceType" runat="server"

 

 

DataField="CorrespondenceTypeID" DataSourceID="SqlDataSourceCORRESPONDENCETYPE"

 

 

DataTextField="CorrespondenceType" DataValueField="CorrespondenceTypeID"

 

 

Font-Bold="False" Font-Names="Verdana" Font-Size="Small"

 

 

HeaderText="Correspondence Type" ListTextField="CorrespondenceType"

 

 

ListValueField="CorrespondenceTypeID"

 

 

SelectedValue='<%# Bind("CorrespondenceTypeID") %>' Skin="Web20"

 

 

UniqueName="CorrespondenceType" Width="203px">

 

 

<CollapseAnimation Duration="200" Type="OutQuint" />

 

 

</telerik:RadComboBox>

 

 

</td>

 

 

<td>

 

 

<asp:Label ID="Label8" runat="server" Font-Bold="False" Font-Names="Verdana"

 

 

Font-Size="Small" Text="Subject of Email "></asp:Label>

 

 

<asp:TextBox ID="txtSubject" runat="server" Text='<%# Bind( "Subject" ) %>'

 

 

Width="275px"></asp:TextBox>

 

 

</td>

 

 

<td>

 

 

&nbsp;</td>

 

 

</tr>

 

 

</table>

 

 

</td>

 

 

<td class="style48">

 

 

&nbsp;</td>

 

 

<td>

 

 

&nbsp;</td>

 

 

</tr>

 

<%

-- <tr>

 

<td class="style48">

<asp:Label ID="Label9" runat="server" Font-Bold="False" Font-Names="Verdana" Font-Size="Small"

Text="Ticker Date"></asp:Label>

</td>

<td>

<telerik:RadDatePicker ID="dtTICKLERDATE" runat="server" Width="100px" DbSelectedDate='<%# Bind("TicklerDate") %>'>

<DateInput InvalidStyleDuration="100">

</DateInput></telerik:RadDatePicker>

</td>

<td class="style48">

<asp:Label ID="Label5" runat="server" Font-Bold="False" Font-Names="Verdana" Font-Size="Small"

Text="Due Date"></asp:Label>

</td>

<td>

<telerik:RadDatePicker ID="dtDUEDATE" runat="server" Width="100px" DbSelectedDate='<%# Bind("DueDate") %>'>

<DateInput InvalidStyleDuration="100">

</DateInput></telerik:RadDatePicker>

</td>

</tr>--

 

%>

 

 

<tr>

 

 

<td class="style48">

 

 

<asp:Label ID="Label12" runat="server" Font-Bold="False" Font-Names="Verdana" Font-Size="Small"

 

 

Text="Category of Letter"></asp:Label>

 

 

 

</td>

 

 

<td>

 

 

<telerik:RadAjaxPanel ID="RadAjaxPanelCategories" runat="server" height="44px"

 

 

LoadingPanelID="RadAjaxLoadingPanel2" width="300px">

 

 

 

<table class="style59">

 

 

<tr>

 

 

<td>

 

 

<telerik:RadComboBox ID="Category" runat="server" AutoPostBack="True"

 

 

CausesValidation="false" DataField="CATEGORYID"

 

 

DataSourceID="SqlDataSourceCategory" DataTextField="NAME"

 

 

DataValueField="CATEGORYID" Font-Bold="False" Font-Names="Verdana"

 

 

Font-Size="Small" HeaderText="Category" Height="250px" ListTextField="NAME"

 

 

ListValueField="CATEGORYID"

 

 

OnSelectedIndexChanged="Category_SelectedIndexChanged" Skin="Web20"

 

 

UniqueName="cmbCATEGORYID" Width="275px">

 

 

<CollapseAnimation Duration="200" Type="OutQuint" />

 

 

</telerik:RadComboBox>

 

 

</td>

 

 

<td>

 

 

<asp:Label ID="Label13" runat="server" Font-Bold="False" Font-Names="Verdana"

 

 

Font-Size="Small" Text="Sub Category"></asp:Label>

 

 

</td>

 

 

<td>

 

 

<telerik:RadComboBox ID="SubCategory" runat="server" DataField="CATEGORYID"

 

 

DataSourceID="SqlDataSourceSubCategory" DataTextField="NAME"

 

 

DataValueField="CATEGORYID" Font-Bold="False" Font-Names="Verdana"

 

 

Font-Size="Small" HeaderText="Category" Height="250px" ListTextField="NAME"

 

 

ListValueField="CATEGORYID" Skin="Web20" UniqueName="SUBCATEGORY" Width="275px">

 

 

<CollapseAnimation Duration="200" Type="OutQuint" />

 

 

</telerik:RadComboBox>

 

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</telerik:RadAjaxPanel>

 

 

</td>

 

 

<td class="style49">

 

 

&nbsp;</td>

 

 

<td>

 

 

&nbsp;</td>

 

 

</tr>

 

 

<tr>

 

 

<td class="style49">

 

 

<asp:Label ID="Label5" runat="server" Font-Bold="False" Font-Names="Verdana" Font-Size="Small"

 

 

Text="Communication Comment"></asp:Label>

 

 

</td>

 

 

<td>

 

 

<asp:TextBox ID="txtCorrespondenceComment" runat="server"

 

 

TextMode="MultiLine" Rows= "3" Columns="100" Wrap="true"

 

 

Text='<%# Bind( "CorrespondenceText" ) %>'>

 

 

</asp:TextBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td class="style48">

 

 

<asp:Label ID="Label10" runat="server" Font-Bold="False" Font-Names="Verdana" Font-Size="Small"

 

 

Text="Address"></asp:Label>

 

 

</td>

 

 

<td>

 

 

<telerik:RadComboBox ID="cmbAddressPicker" runat="server" DataField="AddressID" DataSourceID="SqlDataSourceCorrespondenceAddress"

 

 

DataTextField="AddressLine" DataValueField="AddressID" ListTextField="AddressLine"

 

 

ListValueField="AddressID" Skin="Web20" uniquename="AddressPicker" CausesValidation="false"

 

 

Font-Bold="False" Font-Names="Verdana"

 

 

Font-Size="Small">

 

 

<CollapseAnimation Duration="200" Type="OutQuint" />

 

 

</telerik:RadComboBox>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td>

 

 

&#160;

 

 

</td>

 

 

<td class="TD_Right" >

 

 

 

<table class="style59">

 

 

<tr>

 

 

<td>

 

 

&nbsp;</td>

 

 

<td>

 

 

&nbsp;</td>

 

 

<td>

 

 

&nbsp;</td>

 

 

<td>

 

 

&nbsp;</td>

 

 

<td>

 

 

&nbsp;</td>

 

 

<td>

 

 

<asp:ImageButton ID="imgUpdate" runat="server" AlternateText="Update"

 

 

CommandName='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'

 

 

ImageUrl="~/btns/Update.gif" onclick="imgUpdate_Click"

 

 

ToolTip="Update Communication Information" />

 

 

<asp:ImageButton ID="imgCancel" runat="server" AlternateText="Cancel"

 

 

CommandName="Cancel" Height="16px" ImageUrl="~/btns/Cancel.gif"

 

 

onclick="imgCancel_Click"

 

 

ToolTip="Cancel Update of Communication Information" />

 

 

 

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" Runat="server"

 

 

height="75px" width="75px">

 

 

<img alt="Loading..."

 

 

src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>'

 

 

style="border:0px;" />

 

 

</telerik:RadAjaxLoadingPanel>

 

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</FormTemplate>

 

 

</EditFormSettings>

 

 

<CommandItemStyle Font-Size="Larger" ForeColor="#000066" />

 

 

 

</MasterTableView><HeaderStyle Font-Names="Verdana" Font-Size="Small" />

 

 

<ClientSettings>

 

 

<Selecting AllowRowSelect="True" />

 

 

</ClientSettings>

 

 

</telerik:RadGrid>

 

2 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 22 Oct 2008, 03:19 PM
Hello Jon,

FormTableStyle and FormMainTableStyle are not applicable for template edit forms. Please set the background color and other styles directly to the custom tags, which you are using inside the form template.

Kind regards,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Jon
Top achievements
Rank 1
answered on 22 Oct 2008, 03:34 PM
Thanks!
Tags
Grid
Asked by
Jon
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Jon
Top achievements
Rank 1
Share this question
or