Telerik Forums
UI for ASP.NET AJAX Forum
10 answers
553 views

Paste is greyed out and has stopped working in RADEditor since our users have upgraded to Firefox v52. Paste works fine in Firefox v37 and Chrome. I have created a demo page below to demonstrate the issue, can anyone help fix it?

http://fdsrv.fire-defence.com/editordemo.aspx

Rumen
Telerik team
 answered on 15 Oct 2018
0 answers
83 views

Hi

i use a kendoGrid to provide data in my .net webfrontend. The data is shown correct, but sorting and filtering is nor working. But why?

<script>
                $(document).ready(function () {
                    $("#grid").kendoGrid({
                        dataSource: {
                            type: "json",
                            transport: {
                                read: "fabico1.json"
                            },
                            schema: {
                                model: {
                                    fields: {
                                        Artikel: { type: "string" },                                       
                                        Bez: { type: "string" },
                                        Menge: { type: "number" },
                                        Einh: {type: "string"}
                                    }
                                }
                            },
                            pageSize: 30,
                            serverPaging: true,
                            serverFiltering: true,
                            serverSorting: true
                        },
                        height: 430,
                        filterable: true,
                        sortable: true,
                        pageable: true,
                        columns: [{
                            field: "Artikel",
                            width: 150,
                            filterable: true
                        },
                            {
                                field: "Bez",
                            },
                        {
                            field: "Menge"
                            },
                        {
                            field: "Einh",
                            width: 150
                        }
                        ]
                    });
                });
            </script>
ITA
Top achievements
Rank 1
 asked on 12 Oct 2018
7 answers
179 views
I support a vb.net 2010 web form application that uses the Telerik/Progress Radeditor (UI for asp.net ajax). The application
is not using the current radeditor but it is using the 1 version back of the radeditor.
The problem is once a letter has been generated, extra html is placed in the letter that is generated causing
unexepcted blank lines to appear.
The template (letter) before the letter is displayed is stored in a sql server 2016 database in a column is is called
'stringtemplate' and is setup as a varchar(max), null) column in the database. I edit the template values directly using sql
server management studio.
Here are 2 examples of problems that I am having:
1. In one template where the value is setup as
     '<br/><br/>' the values end up being '<p></p<p></p><p></p>' when the letter is actually generated.
2. in another template where the value is setup as:
<span style="font-size: 13px;font-family: arial,sans-serif; color: black;"><br />
<p>&amp;CUR_DATE.EVAL</p>
 
with the final </span> and the end of the template
the letter that is generated actually has the following html:
<span style="color: black; font-family: arial,sans-serif; font-size: 13px;"><br />
</span>
<p>10/10/2018</p>
<span style="color: black; font-family: arial,sans-serif; font-size: 13px;">
with the final </span> and the end of the letter.
Thus would you tell me and/or show me what I can do to solve the problem?
Marin Bratanov
Telerik team
 answered on 11 Oct 2018
4 answers
1.2K+ views

     Can someone provide a working example of how we can compare data in different rows but within the same column? Or see what I'm missing?

Below is a function that throws an error due to an index not existing... but the data populates. If I remove most of the code and add an alert box, it shows the itemindex #.

This grid is populated from code-behind and the columns are dynamic (meaning, specified by the data, not in the markup).

ADMIN EDIT: Solution created by OP: https://www.telerik.com/forums/compare-data-in-different-rows-but-same-column#4BzUDXkNFU2U_FM8atHFbw.

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
        {
            RadGrid radGrid = (RadGrid)sender;
            if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
            {
                GridDataItem gridDataItem = (GridDataItem)e.Item;
                if (e.Item.ItemIndex > 0)
                {
                    decimal fte;
                    decimal fteTarget;
                    GridDataItem previousGridDataItem = radGrid.Items[1];
                    GridDataItem currentGridDataItem = radGrid.Items[2];
                    for (int c = 1; c < previousGridDataItem.Cells.Count; c++)
                    {
                        if (decimal.TryParse(previousGridDataItem.Cells[c].Text, out fte) && decimal.TryParse(currentGridDataItem.Cells[c].Text, out fteTarget))
                        {
                            if (fte <= fteTarget)
                            {
                                previousGridDataItem.Cells[c].ForeColor = Utility.Green;
                            }
                            else if (fte > fteTarget)
                            {
                                previousGridDataItem.Cells[c].ForeColor = Utility.Red;
                            }
                        }
                    }
                }
}

Marin Bratanov
Telerik team
 answered on 11 Oct 2018
0 answers
52 views
whenever i set the height of the grid, and left column is frozen, the height of the panes is not even. (see attached) 

config: 

          {
                columns: treeListColumns,
                height: screen.height - 500,
                dataSource: treeListDataSource,
                columnMenu: true,
                sortable: true,
                resizable: true,
                selectable: true,
                filterable: true
            }
squarewave
Top achievements
Rank 1
 asked on 11 Oct 2018
1 answer
111 views
How can I change the colour of the unfilled portion of the progress bar? Also, is it possible to have square corners of the bar?
Marin Bratanov
Telerik team
 answered on 11 Oct 2018
2 answers
131 views

Hi,

1. Can we add our own controls, like textbox, buttons etc.. to Ribbon Bar.

2. How can i execute a javascript fuction on a button click of ribbon bar.

 

Thanks.

Saifulla
Top achievements
Rank 1
 answered on 11 Oct 2018
2 answers
72 views

Hi, i am trying to generate a dynamic table based on user input. For that i am using Ribbonbar.

Markup:

<telerik:RadRibbonBar RenderMode="Lightweight" ID="RadRibbonBar1" runat="server" Skin="Office2007" EnableMinimizing="true" OnClientButtonClicked="CreateTable() return false;">
<telerik:RibbonBarTab Text="Home">
    <telerik:RibbonBarGroup Text="Table Generator">
        <Items>
                <telerik:RibbonBarControlGroup Orientation="Horizontal">
                    <Items>
                        <telerik:RibbonBarComboBox ID="txtRow" Width="60" runat="server">
                            <Items>
                                <telerik:RibbonBarListItem Text="0" Selected="true" />
                                <telerik:RibbonBarListItem Text="2" />
                                <telerik:RibbonBarListItem Text="4" />
                                <telerik:RibbonBarListItem Text="6" />
                                <telerik:RibbonBarListItem Text="8" />
                                <telerik:RibbonBarListItem Text="10" />
                                <telerik:RibbonBarListItem Text="12" />
                                <telerik:RibbonBarListItem Text="14" />
                                <telerik:RibbonBarListItem Text="16" />
                                <telerik:RibbonBarListItem Text="18" />
                                <telerik:RibbonBarListItem Text="20" />
                            </Items>
                        </telerik:RibbonBarComboBox>
 
                        <telerik:RibbonBarComboBox ID="txtCol" Width="60" runat="server">
                            <Items>
                                <telerik:RibbonBarListItem Text="0" Selected="true" />
                                <telerik:RibbonBarListItem Text="2" />
                                <telerik:RibbonBarListItem Text="4" />
                                <telerik:RibbonBarListItem Text="6" />
                                <telerik:RibbonBarListItem Text="8" />
                                <telerik:RibbonBarListItem Text="10" />
                                <telerik:RibbonBarListItem Text="12" />
                                <telerik:RibbonBarListItem Text="14" />
                                <telerik:RibbonBarListItem Text="16" />
                                <telerik:RibbonBarListItem Text="18" />
                                <telerik:RibbonBarListItem Text="20" />
                            </Items>
                        </telerik:RibbonBarComboBox>
                         <telerik:RibbonBarButton ID="btnGenerate" runat="server" Text="Create" />
                    </Items>
                </telerik:RibbonBarControlGroup>
        </Items>
    </telerik:RibbonBarGroup>

Script:

   function createTable() {
        var rowCtr;
        var cellCtr;
        var rowCnt;
        var cellCnt;
 
        var myTableDiv = document.getElementById("myDynamicTable");
 
        var table = document.createElement('TABLE');
        table.border = '1';
        table.id = "myTable";
 
        var tableBody = document.createElement('TBODY');
        table.appendChild(tableBody);
 
        rowCnt = document.getElementById('txtrows').value;
        cellCnt = document.getElementById('txtcols').value;
 
        for (rowCtr = 0; rowCtr < rowCnt; rowCtr++) {
            var tr = document.createElement('TR');
            tableBody.appendChild(tr);
 
            for (cellCtr = 0; cellCtr < cellCnt; cellCtr++) {
                var td = document.createElement('TD');
                td.width = '120';
                td.appendChild(document.createTextNode("Row:" + rowCtr + " Column:" + cellCtr));
                tr.appendChild(td);
            }
        }
        myTableDiv.appendChild(table);
}

OnClick of button(create) dynamic table should generate. but not happening can some one suggest what i had done wrong.

 

Peter Milchev
Telerik team
 answered on 11 Oct 2018
3 answers
91 views

I am using RadEditor as part of sitecore 8.2  I have used the following Editor.DisableFilter(EditorFilters.ConvertToXhtml);  this works great if i type into the editor but if i use a code snippet the html is changed below is the example html i am using

This works fine if pasted into the html tab

<a href="#">
<h3>Title of Section</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </p>
</a>     
Marin Bratanov
Telerik team
 answered on 11 Oct 2018
1 answer
91 views

I am using this code in my handler.ashx file

public void ProcessRequest(HttpContext context)
{
Context = context;
string filePath = context.Request.QueryString["path"];
filePath = context.Server.MapPath(filePath);
if (filePath == null)
{
return;
}
System.IO.StreamReader streamReader = new System.IO.StreamReader(filePath);
System.IO.BinaryReader br = new System.IO.BinaryReader(streamReader.BaseStream);
byte[] bytes = new byte[streamReader.BaseStream.Length];
br.Read(bytes, 0, (int)streamReader.BaseStream.Length);
if (bytes == null)
{
return;
}
streamReader.Close();
br.Close();
string extension = System.IO.Path.GetExtension(filePath);
string fileName = System.IO.Path.GetFileName(filePath);
if (extension == ".jpg")
{ // Handle *.jpg and
  WriteFile(bytes, fileName, "image/jpeg", context.Response);
}
else if (extension == ".gif")
{// Handle *.gif
WriteFile(bytes, fileName, "image/gif gif", context.Response);
}
else if (extension == ".pdf")
{// Handle *.pdf
WriteFile(bytes, fileName, "application/pdf pdf", context.Response);
}
}
/// <summary>
/// Sends a byte array to the client
/// </summary>
/// <param name="content">binary file content</param>
/// <param name="fileName">the filename to be sent to the client</param>
/// <param name="contentType">the file content type</param>
private void WriteFile(byte[] content, string fileName, string contentType, HttpResponse response)
{
response.Buffer = true;
response.Clear();
response.ContentType = contentType;
response.AddHeader("content-disposition", "attachment; filename=" + fileName);
response.BinaryWrite(content);
response.Flush();
response.End();
}
public bool IsReusable
{
get
{
return false;
}
}

It doesn't work for JPEG files. It just opens a blank page.

What am I doing wrong?

Vessy
Telerik team
 answered on 11 Oct 2018
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?