Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
175 views
I would like to use RadEditor to edit content in a CMS.

Of course I want WYSIWYG editing using the same style sheet that I use in the website.

From what I have read in the forums and documentation it seems that I need to create a second style sheet just for RadEditor to use.

In my CMS system the dynamic content is in a specific container, so I hoped I could just specify the ID or class name of the container and RadEditor could use the website style sheet but this does not appear to be possible. (something like CKEDITOR's bodyClass or bodyId)

My other option, which I have used with other editors, is to make the CSS classes that are used in the content area the default for that HTML tag. For example, if all hyperlinks in the content area are to be red then that is the default for the "A" tag and if I want any other colour outside of the content area then I apply a class name to it. This method works with RadEditor except it ruins the display of toolbars and dialogs if some attributes are changed, for example LI tags. Unfortunately the RadEditor style sheet for toolbars and dialogs don't reset a lot of CSS attributes.

So my question is, is there a way of using RadEditor in this circumstance, without having to create a second style sheet and have to maintain two style sheets?
Rumen
Telerik team
 answered on 04 Aug 2011
2 answers
91 views

Hi,
With the help of the posts in  http://www.telerik.com/community/forums/aspnet/grid/72051-radgrid-print.aspx#1532370 I could print the entire contents of radgrid in Internet Explorer and mozilla .But  I am not able to print the radgrid of certain web pages of the application  in same version of   mozilla while able to do that in internet explorer.For those pages, the below function PrintRadGrid returns null for $find(radGridId).

For the non-working pages , if i put a alert  as the first line of the function PrintRadGrid , then it is working

Could any body please explain why this happens and  how to make it working ...

function getOuterHTML(obj) {
            if (typeof (obj.outerHTML) == "undefined") {
                var divWrapper = document.createElement("div");
                var copyOb = obj.cloneNode(true);
                divWrapper.appendChild(copyOb);
                return divWrapper.innerHTML
            }
            else
                return obj.outerHTML;
        }

        function PrintRadGrid(radGridId) {

            var radGrid = $find(radGridId);
            var previewWnd = window.open('about:blank', '', '', false);
            var sh = '<%# ClientScript.GetWebResourceUrl(grdName.GetType(),String.Format("Telerik.Web.UI.Skins.{0}.Grid.{0}.css",grdName.Skin)) %>';
            var styleStr = "<html><head><link href = '" + sh + "' rel='stylesheet' type='text/css'></link></head>";
            var htmlcontent = styleStr + "<body>" + getOuterHTML(radGrid.get_element().parentNode) + "</body></html>";
            previewWnd.document.open();
            previewWnd.document.write(htmlcontent);
            previewWnd.document.close();
            previewWnd.print();
            previewWnd.close();

            radGrid.get_masterTableView().fireCommand("EnablePaging", "");
        } 

And in code behind

 RadPnl.ResponseScripts.Add("PrintRadGrid('" + grdNmae.ClientID + "')");

Thanks

 

 

Daniel
Telerik team
 answered on 04 Aug 2011
3 answers
56 views
Version: 2011.1.519.35

When you left click down and hold on the slider handle and move your mouse left or right the handle will not move. If you click in front or behind the handle on the slide scale the handle will move. This only happens in IE9.

Can you confirm replication of this issue? If so, when can we expect a fix?
Niko
Telerik team
 answered on 04 Aug 2011
2 answers
183 views
Hi, I have an hierarchical grid.  masterTableView and DetailTables.
DetailTables has a GridClientSelectColumn that allows to select rows (multiselection)

<telerik:RadGrid ID="RadGridResources" runat="server" Width="950px" ShowStatusBar="true"
            AutoGenerateColumns="False" PageSize="7" AllowSorting="True" AllowMultiRowSelection="True"
            AllowPaging="True">
            <PagerStyle Mode="NumericPages"></PagerStyle>
            <MasterTableView Width="100%" DataKeyNames="IDResource" AllowMultiColumnSorting="True" HierarchyDefaultExpanded="true">
                
                    <DetailTables>
                        <telerik:GridTableView DataKeyNames="IDSlot" Name="Slot" Width="100%">
                            <Columns>
 
                                 <telerik:GridClientSelectColumn HeaderStyle-Width="40px"
                                                                UniqueName="CheckboxSelectIDSlotColumn"                                                                
                                                                >
                                    <HeaderStyle Width="40px" />
                                </telerik:GridClientSelectColumn>
                                 
                                <telerik:GridBoundColumn SortExpression="IDSlot" HeaderText="IDSlot" HeaderButtonType="TextButton"
                                    DataField="IDSlot">
                                </telerik:GridBoundColumn>                             
 
                                <telerik:GridBoundColumn SortExpression="Code" HeaderText="Code" HeaderButtonType="TextButton"
                                    DataField="Code">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn SortExpression="Description" HeaderText="Description" HeaderButtonType="TextButton"
                                    DataField="Description">
                                </telerik:GridBoundColumn>
                            </Columns>
                        </telerik:GridTableView>
                    </DetailTables>
                       
                <Columns>
                    <telerik:GridBoundColumn SortExpression="IDResource" HeaderText="IDResource" HeaderButtonType="TextButton"
                        DataField="IDResource">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Code" HeaderText="Code" HeaderButtonType="TextButton"
                        DataField="Code">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Description" HeaderText="Description" HeaderButtonType="TextButton"
                        DataField="Description">
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
 
            <ClientSettings enablePostBackOnRowClick="true">
                <ClientEvents  />
                <Selecting AllowRowSelect="true" />
            </ClientSettings>
        </telerik:RadGrid>


any time a row is selected I would like to get all the selected rows collection. Think can use selectedIndexChanged...

Protected Sub RadGridResources_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadGridResources.SelectedIndexChanged
        Try
 
            Dim selectedItems As New ArrayList
            Dim idSlot As Long
 
                For i = 0 To RadGridResources.SelectedItems.Count - 1
                    Dim dataItem As GridDataItem = RadGridResources.SelectedItems(i)
                    idSlot = dataItem("IDSlot").Text
                    selectedItems.Add(idSlot)
                  
 
                Next
 
              'TO DO
 
 
        Catch ex As Exception
 
        End Try
    End Sub

In the away here above I find all IDSlot (child) selected values but I don't know how to find their IDResource (parent)

Thank you
Jean-Marc
Top achievements
Rank 1
 answered on 04 Aug 2011
11 answers
532 views
Hi,
I have a rad combobox in Ajax update panel inside an ascx control. I need to show a confirm box every time the combo box is changed based on a condition. If the user chooses not to go with the change, I need to set the combo box value to the previous one.
I was able to use ScriptManager.RegisterStartupScript to show the confirm box from the SelectedIndexChanged event. But I'm not able to set the combo box value to previous one. I keep getting null for $find on the combo box. Please find the related code below. Any help is greatly helpful as I need to resolve this ASAP.

ASCX code:
<telerik:RadCodeBlock ID="rcbCodeBlock" runat="server">

    <script type="text/javascript">
        function ShowConfirmOrgCode(oldValue, combo) {
            if (!confirm('Do you want to continue...?')) {
                var orgcombo = $find(combo);
                if (orgcombo != null) {
                    alert(orgcombo.get_selectedIndex());
                    orgcombo .findItemByValue(oldValue).select();
                }
            }
        }
    </script>

</telerik:RadCodeBlock>

           <asp:UpdatePanel ID="updatePanelOrgCode" runat="server">
                <ContentTemplate>
                 <telerik:RadComboBox ID="ddlOrgCode" Width="300px" runat="server" AutoPostBack="true" Height="100px"
                DropDownWidth="570px" MarkFirstMatch="true" EnableLoadOnDemand="false" />
            <asp:RequiredFieldValidator ID="ddlOrgCodereqval" Enabled="true" runat="server" ControlToValidate="ddlOrgCode"
                Display="None" InitialValue="<<- Select Organization Code ->>" ErrorMessage="Organization code is required."
                ValidationGroup="Group1"></asp:RequiredFieldValidator>
            <asp:HiddenField ID="hiddenOrgCode" runat="server" />
            <asp:HiddenField ID="hiddenHasAccess" runat="server" />
                </ContentTemplate>
            </asp:UpdatePanel>


Code Behind:

        protected void ddlOrgCode_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            if (ddlOrgCode.SelectedIndex != -1)
            {
                OrganizationCodeCollection ogc = base.CurrentPDCreator.GetAssignedOrganizationCodes();
                int selectedOrgCode = Convert.ToInt32(ddlOrgCode.SelectedValue);
                string oldValue = hiddenOrgCode.Value;
                bool hasAccess = ogc.Contains(selectedOrgCode);
                string sorg = ddlOrgCode.ClientID;
                if (!hasAccess)
                {
                    hiddenHasAccess.Value = hasAccess.ToString();
                    string strScript = "setTimeout(ShowConfirmOrgCode('" + oldValue + "', '" + sorg + "'), 500);";
                    ScriptManager.RegisterStartupScript(updatePanelOrgCode, GetType(), "OrgCodePopup", strScript, true);
                }
                else
                {
                    hiddenOrgCode.Value = selectedOrgCode.ToString();
                }
            }
        }
Dimitar Terziev
Telerik team
 answered on 04 Aug 2011
2 answers
166 views
Hi,

I'm using the radbutton with the download icon to allow users to download files.

This works fine in most cases accept for mime types that the browser recognizes and opens directly
in the browser when the user would rather not open the file, but prefers to "Save As..." the file instead.

When I use a standard ASP.net hyperlink the user can either click to open or right click and select
"Save Target As..." and save it without opening it.

Is there any way to make the browsers work this way when using the radbutton as a download hyperlink?

Thank,
Scott
Slav
Telerik team
 answered on 04 Aug 2011
2 answers
219 views

I have a RadMenu in a SharePoint master page. The problem is,  when I select the site Actions dropdown it appears behind the RadMenu.  The Default z-index of the menu is 7000, I’ve set it to (z-index  3 !important) with no change to the issue.

How should I configure the RadMenu to appear below the SharePoint Site Actions Menu, But will still remain above the other Telerik controls.


Kate
Telerik team
 answered on 04 Aug 2011
3 answers
240 views

GridGroupHeaderItem groupHeader = dtgLeads.MasterTableView.GetItems(GridItemType.GroupHeader)[index] as GridGroupHeaderItem;
  
GridItem[] children = groupHeader.GetChildItems();
bool hasChild = groupHeader.HasChildItems;
children.Count() > 0
  
flag = true;
foreach (GridItem child in children)
{}

I got error on (GridItem child in children) line. If i use GridDataItem in place of GridItem again i got error, I ve done this on trila version now we have Paid 2011 Q2 Ajax control version, now its not running. even the code is copied and pasted from the project that was runing with trial version.

Thanks
Andrey
Telerik team
 answered on 04 Aug 2011
3 answers
134 views
Hi All,
Please view the attachment . I have just modified filtering style. Please let me can I achive a kind of filtering style as show in  the attachment  . I adding the filtering option as icon in the column header itself . And when I click on that icon I should be able to get the drop down list with filtering values.


Thanks ...

saravanakumar subramaniam
Top achievements
Rank 1
 answered on 04 Aug 2011
10 answers
340 views
Hi,

how to disable the Drag and drop feature for images in RadEditor. Currently , i can drag any image in my web page and drop this to Rad Editor. how to disable that ? but at the same time i want the copy/paste functionality for images in rad editor.
Rumen
Telerik team
 answered on 04 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?