Hi,
I have a problem with adding a toolbar in code in combination with the LoadToolsFile method of the RadEditor. When I use only one of them everything works fine. But when I use them both I only see the toolbar added from code. It doesn't change when I call the SetToolbar method after the creation of the dynamic toolbar.
I have the following code:
SetToolbar();
//add a new Toolbar dynamically
EditorToolGroup dynamicToolbar = new EditorToolGroup();
radTextEditor.Tools.Add(dynamicToolbar);
//add a custom dropdown and set its items and dimension attributes
EditorDropDown ddn = new EditorDropDown("DynamicDropdown");
ddn.Text =
"Dynamic dropdown";
//Set the popup width and height
ddn.Attributes[
"width"] = "110px";
ddn.Attributes[
"popupwidth"] = "240px";
ddn.Attributes[
"popupheight"] = "100px";
//Add items
ddn.Items.Add(
"Project Name", "{Project.Name}");
ddn.Items.Add(
"Person Firstname", "{Person.FirstName}");
ddn.Items.Add(
"Person Zipcode", "{Person.ZipCode}");
//Add tool to toolbar
dynamicToolbar.Tools.Add(ddn);
The method SetToolbar does the following:
private
void SetToolbar()
{
DAData dab = new DAData(ConfigurationManager.ConnectionStrings["configuration"].ConnectionString);
dab.CommandName =
"usp_RadEditorTools_Load";
dab.AddSqlParameter(
"projectId", long.Parse(ConfigurationManager.AppSettings["CNGRSProject"]));
dab.AddSqlParameter(
"resourceId", this.ResourceId);
string ret = (string)dab.GetReturnValue();
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(ret);
radTextEditor.LoadToolsFile(xmlDoc);
radTextEditor.EnsureToolsFileLoaded();
}
I guess I'm forgetting something... but I just cannot see what that is.
Can anybody help me on this one?
Bye,
Aldert
(I appologize if it is duplicate)
I'm trying to load a schedular in appointment mode, and get the appointment parameters like RecurrenceState and RecurrenceRule to save in my DB. How can I get AppointmentCreatedEventArgs params?
<telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True"
AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True"
DataSourceID="SqlDataSource1" GridLines="None" Skin="Hay"
AllowAutomaticInserts="True"
AllowAutomaticUpdates="True"
AllowAutomaticDeletes="True"
AllowMultiRowEdit="True"
>
<MasterTableView AutoGenerateColumns="False" DataKeyNames="ID_News"
DataSourceID="SqlDataSource1">
<RowIndicatorColumn>
<HeaderStyle Width="20px" />
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px" />
</ExpandCollapseColumn>
<Columns>
<telerik:GridBoundColumn DataField="ID_News" DataType="System.Int32"
HeaderText="ID_News" ReadOnly="True" SortExpression="ID_News"
UniqueName="ID_News">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Title" HeaderText="Title"
SortExpression="Title" UniqueName="Title">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Text" HeaderText="Text"
SortExpression="Text" UniqueName="Text">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Date" DataType="System.DateTime"
HeaderText="Date" SortExpression="Date" UniqueName="Date">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<FilterMenu EnableTheming="True" Skin="Vista">
<CollapseAnimation Duration="200" Type="OutQuint" />
</FilterMenu>
</telerik:RadGrid>
AllowAutomaticInserts="True" : this option is set up.
However, I can't see the Insert button inside the grid.
Update / Delete work fine though.
Any ideas ?
| <INPUT id=ctl15_ctl07_ctl02_ctl03_ctl02_9cfe62be-f27b-4b57-8329-46294c5e2cfe_RadPanelBar1_ClientState type=hidden value='{"expandedItems":["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"],"logEntries":[],"selectedItems":[]}' name=ctl15_ctl07_ctl02_ctl03_ctl02_9cfe62be-f27b-4b57-8329-46294c5e2cfe_RadPanelBar1_ClientState autocomplete="off"> |
| <telerik:RadPanelBar ID="RadPanelBar1" runat="server" Skin="Outlook" Width="100%" Height="100%" ExpandMode="SingleExpandedItem"> |
| <Items> |
| <telerik:RadPanelItem Value="Locations" Text="Locations" Expanded="true" PreventCollapse="true" |
| ImageUrl="Images/office-building.png" CssClass="mainPanel"> |
| <Items> |
| <%-- Current Location --%> |
| <telerik:RadPanelItem Value="CurrentLocation" Text="Current Location" Expanded="true" CssClass="subPanel" > |
| <ItemTemplate> |
| <div class="currentLocationDiv" id="LocationAddress"></div> |
| </ItemTemplate> |
| </telerik:RadPanelItem> |
| <%-- Sub Locations Tree --%> |
| <telerik:RadPanelItem Value="SubLocations" Text="Sub Locations" Expanded="true" CssClass="subPanel"> |
| <ItemTemplate> |
| <asp:PlaceHolder runat="server" id="addTreeHere" /> |
| </ItemTemplate> |
| </telerik:RadPanelItem> |
| </Items> |
| </telerik:RadPanelItem> |
| </Items> |
| </telerik:RadPanelBar> |
<%
@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="GateKeeper.Test" %>
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml" >
<
head runat="server">
<title></title>
<telerik:RadCodeBlock runat="server">
<script>
function Configuration() {
var oInput = $get('<%= TestTextBox.ClientID%>');
oInput.set_value(
'Test');
}
</script>
</telerik:RadCodeBlock>
</
head>
<
body onload="Configuration()">
<form runat="server" id="form1">
<telerik:RadScriptManager runat="server"></telerik:RadScriptManager>
<telerik:RadTextBox ID="TestTextBox" runat="server"></telerik:RadTextBox>
</form>
</
body>
</
html>
Please help!