Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
343 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
102 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
764 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
176 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.0K+ 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
230 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
115 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
259 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
3 answers
2.1K+ views
I used javascript debugger and did find an object to get the "checked" items in my RadComboBox.
what is the proper way to do this so I can clean up my code?
in my case I am getting the list of categories to send to RadScheduler provider

    window.OnClientAppointmentsPopulating = function (sender, eventArgs) {
        var combobox = $find("<%=ddlCatToShow.clientID %>");
        var list = "";
        var items = combobox.get_items();
        var array = combobox._checkedIndices.toString().split(','
        for (var i = 0; i < array.length-1; i++) { 
      
            var item = items.getItem(array[i]);
        //alert(item.get_text()); 
        //alert(item.get_value());   
            list += item.get_value() + ",";
        
        eventArgs.get_schedulerInfo().CategoryList = list.replace(/,\s*$/, "");
};


Vessy
Telerik team
 answered on 12 Apr 2021
4 answers
428 views
Hi,
I have a project where in a RadGrid the Master Table rows contain template columns that display totals based values in the Child detail table. The user is able to Update the Detail table rows which would affect the totals given in the parent row. However, when the user does update a record, the parent row doesn't update until I reload the page. How can I use the update event to also rebind the parent row?

I currently have a SQLDataSource object for each of the Parent and Child tables. Is there a relatively easy way to get the Parent Row to rebind on update since I shouldn't need to rebind all rows in the parent?

Currently, I have only written a RadGrid1_UpdateCommand and RadGrid1_ItemDataBound.

protected void RadGrid1_UpdateCommand(object source, GridCommandEventArgs e) 
    //Get the GridEditableItem of the RadGrid      
    GridEditableItem editedItem = e.Item as GridEditableItem; 
 
    //Get the Primary Key associated with the edited row 
 
    //Get the Control Values for the associated rows 
 
    //Insert and update soem information in the database             
 
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) 
    if (e.Item is GridDataItem && e.Item.OwnerTableView.DataSourceID == "SQLDataSourceParent"
    { 
         //Get the GridEditableItem of the RadGrid      
        GridDataItem dataItem = e.Item as GridDataItem; 
                 
        //Get the primary key value of the row using the DataKeyValue.      
                 
        //Set the Template Column values based on database records 
    } 

Attila Antal
Telerik team
 answered on 12 Apr 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Missing User
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Missing User
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?