Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
366 views
I've added two custom buttons to the toolbar on the rad editor to save files.  I've created icons for these buttons which I've placed into a folder called "images", relative to the webpage the editor is on.  When I run the page, all the out-of-the-box buttons in the editor's toolbar are displayed.  But, the two custom buttons I've added are using a telerik default floppy disk icon for the "Save" function, and a callout bubble containing an "i" icon for the "SaveAs" function instead of the images I've specified.

View source on the browser shows the codebehind did not insert the paths to the images specified by the ImageUrl attributes.  I've looked around the telerik forum and found some posts saying stylesheet classes are required, however, adding them hasn't helped.  The css classes only affect clientside script, and the omission of the images seems to be happening serverside.

What am I doing wrong?

I'm using Telerik RAD controls 2011.2.915.35 on windows 7 SP1 and am launching the page from inside of visual studio on the personal web browser.

directory structure:
[AllLanguagesSolution]
   [Images]
*      radeditorSave.jpg
*      radeditorSaveAs.jpg
   [Images] END
*   HTMLeditor.aspx
[AllLanguagesSolution] END

<head runat="server">
<title>HTML Editor Dialog</title>
<link href="styles/Main.css" rel="stylesheet" type="text/css" />
<link href="styles/authorit.css" rel="stylesheet" type="text/css" /> 
    <style type="text/css">
        .reTool .Save
        {
            background-image: url(Images/radeditorSave.jpg);
        }
        .reTool .SaveAs
        {
            background-image: url(Images/radeditorSaveAs.jpg);
        }
    </style> 
</head>

<form id="frmHTMLeditor" runat="server">
<table>
<tr><td>
<telerik:RadScriptManager ID="mgrScriptHTMLeditor" Runat="server"></telerik:RadScriptManager>
</td></tr>
<tr><td>
<telerik:RadEditor ID="telerikeditor" Runat="server"
                   OnClientLoad="onClientLoad"
                   OnClientCommandExecuting="OnClientCommandExecuting">
    <Tools>
        <telerik:EditorToolGroup Tag="grpInputOutput">
            <telerik:EditorTool ImageUrl="./Images/radeditorSave.jpg"
                ImageUrlLarge="~/Images/radeditorSave.jpg" Name="Save" ShowText="True"
                Text="Save" />
            <telerik:EditorTool ImageUrl="./Images/radeditorSaveAs.jpg"
                ImageUrlLarge="~/Images/radeditorSaveAs.jpg" Name="SaveAs" ShowText="True"
                Text="Save As" />
        </telerik:EditorToolGroup>       
   </Tools>      
   <Content></Content>             
</telerik:RadEditor>

Waseem
Top achievements
Rank 1
 answered on 05 Sep 2014
2 answers
257 views

Hi,

I have issue with some of the tools icons in RadEditor. Some of the icon shows and functioning as it supposed to, but some it does not show the icon image and looks like it has some problem firing the event for the button as well. This is really simple and I haven’t used any JavaScript. I also attached couple of images for mentioned issue.

Your advice and help would greatly be appreciated!



<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="TestAndDelete._Default" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
 
    <telerik:RadEditor ID="RadEditor1" runat="server">
        <Tools>
            <telerik:EditorToolGroup>
                <telerik:EditorTool Name="Font" />
                <telerik:EditorTool Name="Paragraph" />
                <telerik:EditorTool Name="Italic" />
                <telerik:EditorTool Name="InsertTable" />
            </telerik:EditorToolGroup>
        </Tools>
        <Content>
</Content>
    </telerik:RadEditor>
</asp:Content>
Waseem
Top achievements
Rank 1
 answered on 05 Sep 2014
6 answers
127 views
I have setup the web.config to use my custom theme:

<appSettings>
    <add key="Telerik.EnableEmbeddedSkins" value="false" />
    <add key="Telerik.Skin" value="Portal" />
  </appSettings>

This works when I have:
<compilation debug="false" 

When I set debug="true" I get 404 errors for the custom images etc I am using on the RadGrid, e.g.:

GET /NotFound?aspxerrorpath=/PortalDev/Content/Grid/sprite.gif HTTP/1.1  <-- missing the path to Portal theme

The path used when debug is false (and this works) is: "PortalDev/Content/themes/Portal/Grid/sprite.gif"

What setting do I need to use to get this to work?

Thanks
Tony
Pavlina
Telerik team
 answered on 05 Sep 2014
3 answers
263 views
Hello, 

Along with this post you will find a screen shot of my user control made with the RadMenu.

Basically, I need each items from the RadMenu to be the same width and also, to use all the width available.
The RadMenu consists of the grey bar that contains Quote, Purchase Order, Ready for delivery and Delivered quantity.

I also want to keep a little bit of padding on the left and right. 

I found a solution to this problem using javascript but I can't apply it to my situation because everything present in the screenshot is in a user control 
(i.e: The control contains: Picture under the blue rectangle and hom/about/logout, plus the RadMenu).

So I can't really access to the RadMenu with Javascript. 

Solution using Javascript: http://www.telerik.com/support/kb/aspnet-ajax/menu/details/stretching-menu-items-to-fill-the-entire-width-of-radmenu

Thanks for helping me out, I can provide more information if needed.
Mark
Top achievements
Rank 1
 answered on 05 Sep 2014
1 answer
213 views
Hi,
this is my code and i want old value along with new value to update record,i am done with new value but not getting idea @ old value

<telerik:RadGrid ID="RadGridTaskActivity" runat="server"
    OnNeedDataSource="RadGridTaskActivity_NeedDataSource"     onupdatecommand="RadGridTaskActivity_UpdateCommand" >
    <MasterTableView EditMode="EditForms" AutoGenerateColumns="true"
        CommandItemDisplay="Top" CommandItemSettings-ShowAddNewRecordButton="true" >
        <EditFormSettings FormMainTableStyle-HorizontalAlign="Center" EditColumn-ButtonType="PushButton"             InsertCaption="Add New Activity" >
            <FormStyle Width="100%" BackColor="LightCyan"></FormStyle>
        </EditFormSettings>
        <Columns>
            <telerik:GridEditCommandColumn HeaderStyle-Width="80px" ButtonType="ImageButton" UniqueName="EditColumn" HeaderText="Edit">
            </telerik:GridEditCommandColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

protected void RadGridTaskActivity_UpdateCommand(object sender, GridCommandEventArgs e)
       {
           GridEditableItem EditItem = e.Item as GridEditableItem;
           RadTextBox txtTestName = (RadTextBox)EditItem["ActiVityName"].FindControl("txtTestName");
           Hashtable newValues = new Hashtable();
           e.Item.OwnerTableView.ExtractValuesFromItem(newValues, EditItem);
           string NewActivityName = newValues["ActivityName"].ToString();
          //I WANT OLD ACTIVITY NAME ALSO WHICH I CAN SEE IN "GridEditableItem"
       }

Thanks.
Angel Petrov
Telerik team
 answered on 05 Sep 2014
1 answer
183 views
Hello,

I've a grid with Batch Edit Mode enabled, In this grid I have a Template column that contains a RadComboBox with Checkboxes enabled, The issue is once the save changes button is cliked and the page posts back, I cannot find a way to get the Checked checkboxes collection. Im trying to achieve this by using BatchEditCommand method.

Is there anyway to achieve this??

My grid looks like this:

<telerik:RadGrid runat="server" ID="gv_ItemGrid" PageSize="50" Skin="Office2007" AllowSorting="true" AllowMultiRowSelection="true" AllowMultiRowEdit="true" AllowPaging="True" ShowGroupPanel="false" HeaderStyle-HorizontalAlign="Center" ClientSettings-AllowKeyboardNavigation="true" AutoGenerateColumns="false" AllowAutomaticDeletes="false" AllowAutomaticInserts="false" AllowAutomaticUpdates="false" OnNeedDataSource="gv_ItemGrid_NeedDataSource"  OnItemDataBound="gv_ItemGrid_ItemDataBound" OnBatchEditCommand="gv_ItemGrid_BatchEditCommand">
<PagerStyle Mode="NextPrevAndNumeric"/>
<ClientSettings AllowRowsDragDrop="False" AllowColumnsReorder="false" ReorderColumnsOnClient="false" EnableRowHoverStyle="true">
<Resizing AllowColumnResize="false" />
<Selecting AllowRowSelect="false" EnableDragToSelectRows="false"/>
<Scrolling AllowScroll="false" UseStaticHeaders="false"/>
<ClientEvents OnBatchEditOpening="batchEditOpening" OnBatchEditOpened="batchEditOpened" />
</ClientSettings>
<MasterTableView Name="gv_Items" CommandItemDisplay="Top" EditMode="Batch" DataKeyNames="PK">
<Columns>
<telerik:GridBoundColumn UniqueName="PK" DataField="PK" HeaderText="PK" Display="false"></telerik:GridBoundColumn>
    <telerik:GridBoundColumn UniqueName="ItemCode" DataField="ItemCode" HeaderText="Item Code" SortExpression="ItemCode" HeaderStyle-Width="70px"></telerik:GridBoundColumn>
    <telerik:GridBoundColumn UniqueName="Locations" DataField="Locations" HeaderText="Allocated to" HeaderStyle-Width="100px" Display="false"></telerik:GridBoundColumn>
    <telerik:GridBoundColumn UniqueName="ItemDescription" HeaderText="Item Name" DataField="ItemDescription" HeaderStyle-Width="200px" ></telerik:GridBoundColumn>
    <telerik:GridBoundColumn UniqueName="ManufactureDescription" HeaderText="Manufacture Description" DataField="ManufactureDescription" HeaderStyle-Width="100px" ></telerik:GridBoundColumn>
    <telerik:GridNumericColumn UniqueName="Cost" HeaderText="Cost" DataField="Cost" NumericType="Currency" DecimalDigits="2" AllowRounding="false" HeaderStyle-Width="60px" ></telerik:GridNumericColumn>
    <telerik:GridTemplateColumn UniqueName="CategoryIDs" HeaderText="Category Allocation" HeaderStyle-Width="300px" >
    <ItemTemplate>
        <asp:Label ID="lblCategoryLine" runat="server" Text='<%# Eval("CategoryIDs") %>' ></asp:Label>
    </ItemTemplate>
    <EditItemTemplate>
        <telerik:RadComboBox runat="server" EnableLoadOnDemand="true" ID="RadComboBox1" OnItemsRequested="RadComboBox1_ItemsRequested" DataTextField="LineCatDesc" DataValueField="seq" Skin="Office2007" MaxHeight="120px" Width="400px" CheckBoxes="true" EnableCheckAllItemsCheckBox="true"></telerik:RadComboBox>
    </EditItemTemplate>
        </telerik:GridTemplateColumn>
    <telerik:GridCheckBoxColumn UniqueName="active" HeaderText="Active" DataField="active" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="30px" ></telerik:GridCheckBoxColumn>
    <telerik:GridCheckBoxColumn UniqueName="isFilter" Display="false" HeaderText="Reports Filter" DataField="isFilter" ItemStyle-HorizontalAlign="Center"></telerik:GridCheckBoxColumn>
    <telerik:GridButtonColumn Visible="true" ConfirmText="Delete this Item?" ButtonType="ImageButton" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
    <HeaderStyle Width="30px" />
    <ItemStyle HorizontalAlign="Center"/>
    </telerik:GridButtonColumn>
    </Columns>
        <CommandItemSettings ShowRefreshButton="false"  />
</MasterTableView>
</telerik:RadGrid>


and below my code behind scenes :D

protected void gv_ItemGrid_BatchEditCommand(object sender, GridBatchEditingEventArgs e)
        {
            foreach (GridBatchEditingCommand command in e.Commands)
            {
 
                if (command.Type == GridBatchEditingCommandType.Update)
                {
                    Hashtable newValues = command.NewValues;
                    Hashtable oldValues = command.OldValues;
                    RadComboBox ddlDesc = gv_ItemGrid.FindControl(gv_ItemGrid.MasterTableView.ClientID + "_CategoryIDs").FindControl("RadComboBox1") as RadComboBox;
 
                    string selectedValues = String.Empty;
                    if (ddlDesc.CheckBoxes) {
                        for (int i = 0; i < ddlDesc.CheckedItems.Count; i++)
                        {
                            selectedValues += (selectedValues == String.Empty)?(ddlDesc.CheckedItems[i] as RadComboBoxItem).Value:"," + (ddlDesc.CheckedItems[i] as RadComboBoxItem).Value;
                        }
                    }
 
                    for (int i = 0; i < ddlDesc.Items.Count; i++)
                    {
                        selectedValues += (selectedValues == String.Empty) ? ((ddlDesc.Items[i].Checked)?ddlDesc.Items[i].Value:string.Empty) : ((ddlDesc.Items[i].Checked)?"," + (ddlDesc.CheckedItems[i] as RadComboBoxItem).Value:string.Empty);
                        selectedValues += ddlDesc.Items[i].Checked.ToString();
                    }
                     
                    UBGlobal.SendEmail("Checkboxes Count", ddlDesc.Items.Count.ToString());
                }
 
                 
            }
 
        }


for statements are never happening since Item.checked and CheckedItems count is always Zero.

Any help would be greatly appreciated.

Thks in advance.
Angel Petrov
Telerik team
 answered on 05 Sep 2014
4 answers
80 views
I'm in the process of creating a custom email client using the Telerik grid and treeview controls. I have modeled some of the UI on the Telerik WebMail sample, in that the grid of email headers allows single selection in order to display the message body below. However, I also need to support multiple selection of rows and to be able to drag and drop those selected rows. I am able to do this, but there is a disturbing side effect when multiple rows are selected (via ctrl-click or select-click - no drag to select, that is turned off). Whenever additional rows are selected, it looks as if the grid is selected in much the same way as an HTML table would be if the user had clicked and dragged on the rows. The functionality of dragging and dropping works, but the highlighting of other rows that were not meant to be selected is very distracting to the user. I don't notice this behavior on other Telerik samples that demonstrate multiple selection and/or drag-drop, so I'm at a loss as to what is causing the problem on my end. Perhaps the combination of single selection and multiple selection is causing the behavior.

In any case, I have included a screenshot of what the grid looks like after the multiple selections are made in order to illustrate the problem. The rows that have a green background are the ones that I've actually meant to select, yet all of the other rows are "selected" as well - as if the user had intentionally dragged to select them.

Here is code related to the way the grid is set up in the ASPX file.
<telerik:RadGrid runat="server" ID="rgrdEmails" Height="100%" BorderWidth="0"
    AutoGenerateColumns="false" GridLines="Both" ShowGroupPanel="true"
    OnNeedDataSource="rgrdEmails_NeedDataSource" AllowMultiRowSelection="True"
    OnRowDrop="rgrdEmails_RowDrop" OnSelectedIndexChanged="rgrdEmails_SelectedIndexChanged">
    <ClientSettings AllowDragToGroup="True" EnableRowHoverStyle="true" AllowRowsDragDrop="True" EnablePostBackOnRowClick="true">
        <Selecting AllowRowSelect="true" EnableDragToSelectRows="False" />
        <Scrolling AllowScroll="True" UseStaticHeaders="True" />
        <ClientEvents OnRowDblClick="grdDblClick" OnRowDropping="onRowDropping" />
    </ClientSettings>
    <MasterTableView TableLayout="Fixed" Width="100%" GroupLoadMode="Client"
        DataKeyNames="EmailId" ClientDataKeyNames="EmailId,Subject" AdditionalDataFieldNames="Date">
        <GroupByExpressions>
            <telerik:GridGroupByExpression>
                <GroupByFields>
                    <telerik:GridGroupByField FieldName="DateResult" HeaderValueSeparator=":" SortOrder="Descending" />
                </GroupByFields>
                <SelectFields>
                    <telerik:GridGroupByField FieldName="DateResult" HeaderText="Date" FormatString="{0:d}" />
                </SelectFields>
            </telerik:GridGroupByExpression>
        </GroupByExpressions>
        <Columns>
            <telerik:GridDragDropColumn runat="server" HeaderStyle-Width="18px"/>
            <telerik:GridBoundColumn DataField="From" HeaderText="From" HeaderStyle-Width="120px"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Subject" HeaderText="Subject"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Received" HeaderText="Date" HeaderStyle-Width="150px"
                GroupByExpression="DateResult Date GROUP BY DateResult">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="EmailId" Visible="false"></telerik:GridBoundColumn>
            <telerik:GridCalculatedColumn UniqueName="Date" DataType="System.DateTime" DataFields="Received"
                Expression="Received.ToShortDateString()" HeaderText="Date" Visible="false">
            </telerik:GridCalculatedColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

Notice that I also allow double clicking a row to bring up a pop-up window. Finally, the grid is inside of a RadPane which is inside of a RadSplitter. Hopefully, that doesn't make any difference in this case.

Does anyone know a way around this issue? Any help will be appreciated.
Shark75
Top achievements
Rank 2
 answered on 05 Sep 2014
1 answer
44 views
Hai i want to open the Radwindow when i  clcik on scheduler on server side  will u please help me i am not getting the server side event
Hristo Valyavicharski
Telerik team
 answered on 05 Sep 2014
4 answers
147 views
Hello.  The RadSearchBox control doesn't seem to be registering the last few inputs on devices that are not on super fast connections.  Within the office on a T1, the control works beautifully fast.  Outside of the office, it seems to miss 1 or 2 of the last letters that were input.  Is there any way to code the control to look for any text chanaged event and to resend the filter request to the server before displaying the results or cancel the search if a keypress is detected and restart the search?  The photo is a screenshot of what is displayed after typing in "Grey", you'll noticed it missed the "y".  On slower mobile devices, it can get worse and miss entire words while it's searching.
Dimitar
Telerik team
 answered on 05 Sep 2014
1 answer
78 views
Case: In place radgrid editing.

When that grid opens, the edit form (WebUserControl) opens automatically for the last edited (saved or cancelled) row.
Please look at the attached screen and let me know the possible places in the code which initiates the opening of that edit form.

Thanks
Viktor Tachev
Telerik team
 answered on 05 Sep 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?