or
<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" OnNeedDataSource="RadGrid1_NeedDataSource" AllowPaging="True" AllowSorting="True" GridLines="None" Skin="Office2007"> <MasterTableView> <RowIndicatorColumn> <HeaderStyle Width="20px" /> </RowIndicatorColumn> <ExpandCollapseColumn> <HeaderStyle Width="20px" /> </ExpandCollapseColumn> <EditFormSettings> <FormTemplate> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td colspan="2" style="font-size: small"> <b>Order Details</b> </td> </tr> <tr> <td> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td> </td> <td> </td> </tr> <tr> <td> Order Id: </td> <td> <asp:Label ID="lblOrderId" runat="server" /> </td> </tr> <tr> <td> Product Name: </td> <td> <asp:DropDownList ID="ddlProductName" runat="server" DataSourceID="SqlDataSource1" DataTextField="ProductName" DataValueField="Pid" /> </td> </tr> <tr> <td> Rate: </td> <td> <asp:Label ID="lblRate" runat="server" /> </td> </tr> <tr> <td> Qunatity: </td> <td> <asp:TextBox ID="txtQuantity" runat="server" /> </td> </tr> <tr> <td> Amount: </td> <td> <asp:Label ID="lblAmount" runat="server" /> </td> </tr> </table> </td> </tr> </table> </FormTemplate> </EditFormSettings> </MasterTableView> <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True"> </ClientSettings> </telerik:RadGrid>protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e) { dtValues = new DataTable(); dtValues.Columns.Add("Items"); dtValues.Columns.Add("Rate"); dtValues.Columns.Add("Quantity"); dtValues.Columns.Add("Amount"); RadGrid1.DataSource = dtValues; }<telerik:RadGrid ID="radGrid1" runat="server" AutoGenerateColumns="False" OnSelectedIndexChanged="radGrid1_SelectedIndexChanged" GridLines="None" AllowMultiRowEdit="True" OnItemDataBound="radGrid1_ItemdatBound"> <MasterTableView AutoGenerateColumns="false"> <Columns> <telerik:GridTemplateColumn HeaderText="Product Name"> <EditItemTemplate> <telerik:RadComboBox ID="cbo1" runat="server" AppendDataBoundItems="true" EnableLoadOnDemand="true" Width="300px" Height="100px" DataValueField="product_id" AutoPostBack="true" Text='<%# Bind("Product_Name")%>' DataTextField="Product_Name" MarkFirstMatch="true" DropDownWidth="300px"></telerik:RadComboBox> </EditItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderText="Product_rate"> <ItemTemplate> <asp:Label ID="lblrate" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"Product_Rate")%>'></asp:Label> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderText="Product Quantity"> <EditItemTemplate> <asp:TextBox ID="txtQuantity" runat="server" /> </EditItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderText="Product Amount"> <EditItemTemplate> <asp:TextBox ID="txtAmount" runat="server" /> </EditItemTemplate> </telerik:GridTemplateColumn> </Columns> </MasterTableView> </telerik:RadGrid>public void bindradGrid() { SqlConnection con=new SqlConnection(ConfigurationManager.AppSettings["connectionstring"].ToString()); SqlCommand cmd=new SqlCommand("select * from product_detail",con); con.Open(); SqlDataAdapter da=new SqlDataAdapter(cmd); DataSet ds=new DataSet(); da.Fill(ds); radGrid1.DataSource=ds; radGrid1.DataBind(); con.Close(); }protected void radGrid1_ItemdatBound(object sender, Telerik.Web.UI.GridItemEventArgs e) { if (e.Item is GridEditFormItem && e.Item.IsInEditMode) { GridEditableItem editItem = e.Item as GridEditableItem; RadComboBox combo = (RadComboBox)editItem.FindControl("Product_Name"); SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["connectionstring"].ToString()); SqlCommand cmd = new SqlCommand("select product_id.product_name from product_detail", con); con.Open(); SqlDataAdapter da = new SqlDataAdapter(cmd); DataTable dt = new DataTable(); da.Fill(dt); radGrid1.DataSource = dt; radGrid1.DataBind(); combo.DataTextField = "product_name"; combo.DataValueField = "product_id"; combo.DataBind(); } }<CssFiles>
<telerik:EditorCssFile Value="~/Styles/OdpowiedzListEditorContentAreaStyles.css" />
</CssFiles>
And CSS file looks like this:My problem is that On the design view everything is ok and the styles are applied, but they aren't added to the html view. So When I save the HTML to my database all the formatting is gone. Is there a way to include those styles in the html?body
{
background-color: White !important;
font-family: RotisSemiSansPl !important;
font-size: 20pt !important;
margin: 50pt 0pt 10pt 0pt !important;
color: red !important;
}
Protected Sub btnOK_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnOK.Click Dim phone As String = String.Empty Dim row As GridEditableItem ' How to get the row that is in editmode? phone = DirectCast(row.FindControl("txtPhone"), TextBox).Text End Sub <telerik:RadGrid ID="RadgridDestination" runat="server" AllowSorting="True" ShowGroupPanel="True" AutoGenerateColumns="False" Skin="Sunset" AllowPaging="True" GridLines="None"> <GroupingSettings ShowUnGroupButton="True" /> <ClientSettings AllowDragToGroup="True" allowcolumnsreorder="True" columnsreordermethod="Reorder" reordercolumnsonclient="True" > </ClientSettings> <MasterTableView EditMode="InPlace" DataKeyNames="Destination_ID" GroupLoadMode="Client" > <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings> <Columns> <telerik:GridEditCommandColumn ButtonType="ImageButton"> </telerik:GridEditCommandColumn> <telerik:GridButtonColumn CommandName="Select" Text="Select" ButtonType="ImageButton" UniqueName="column1" ImageUrl="Images/Home-Edit.gif"> </telerik:GridButtonColumn> <telerik:GridBoundColumn DataField="Destination_ID" HeaderText="Destination_ID" visible="False" UniqueName="Destination_ID" /> ' ' ' ' <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" Text="Delete" UniqueName="Delete"> </telerik:GridButtonColumn> </Columns> <EditFormSettings> <EditColumn UniqueName="EditCommandColumn1"></EditColumn> </EditFormSettings> </MasterTableView> </telerik:RadGrid> <asp:Button ID="btnOK" runat="server" CausesValidation="false" Text=" OK " /> <telerik:RadScheduler ID="radScheduler" runat="server" Height="" HoursPanelTimeFormat="htt" ValidationGroup="RadScheduler1" onresourcespopulating="radScheduler_ResourcesPopulating" ReadOnly="true" AppointmentStyleMode="Default" EnableDescriptionField="true" OnClientAppointmentCreated="clientAppointmentCreated" SelectedView="MonthView" ShowFooter="false" ShowAllDayRow="false" ShowFullTime="true" OnClientAppointmentClick="appointmentClick" AdvancedForm-Modal="true" Skin="Office2007" TimelineView-UserSelectable="false" > <AppointmentTemplate> <div class="rsAptSubject"> <%# Eval("Subject") %> </div> <%# Eval("Description") %> </AppointmentTemplate> <WebServiceSettings Path="../WebServices/MyService.asmx" ResourcePopulationMode="ServerSide" /> <AdvancedEditTemplate> <div> <a id="lnkDetails" href="#">View Details</a> </div> </AdvancedEditTemplate> <ResourceStyles> <telerik:ResourceStyleMapping Key="1" ApplyCssClass="rsCategoryGreen"/> <telerik:ResourceStyleMapping Key="2" ApplyCssClass="rsCategoryRed" /> </ResourceStyles> </telerik:RadScheduler> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="radScheduler"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="radScheduler" LoadingPanelID="RadAjaxLoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" IsSticky="false" Width="75px" Transparency="25"> LOADING LOADING LOADING LOADING LOADING LOADING LOADING LOADING LOADING LOADING <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border: 0;" /></telerik:RadAjaxLoadingPanel><telerik:RadWindowManager ID="RadWindowManager" runat="server"> <Windows> <telerik:RadWindow ID="Info" ReloadOnShow="false" Behavior="Close, Move, Resize" Modal="true" AutoSize="true" VisibleStatusbar="false" runat="server" ShowContentDuringLoad="false" Style="z-index: 2" OnClientPageLoad="radWindow_OnClientLoad" /> </Windows> </telerik:RadWindowManager>