or
<script language="javascript" type="text/javascript"> function btnTemplate_onclick() { checkscript(); } function checkscript(){ var editor = $find("<%=txtRegister.ClientID %>"); //get a reference to RadEditor client object mytext = editor.get_html(true); //Some more steps } </script> <telerik:RadPanelBar ID="RadPanelBar1" Runat="server" Width="750px" AllowCollapseAllItems="True" Skin="Office2007"> <Items> <telerik:RadPanelItem runat="server" Text="Deleted Templates" Value="DeletedTemplates"> <Items> <telerik:RadPanelItem runat="server" Value="Test"> <ItemTemplate> <telerik:RadEditor ID="txtRegister" Runat="server" EditModes="Html" Height="100px" ReadOnly="false" Skin="Sitefinity" ToolbarMode="ShowOnFocus" Width="100%" Visible="False"> </telerik:RadEditor> <input id="btnTemplate" type="button" value="Do Something" onclick="return btnTemplate_onclick()" /> </ItemTemplate> </telerik:RadPanelItem> </Items> </telerik:RadPanelItem> </Items> </telerik:RadPanelBar>
Any ideas?
window.onload = function() { Disable(); } function Disable() { var txt = $find("RadTextBox1"); txt.disable(); }
private void BindGrid() { RadGrid1.DataSource = _dsBudgetVerification.Tables["BVSummary"]; RadGrid1.Width = Unit.Percentage(98); RadGrid1.AutoGenerateColumns = false; RadGrid1.GridLines = GridLines.Both; //TODO: This doesn't seem to work RadGrid1.CssClass="gridborder"; RadGrid1.MasterTableView.DataKeyNames = new string[] { "ExpenditureType" }; RadGrid1.MasterTableView.Name = "tvSummary"; RadGrid1.MasterTableView.HierarchyLoadMode = GridChildLoadMode.ServerBind; //RadGrid1.MasterTableView.HierarchyLoadMode = GridChildLoadMode.Client; //RadGrid1.ClientSettings.AllowExpandCollapse = true; //Add Summary table RadGrid1.MasterTableView.Width = Unit.Percentage(100); GridBoundColumn boundColumn; GridDropDownColumn ddlColumn; foreach (DataColumn dataColumn in _dsBudgetVerification.Tables["BVSummary"].Columns) { //these apply to every column in Summary boundColumn = new GridBoundColumn(); RadGrid1.MasterTableView.Columns.Add(boundColumn); boundColumn.HeaderText = dataColumn.Caption; boundColumn.HeaderStyle.CssClass = "gridheader"; //we know the column names of the text fields, so let's set their formatting switch (dataColumn.Caption) { case "EscalatorID": case "EscalatorName": { //TODO: figure out how to add combobox here boundColumn.DataField = dataColumn.Caption; break; } case "ExpenditureType": case "ExpenditureTypeExists": { boundColumn.DataField = dataColumn.Caption; if (dataColumn.Caption == "ExpenditureTypeExists") boundColumn.Visible = false; break; } default: //anything else will be an amount { boundColumn.DataField = dataColumn.Caption; boundColumn.HeaderStyle.Width = 50; //also build our list of months for use in the Total column lstMonths += '"' + dataColumn.ColumnName + '"' + ','; break; } } } //now trim the last comma off the list lstMonths = lstMonths.Substring(1, lstMonths.Length - 3); //now add a calculated Total column at the end of the summary CreateCalcColumn(RadGrid1.MasterTableView, lstMonths); //Add Details table GridTableView tableViewDetails = new GridTableView(RadGrid1); RadGrid1.MasterTableView.DetailTables.Add(tableViewDetails); tableViewDetails.Width = Unit.Percentage(100); tableViewDetails.DataSource = _dsBudgetVerification.Tables["BVDetails"]; tableViewDetails.DataMember = "BVDetails"; tableViewDetails.DataKeyNames = new string[] { "ExpenditureType" }; tableViewDetails.Name = "tvDetails"; GridRelationFields relationFields = new GridRelationFields(); relationFields.MasterKeyField = "ExpenditureType"; relationFields.DetailKeyField = "ExpenditureType"; tableViewDetails.ParentTableRelation.Add(relationFields); RadGrid1.MasterTableView.DetailTables.Add(tableViewDetails); foreach (DataColumn dataColumn in _dsBudgetVerification.Tables["BVDetails"].Columns) { switch (dataColumn.Caption) { case "EscalatorID": case "EscalatorName": { //ddlColumn = new GridDropDownColumn(); //tableViewDetails.Columns.Add(ddlColumn); //ddlColumn.UniqueName = "Escalator"; //ddlColumn.ListTextField = "Escalator"; //ddlColumn.ListValueField = "EscalatorID"; //ddlColumn.ListDataMember = "Escalator"; //ddlColumn.DataSourceID = "dsrcEscalators"; //ddlColumn.DataField = dataColumn.Caption; //ddlColumn.HeaderText = dataColumn.Caption; //ddlColumn.HeaderStyle.CssClass = "gridheader"; //ddlColumn.EditItemTemplate = new ddlTemplate(); break; } default: { boundColumn = new GridBoundColumn(); tableViewDetails.Columns.Add(boundColumn); boundColumn.DataField = dataColumn.Caption; boundColumn.HeaderText = dataColumn.Caption; boundColumn.HeaderStyle.CssClass = "gridheader"; break; } } } //now add a calculated Total column at the end of the details CreateCalcColumn(tableViewDetails, lstMonths); } <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadGrid1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"> </telerik:RadAjaxLoadingPanel> <telerik:RadGrid ID="RadGrid1" runat="server" OnItemDataBound="RadGrid1_ItemDataBound" />