Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
163 views

Three questions:

1) How do I set a group of radio buttons to allow only one to be checked at a time without checking and unchecking them in codebehind?

2) How do I set a different checked and unchecked image for each radiobutton?  i.e. radiobutton1 checked image=image1_Color, radiobutton1 unchecked image=image1_BlackWhite, radiobutton2 checked image=image2_Color, radiobutton2 unchecked image=image2_BlackWhite, etc.

3) When a user clicks above radiobutton in TreeList Template Column (I assume this is the proper column for this type of control...???) how would I capture that click/toggle event to update a value in my sql?

 

I attached a mock-up of what I am trying to accomplish.

Maria Ilieva
Telerik team
 answered on 08 Jul 2016
4 answers
129 views

I need some help please..

Example..

I have a grid with data and I need to have the ability to drag that data to 3 different folders [Keep] - [Delete] - [Hold]

I have looked at the Radgrid drag and drop Demo..  I noticed that the javascript has a lot of stuff hardcoded, so how would I be able to use the sample code to accomplish the task above?

 

Thanks

 

 

Maria Ilieva
Telerik team
 answered on 08 Jul 2016
1 answer
84 views

Hi, in my default.aspx I have 4 tabs (jquery).

Each tabs contains a user control.

In this user control I have an ajaxpanel with a rad grid, some filters and a button.

How can I update only the ajaxpanel? With the following code it always pass through the default.aspx Page_load

<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="SubmitButton">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="AlarmHistoryRadGrid" LoadingPanelID="RadAjaxLoadingPanelMain" />
                <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" />
            </UpdatedControls>
        </telerik:AjaxSetting>       
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>

 

thank you

Maria Ilieva
Telerik team
 answered on 08 Jul 2016
3 answers
595 views

Steps to reproduce:

1. Go to http://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx;

2. Select the HTML view mode;

3. Add the &shy;(soft hyphen- &#0173;) symbol in the text;

4. Select the Design mode;

5. Select the HTML view mode;

Actual result: &shy; is not displayed.

Expected result: &shy; is present and displayed.

Orlin
Telerik team
 answered on 08 Jul 2016
0 answers
104 views

I seem to have problems using a RadProgressArea together with a webservice method called from client side.

If I on the other hand use a code behind function as the way of updating the progress, the updating of the progress works.
Why?
I will start with describing the working approach with code behind and then the client side calling a webservice approach.

Working setup
In the webpage, I have a telerik:RadProgressArea and a RadProgressManager:

<telerik:RadProgressArea ID="progressArea"
  ProgressIndicators="TotalProgressBar,TotalProgressPercent" Skin="Metro"
  HeaderText="Please wait!" runat="server"/>
<telerik:RadProgressManager ID="progressManager" runat="server"/>

I also have an asp:Button like:
OnClick="Button1_Click"

In that code behind eventhandler I perform a lot of work. It has a loop where it performs some tasks. Before the loop, I have this code:

var progress = RadProgressContext.Current;
var num = 0;
var maxnum = tasks.Count();
 
progress.PrimaryPercent = 0;
progress.PrimaryValue = 0;
progress.PrimaryTotal = maxnum;

After every task, in other words in the end of the loop, I update PrimaryPercent and PrimaryValue like:
num++;
progress.PrimaryPercent = num * 100 / maxnum;
progress.PrimaryValue = num; <br>

 

and after that loop, the eventhandler ends with

rapMain.ResponseScripts.Add("CloseWindow()");

and that javascript function closes the window.
This setup works, the progressbar gets updated as it should.

Here is the a response to Telerik.RadUploadProgressHandler.ashx?RadUrid=22b0e25c-69c9-4be7-8d7e-33b818854f35&RadUploadTimeStamp=1467900709164&:

var rawProgressData = {InProgress:true,ProgressCounters:true,PrimaryPercent:'81',
PrimaryValue:'111',PrimaryTotal:'136'};

The non working setup (using a WebService)
I have an aspx file with an identical setup as in the working case.

I call the web method with javascript:

var progressBar = $find(progressAreaId);
progressBar.show();
 
var pm = getRadProgressManager();
pm.startProgressPolling();
 
$.ajax({
  type: "POST",
  url: "Foobar.asmx/Methodname",
  data: {id:2343},
  contentType: "application/json; charset=utf-8",
  dataType: "json",
  success: function(msg)
  {
    progressBar.hide();
    alert("done!");
  }
}); <br>
(If I do not call pm.startProgressPolling, the ashx will not be called frequently to get the progress values).

The web method looks like this:

[WebMethod(EnableSession = true)]
public bool MethodName(int id)
{
    var progress = RadProgressContext.Current;
 
    /* some code that retrieves an array of tasks */
 
    var maxnum = tasks.Count;
    progress.PrimaryPercent = 0;
    progress.PrimaryValue = 0;
    progress.PrimaryTotal = maxnum;
 
    foreach (var task in tasks)
    {
        /* code that performs task */
        result++;
 
        progress.PrimaryPercent = result * 100 / maxnum;
        progress.PrimaryValue = result;
    }
 
   return true;
}

 

It seems like RadProgressContext.Current contains the expected data. If I manipulate RadProgressContext.Current.CurrentOperationText in the code behind (in Page_Load), the web service will be able to read that string.

However, the progress will never be updated and then the web service method has run, the progressbar will dissapear as it should.

The polling will not get the expected data but say that InProgress is false.

Here is the a response to Telerik.RadUploadProgressHandler.ashx?RadUrid=a1dcfc89-bd8c-43d3-b88f-718890d7fc04&RadUploadTimeStamp=1467898578437&:

var rawProgressData = {InProgress:false,ProgressCounters:false};

This is a copy of a stackoverflow posting at http://stackoverflow.com/questions/38248183/progressarea-will-not-get-updated-from-webmethod

Anders
Top achievements
Rank 1
 asked on 08 Jul 2016
2 answers
135 views
We have several locked columns in one of our grids which we would like to disable as drag targets. Anybody know how to do that?
Joe
Top achievements
Rank 2
 answered on 07 Jul 2016
2 answers
187 views

Hello,

 

I can't remove token from their autocompletebox,when the token is too long (see the picture attached).

 

Here is my code : 

<telerik:RadAutoCompleteBox runat="server" ID="radAutoCompleteBoxSelectionSite" 
                    DropDownAutoWidth="Enabled" Filter="Contains" Visible="True" CausesValidation="False" AutoPostBack="True"
                    Width="100%" EmptyMessage="<%$ Resources:Language, SelectSite%>" InputType="Token"
                    OnEntryAdded="radAutoCompleteBoxSelectionSite_EntryAdded" TextSettings-SelectionMode="Single" OnClientLoad="onLoadAutoComplete" MinimumPrefixLength="0" >
</telerik:RadAutoCompleteBox>

 

And here is my script :

<script type="text/javascript">
            function onLoadAutoComplete(sender, args) {
                window.$telerik.$(sender.get_inputElement()).on('keypress', function (e) {
                    if (sender.get_entries().get_count() > 0) {
                        e.preventDefault();
                    }
                });
            }

</script>

 

I would like to stay in token mode and not in text mode. They still can delete the element with the keyboard but it's not enought clear. Is there any solution ?

Thanks

Paul
Top achievements
Rank 1
 answered on 07 Jul 2016
6 answers
358 views
How do I use my own save button vs the save in the toolbar? The save button in the toolbar works perfectly but does not fit the theme of our application as we have save button on all other areas and want to make this one the same. The toolbar save button can remain there too.
Vessy
Telerik team
 answered on 07 Jul 2016
3 answers
274 views

I think I'm doing something wrong here. I have a RadAsyncUpload control and a submit button on the page to cause the postback. All I want to do is prevent the postback if no file has been selected, or have the submit button disabled until a file is selected. If it makes any difference this is all inside of a RadWindow.

Here's the markup for the RadAsyncUpload

<div class="formRow" id="divAttachFile" runat="server" style="height: 60px;">
     <div class="floatLeft">
         <label for="asyncFlUpldAttachment"><span id="spnUploadFileMark" runat="server" class="validator">*</span> Upload File: </label>
         <telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server" MaxFileSize='<%$ AppSettings:MAXATTCHFILESIZE %>'
             MultipleFileSelection="Disabled" MaxFileInputsCount="1" AllowedFileExtensions='<%$ AppSettings:ATTCHFILEEXTNS %>'
             EnableInlineProgress="true" TemporaryFileExpiration="36000"
             OnClientValidationFailed="validationFailed"
             OnClientFileUploading="fileUploading"
             OnClientFileUploadFailed="fileUploadFailed"
             PostbackTriggers="lnkBtnAttachmentCancel"
             TabIndex="100">
         </telerik:RadAsyncUpload>
         <span id="ErrorHolder" style="display: none" class="validator"></span>
     </div>
 </div>

Here's the current JavaSrcipts, pretty much straight from your samples

<script type="text/javascript">
    var pageIsValid = true;
    function validationFailed(sender, args) {
        $("#ErrorHolder").show();
        var fileExtention = args.get_fileName().substring(args.get_fileName().lastIndexOf('.') + 1, args.get_fileName().length);
        if (args.get_fileName().lastIndexOf('.') != -1) {//this checks if the extension is correct
            if (sender.get_allowedFileExtensions().indexOf(fileExtention) == -1) {
                $("#ErrorHolder").html("Wrong Extension! Verify file.");
            }
            else {
                $("#ErrorHolder").html("The file size exceeds the limit");
            }
        }
        else {
            $("#ErrorHolder").html("Wrong Extension! Verify file");
        }
        sender.deleteFileInputAt(0);
    }
 
    function fileUploading(sender, args) {
        $("#ErrorHolder").hide();
    }
 
    function fileUploadFailed(sender, args) {
        $("#ErrorHolder").show();
        $("#ErrorHolder").html("File upload failed for:" + args.get_fileName());
        sender.deleteFileInputAt(0);
    }
</script>

 

Thanks

Rodney

Ivan Danchev
Telerik team
 answered on 07 Jul 2016
18 answers
437 views

What is the proper way to make a window 'responsive'. We are revamping our application to use the RadPageLayout on all our pages and that has been going well thus far. The only issue is the RadWindows we use for our 'popups'. When I use the same technique as for our main pages the boxes in the rad window are all about 2 pixels wide. What is the proper way to accomplish things so the popup will be size appropriate as well?

 

Thanks!!

DogBizPro
Top achievements
Rank 1
 answered on 07 Jul 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?