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.
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
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
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 ­(soft hyphen- ­) symbol in the text;
4. Select the Design mode;
5. Select the HTML view mode;
Actual result: ­ is not displayed.
Expected result: ­ is present and displayed.
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"
/>
OnClick="Button1_Click"
var progress = RadProgressContext.Current;
var num = 0;
var maxnum = tasks.Count();
progress.PrimaryPercent = 0;
progress.PrimaryValue = 0;
progress.PrimaryTotal = maxnum;
num++;
progress.PrimaryPercent = num * 100 / maxnum;
progress.PrimaryValue = num; <
br
>
and after that loop, the eventhandler ends with
rapMain.ResponseScripts.Add("CloseWindow()");
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'};
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
>
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
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
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
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!!