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

Why editor now working with toolbarmode=ribbonbar ?

1 Answer 23 Views
Editor
This is a migrated thread and some comments may be shown as answers.
aykut
Top achievements
Rank 1
aykut asked on 19 Jul 2012, 11:01 AM
below code is simple radgrid with editor support.

there's ragdrid, it open pop edit form, inside edit form there's  radeditor... I  isolated problem by removing all other stuff.

 when I write ToolbarMode="RibbonBar" then even edit form window does not shown. when I delete it, it works perfectly. there's no vb code in code file. here's the aspx page:
any suggestions ?


<%@ Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="test" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<head id="Head1" runat="server">
    <style type="text/css">
        .style4
        {
            width: 7px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div id="acContainer">
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="WebBlue">
        </telerik:RadWindowManager>
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <script type="text/javascript">
                var popUp;
                function PopUpShowing(sender, eventArgs) {
                    popUp = eventArgs.get_popUp();
                    var gridWidth = sender.get_element().offsetWidth;
                    var gridHeight = sender.get_element().offsetHeight;
                    var popUpWidth = popUp.style.width.substr(0, popUp.style.width.indexOf("px"));
                    var popUpHeight = popUp.style.height.substr(0, popUp.style.height.indexOf("px"));
                    popUp.style.left = parseInt(((gridWidth - popUpWidth) / 2) + sender.get_element().offsetLeft).toString() + "px";
                }
            </script>
        </telerik:RadCodeBlock>
        <div>
            <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
                GridLines="None" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True"
                AllowPaging="True" AllowSorting="True" CellSpacing="0" Width="1392px">
                <GroupingSettings CaseSensitive="false" />
                <ClientSettings>
                    <Selecting CellSelectionMode="None"></Selecting>
                </ClientSettings>
                <MasterTableView DataKeyNames="ID" DataSourceID="SqlDataSource1" CommandItemDisplay="Top"
                    EditMode="PopUp">
                    <CommandItemSettings ExportToPdfText="Export to PDF" ShowRefreshButton="False"></CommandItemSettings>
                    <RowIndicatorColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" HeaderText="ID" ReadOnly="True"
                            SortExpression="ID" UniqueName="ID" Visible="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="guidid" HeaderText="guidid" ReadOnly="True" SortExpression="guidid"
                            UniqueName="guidid" Visible="false">
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn DataField="news" DataType="System.String" AllowFiltering="false"
                            HeaderText="news" SortExpression="news" UniqueName="news">
                            <EditItemTemplate>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="newsLabel" runat="server" Text='<%# bind("news")%>'></asp:Label>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridEditCommandColumn EditText="edit">
                        </telerik:GridEditCommandColumn>
                        <telerik:GridButtonColumn CommandName="Delete" Text="delete" UniqueName="column"
                            ConfirmDialogHeight="200px" ConfirmDialogType="RadWindow" ConfirmDialogWidth="350px"
                            ConfirmText="are you seure ?" ConfirmTitle="confirm">
                        </telerik:GridButtonColumn>
                    </Columns>
                    <EditFormSettings EditFormType="Template" PopUpSettings-Width="850px" PopUpSettings-Height="500px">
                        <EditColumn UniqueName="EditCommandColumn1">
                        </EditColumn>
                        <FormTemplate>
                            user edit tex:
                            <p>
                            </p>
                            <telerik:RadEditor ID="txtNews" runat="server" Content='<%# bind("news") %>' Height="287px"
                                ToolbarMode="RibbonBar">
                            </telerik:RadEditor>

                            <p>
                            </p>
                            <asp:Button ID="Button1" runat="server" Height="26px" Width="81px" CommandName='<%# Iif (TypeOf Container is GridEditFormInsertItem, "PerformInsert", "Update") %>'
                                Text='<%# Iif (TypeOf Container is GridEditFormInsertItem, "add", "save") %>' />
                            <asp:Button ID="Button2" runat="server" CausesValidation="False" Text="cancel" CommandName="Cancel"
                                Height="26px" Width="81px" />
                        </FormTemplate>
                        <PopUpSettings Modal="True" />
                    </EditFormSettings>
                </MasterTableView>
                <FilterMenu EnableImageSprites="False">
                </FilterMenu>
            </telerik:RadGrid>
        </div>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionStringNET %>"
            ProviderName="<%$ ConnectionStrings:ConnectionStringNET.ProviderName %>" SelectCommand="SELECT * FROM [newstable]"
            DeleteCommand="DELETE FROM [newstable] WHERE [ID] = @ID" InsertCommand="INSERT INTO [newstable] ([news]) VALUES (@news)"
            UpdateCommand="UPDATE [newstable] SET [news] = @news  WHERE [ID] = @ID">
            <DeleteParameters>
                <asp:Parameter Name="ID" Type="Int32" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="news" Type="string" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="news" Type="string" />
            </UpdateParameters>
        </asp:SqlDataSource>
    </div>
    </form>
</body>



sql code:
CREATE TABLE [dbo].[newstable](
    [ID] [int] IDENTITY(1,1) NOT NULL,
    [news] [nvarchar](500) NULL
) ON [PRIMARY]
GO



1 Answer, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 23 Jul 2012, 05:15 PM
Hello,

We are aware of this problem and it is already fixed in the latest version of RadControls - you can verify this with the latest internal builds available for download.

In addition, the official release containing this fix (Q2 2012 SP1) is planned to be released later this week.

All the best,
Dobromir
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Editor
Asked by
aykut
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Share this question
or