Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
256 views

Paste not working in Firefox when RADEditor is inside Bootstrap modal but works fine in other browser.
Paste works fine in Firefox when RADEditor is outside Bootstrap modal.

 

I have created a demo page below to demonstrate the issue, can anyone help fix it?

Rumen
Telerik team
 answered on 15 Apr 2021
1 answer
198 views

I am trying to display a list of items and have created an Item Template to create a customizable pdf. I have tried creating another RadGrid within an Item Template, however the designer will not pickup the new RadGrid there. I would like to display the entire ClassList

<telerik:RadGrid RenderMode="Lightweight" ID="RadGridWrapper1" runat="server" OnItemCommand="radGridClasses_ItemCommand"
    OnNeedDataSource="RadGridWrapper1_NeedDataSource" GroupingEnabled="true" AllowPaging="true" >
    <ExportSettings OpenInNewWindow="true" ExportOnlyData="false" Pdf-BorderType="NoBorder" >
        <Pdf DefaultFontFamily="Arial Unicode MS" AllowPrinting="true" ForceTextWrap="true" BorderType="NoBorder" >
            <PageHeader>
                <LeftCell TextAlign="Center" />
                <MiddleCell TextAlign="Center" Text="My Class List" />
                <RightCell Text="Page: <?page-number?>" TextAlign="Center" />
            </PageHeader>
        </Pdf>
    </ExportSettings>
    <MasterTableView AutoGenerateColumns="false" ShowHeader="false" CommandItemDisplay="top" TableLayout="Auto" >
        <CommandItemTemplate>
            <div class="container-fluid m-3">
                <asp:LinkButton ID="btnExport" CommandName="ExportToPdf" runat="server" CssClass="mr-3 float-right" ToolTip="Export to PDF">
                    <i class="fas fa-3x fa-file-pdf"></i>
                </asp:LinkButton>
            </div>
        </CommandItemTemplate>
        <CommandItemSettings ShowExportToCsvButton="false" ShowExportToExcelButton="false" ShowExportToPdfButton="true"
            ShowExportToWordButton="false" ShowAddNewRecordButton="false" />
                <Columns>
                    <telerik:GridTemplateColumn UniqueName="ClassListDisplay">
                        <ItemTemplate>
                            <table style="width: 100%; text-align: left">
                                <colgroup>
                                    <col />
                                </colgroup>
                                <tr style="border:none">
                                    <td> </td>
                                </tr>
                                <tr style="font-size: 14pt; margin-top: 5px; padding-top:5px; vertical-align: middle; text-align: left; border-top: 2px solid; background-color: lightgray;"
                                    class="greyHeader">
                                    <td>
                                        <i>INFO...</i>
                                    </td>
                                    <td></td>
                                </tr>
                                <tr style="border:none">
                                    <td> </td>
                                </tr>
                                <tr>
                                    <td><b>Classes</b>: <%# Eval("ClassList") %></td>
                                </tr>
                            </table>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
    </MasterTableView>
</telerik:RadGrid>
Attila Antal
Telerik team
 answered on 15 Apr 2021
9 answers
391 views
I have a rad Editor in the web form inside MVC razer project.  every thing work fine except when I click on Ajax spell Checker I receive this error: Spell Check Handler Server Error:500
and also on the find/replace button getting error:
Web.config registration missing!
 The Telerik dialogs require a HttpHandler registration in the web.config file. Please, use the control's Smart Tag to add the handler automatically, or see the help for more information: Controls > RadEditor > Dialogs > Introduction

it looks like not finding the handlers.
I have put the radSpell data files in App_Data

My web.config file is
<httpHandlers>
     <add path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler" validate="false" />
     <add path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler" validate="false" />
     <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource" validate="false" />
   </httpHandlers>

<system.webServer>
      <add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler" />
      <add name="Telerik_Web.UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler" />
      <add name="Telerik_Web.UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource" />
     </system.webServer>


any help would be appreciated


Rumen
Telerik team
 answered on 15 Apr 2021
2 answers
129 views

I have a requirement to display to seperate RadGrids, which I can do successfully (https://www.telerik.com/forums/displaying-the-same-grid-on-two-different-pages)

But now I need to be able to export both to PDF & Excel from the CommandItemTemplate LinkButton. This process works of course for one of the Grids but not both. How do I get that CommandItem to fire for both my grids? 

Doncho
Telerik team
 answered on 14 Apr 2021
1 answer
828 views

I tried to create responsive radgrid on mobile but all solutions so far failed. I have combined several suggestions I found in forums and internet now into a new CSS which create a fully responsive grid on desktop, mobile and tablet.

See the attached files for some screenshots.

 

The CSS:

 

<style>
 
.RadGrid {
min-width: inherit;
}
 
        .RadGrid table {
            border-collapse: collapse;
            width: 100%;
        }
 
        .RadGrid th {
            background-color: #eee;
            font-weight: bold;
        }
 
        .RadGrid th,
        .RadGrid td {
            border: 0em none #333;
            line-height: 1.5;
            padding: 0.25em;
            text-align: left;
        }
 
 
html body .RadGrid .rgRow,
html body .RadGrid .rgAltRow,
html body .RadGrid .rgEditRow,
html body .RadGrid .rgFooter,
html body .RadGrid .rgHeader,
html body .RadGrid .rgGroupHeader
{
height: auto;
}

 
    /* Stack rows vertically on small screens */

@media only screen and (min-width: 40em) and (max-width: 60em) {

/* Hide column labels */
.RadGrid thead tr {
position: absolute;
top: -9999em;
left: -9999em;
}
 
.RadGrid tr {
border: 0.125em solid #333;
}

/* Leave a space between table rows and rows and pager */
.RadGrid tr + tr
{
margin-top: 0em;
}

.RadGrid .rgPager {
margin-top: 1em;
}
 
/* Get table cells to act like rows */
.RadGrid tr,
.RadGrid td {
display: block;
}
 
.RadGrid td {
border: none;
border-bottom: 0.125em none #333;
/* Leave a space for data labels */
padding-left: 50%;
}

            /* Add data labels */

.RadGrid .rgRow td:before,
.RadGrid .rgAltRow td:before {
content: attr(data-label);
float: left;
font-weight: bold;
}

.RadGrid .rgRow > td,
.RadGrid .rgAltRow > td {

display: block;
border-top: 1px solid ;
text-align: right;
padding: .25em .4375em
}

/* Show only the current page number*/
.RadGrid .rgWrap.rgNumPart a:not(.rgCurrentPage) {
display: none;
}
 
.RadGrid .rgWrap.rgAdvPart {
margin-top: 4px;
}

}

    /* Stack labels vertically on smaller screens */

@media only screen and (max-width: 40em) {

   /* Hide column labels */
.RadGrid thead tr {
position: absolute;
top: -9999em;
left: -9999em;
}
 
.RadGrid tr {
border: 0.125em none #333;
}

/* Leave a space between table rows and rows and pager */
.RadGrid tr + tr
{
margin-top: 0em;
}

.RadGrid .rgPager {
margin-top: 1em;
}
 
/* Get table cells to act like rows */
.RadGrid tr,
.RadGrid thead tr,
.RadGrid td {
display: block;
}
 
.RadGrid td {
border: none;
border-bottom: 0.125em none #333;
/* Leave a space for data labels */
padding-left: 50%;
padding: .25em .4375em;
}

/* Add data labels */
  .RadGrid td:before {
content: attr(data-label);
display: inline-block;
font-weight: bold;
line-height: 1.0;
width: 100%;
  }



/* Show only the current page number*/
.RadGrid .rgWrap.rgNumPart a:not(.rgCurrentPage) {
display: none;
}
 
.RadGrid .rgWrap.rgAdvPart {
margin-top: 4px;
}

html body .RadGrid .rgHeader,
html body .RadGrid .rgGroupHeader
{
height:150px;
}

  }

</style>

 

Vessy
Telerik team
 answered on 14 Apr 2021
1 answer
206 views

I having having some issue with the filter of RadGrid. 

When i type ‘ the result is showing no data found which is what i wanted.

but if i type something like abc.get(‘abc’); or â€˜) OR 1=1 -- the filter textbox get cleared and all result is shown. Would like to check other than this, is there anyway to not clear the filter textbox and for the result to show no data found instead?

Attila Antal
Telerik team
 answered on 14 Apr 2021
8 answers
9.2K+ views
I want to obtain via Javascript the SelectedValue of a RadComboBox but it seem not possible.
My goal is to change (clientside) RadComboBox1 selectedvalue, starting from another javascript event.

Here you can find the example page:

<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolderBody" runat="Server">
    <script type="text/javascript">  
        function getvalue()  
        {
            var combo = <%=RadComboBox1.ClientID %>;
            alert(combo.SelectedItem);
            alert( document.getElementById(combo.UniqueID + "_value").value );
        }  
    </script>
    <telerik:RadComboBox ID="RadComboBox1" runat="server">
        <Items>
            <telerik:RadComboBoxItem Text="Item1" Value="Value1" />
            <telerik:RadComboBoxItem Text="Item2" Value="Value2" />
            <telerik:RadComboBoxItem Text="Item3" Value="Value3" />
        </Items>
    </telerik:RadComboBox>
    <input id="Button1" type="button" value="button" onclick="getvalue();" />
</asp:Content>

Anyone can help?
Peter Milchev
Telerik team
 answered on 13 Apr 2021
2 answers
258 views
I'm trying to convert a RadToolButton into one with an ItemTemplate so I can use the <Icon> element for the modern css icon classes, but when I use the RadButton instead of the original RadToolButton, the client javascript function doesn't fire. How can I re-use the same javascript function for the RadButton inside the ItemTemplate as it is used in the RadToolButton?



<script>
function rtbClientDebts_ButtonClick(sender, args)
        {
            var button;
            button = args.get_item();
            ProcessGridCommand (button.get_commandName());
        }
</script>



<telerik:RadToolBar runat="server" ID="rtbClientDebts" Skin="Metro"  Width="100%" OnClientButtonClicked="rtbClientDebts_ButtonClick" EnableViewState="false">
        <Items>
 
            <%----- OLD BUTTON -----%>
            <telerik:RadToolBarButton runat="server" Text="Add"  CommandName="AddCreditor" SearchName="AddCreditor" Enabled="True" />
 
            <%----- NEW DESIRED BUTTON -----%>
            <telerik:RadToolBarButton>
                <ItemTemplate>
                    <telerik:RadButton runat="server" Text="Add" CommandName="AddCreditor" SearchName="AddCreditor" Enabled="True">
                        <Icon PrimaryIconCssClass="rbAdd" />
                    </telerik:RadButton>
                </ItemTemplate>
            </telerik:RadToolBarButton>
 
</Items>
</telerik:RadToolBar>

Vessy
Telerik team
 answered on 13 Apr 2021
0 answers
149 views

We have a RadCloudUpload control that saves files to an S3 bucket. A postback is done afterwards by a save button. Works fine on dev machines.

On the AWS servers, some files get deleted after upload and save, but not all.
I uploaded 18 files today, 17 of them got deleted after the UncommitedFilesExpirationPeriod (which is set to 1 hour). This was during the day, when we run 16 web servers in a load balanced server group.
I tried later in the evening, when we reduce it to 2 web servers in the group. At that point, I uploaded 18 files again, and 9 were deleted.

That made me suspect that the problem is that the postback is done to a different webserver, and thus the RadUploadControl does not set the files as committed. Does that seem likely? If not, what could be the cause of this?

And more importantly, how should I solve it? I looked in the forum here and found how to override the DeleteFile method, which works... but then how do I allow users to delete files (which seems to work by simply never committing the file and then deleting it from S3 after the UncommitedFilesExpirationPeriod ).

Thanks.

Micke
Top achievements
Rank 1
 asked on 13 Apr 2021
3 answers
315 views

I found this thread but couldn't get the behavior I wanted.

I would like to debounce requests to a WebService method I attached to a RadComboBox.

I am using Lodash and Underscore.js' "debounce" function, but I find that each keypress or even focus on the RadComboBox (perhaps I should set_cancel(true) on focus).

 

My current setup is:

HTML:

1.<telerik:RadComboBox OnClientItemsRequesting="requesting" EnableLoadOnDemand="true" AllowCustomText="true" ItemRequestTimeout="0">
2.    <WebServiceSettings Path="Service.asmx" Method="GetData">
3.    </WebServiceSettings>
4.</telerik:RadComboBox>

 

JS:

01.function requesting(sender, args) {
02.    let context = args.get_context();
03.    context["FilterString"] = args.get_text();
04. 
05.    // Set a delay before requesting items
06.    let debounceTimer = 1000;
07. 
08.    // Begin debouncing
09.    _.debounce(setContext, debounceTimer);
10.}
11. 
12.function setContext(sender, args) {
13.    var context = args.get_context();
14.    if (!sender.prefix)
15.        sender.prefix = "";
16.    if (!window.event || sender.directcall) {
17.        sender.prefix = args.get_text();
18.    }
19.    var id = sender.get_id();
20.    // Limit minimum character length to 3
21.    if (sender.prefix.length < 3) {
22.        // Ensure clear is only called when backspacing to an empty value
23.        if (window.event && window.event.type != "click") {
24.            clearText(); // Clear results if nothing is typed in
25.        }
26.        args.set_cancel(true); // cancel server call if nothing typed in
27.        return false;
28.    }
29.    context["prefix"] = sender.prefix;
30.    return true;
31.}

 

Is there something I am missing/incorrect in my setup?

 

The pseudocode I am thinking goes along the lines of:

1. Type at least 3 or more characters in the combo box input

2. Wait 1000ms

3. If another key is entered within 1000ms, reset debounce timer

4. Else proceed call to WebService method

5. Combo box populated

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Matthew
Top achievements
Rank 1
Veteran
 answered on 13 Apr 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?