Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
306 views
Hallo, I'm testing RadCaptcha and I'm struck with a very odd behaviour.
If I use the "Captcha" method (I'm using the cache as storage since I disabled sessions) everything works correctly. If I enter the right code validation passes, otherwise validation fails.
If I use the "InvisibleTextBox" protection instead, validation always fails.
Here is the test string that I'm using, maybe I missed something on it:

<telerik:RadCaptcha ID="RadCaptcha1" ProtectionMode="InvisibleTextBox" MinTimeout="2" ErrorMessage="asdsdasd" Display="Static" runat="server"></telerik:RadCaptcha>

This is inside an asp Panel, together with the form fields, ajaxified with RadAjaxManager.
I check the validation in the button click event server side and RadCaptcha1.IsValid is always false and of course validation fails. Any hint to overcome this issue. I can exploit the invisibletextbox feature myself but the timer on form subit requires a bit more work and it is a pity not to use the built-in one inside RadCaptcha. Any hint will be much appreciated. I'm coding on ASP.NET 4.5.

Massimiliano
Top achievements
Rank 1
 answered on 10 Jun 2013
1 answer
303 views
Hi,
we're using JustGage (http://www.justgage.com/) to transform some <div> inside an ItemTemplate.

The problem is that client side the javascript works ever and only on the first loaded item.
We try to move the <script> tag inside the ItemTemplate, but in that way the script add more gauges ever in the first item <div>.

How can we run the script for each item loaded ?

<script type="text/javascript">
        $(document).ready(function () {
                    var gc = new JustGage({ id: "gaugeCosts", value: 4552, min: 0, max: 15000, title: "title 1" });
                    var gf = new JustGage({ id: "gaugeFaults", value: 12, min: 0, max: 100, title: "title 2" });
                    var gm = new JustGage({ id: "gaugeMaintenance", value: 95, min: 0, max: 100, title: "title 3" });
            });
    </script>

<telerik:RadListView ID="rlDash" runat="server" onneeddatasource="rlDash_NeedDataSource" onitemcommand="rlDash_ItemCommand">
            <ItemTemplate>
                <div class="itemDash">
                    <div class="itemDashText">
                        <div style="float:left;width:40%;margin-right:3px;">
                            <asp:Label runat="server" ID="lblID" Text='<%# Eval("id") %>' Visible="false"></asp:Label>
                            <asp:LinkButton runat="server" ID="lblDescription" CommandName="Select" CssClass="itemDashTitle" ToolTip="<%$ Resources:Locations, localita_ttVisualizza %>"><%# Eval("description") %></asp:LinkButton>
                            <asp:ImageButton runat="server" ID="btnDelete" Height="20px" Width="20px" CommandName="Delete" ImageUrl="~/Images/delete.png" ToolTip="<%$ Resources:Locations, localita_ttElimina %>"/>
                        </div>
                        <div style="float:right;width:50%;">
                            <div class="itemDashGauge" id="gaugeCosts">
                            </div>
                            <div class="itemDashGauge" id="gaugeFaults">
                            </div>
                            <div class="itemDashGauge" id="gaugeMaintenance">
                            </div>
                        </div>
                    </div>
                </div>
            </ItemTemplate>
        </telerik:RadListView>

Eyup
Telerik team
 answered on 10 Jun 2013
1 answer
35 views
Hi,
I have a complex AJAXified page with lot of controls like buttons and one RadUpload.

I want to show RadProgress only on the upload but it is reacting on all buttons etc.
Can I define controls (or processes) for which progress has to be shown?

Marc
Plamen
Telerik team
 answered on 10 Jun 2013
1 answer
35 views
Hi, When someone clicks a timeslot i want to add border top to a color (100% width of scheduler).

I know this line is wrong: //args.getTimeSlotFromDomElement().style.borderColorTop = "red";

But i cant figure out how i should do it.


function OnClientTimeSlotClick(sender, args) {
                selectedResource = "";
                if (args.get_targetSlot()) {
                    selectedResource = args.get_targetSlot().get_resource().get_text();
                    var tmpTime = args.get_targetSlot().get_startTime("HH:mm");
                    var selectedTime = new Date(tmpTime);
                    selectedResourceKey = args.get_targetSlot().get_resource().get_key();
 
                    // Clears the lists
                    $('#InformationPanel ul li').html('');
                     
                    // Displays data in div.
                    $('#InformationPanel').find('.roomName').append("<strong>Rum:</strong> " + selectedResource);
                    $('#InformationPanel').find('.appointmentTime').append("<strong>Tid:</strong> " + selectedTime.format("HH:mm"));
 
 
                    activeTimeslot = args.get_targetSlot();
 
                    //args.getTimeSlotFromDomElement().style.borderColorTop = "red";
                }
            }
Plamen
Telerik team
 answered on 10 Jun 2013
1 answer
56 views
<telerik:RadMonthYearPicker runat="server" Culture="vi-VN">
</telerik:RadMonthYearPicker>

With above simple sample, RadMonthYearPicker does not work. Whenever you select a month, it always returns the first month, Jan.

Tested with other culture and it works but vi-VN.

Something wrong with javascript?
Eyup
Telerik team
 answered on 10 Jun 2013
1 answer
120 views
I am using IE8 browser, I have the Telerik Radgrid programmed for multiselection. When client presses 'Ctrl' and selects multiple rows, the text of all the rows are getting selected. Please look at the attached image, which shows the issue. Please let me know a solution for this issue.
Princy
Top achievements
Rank 2
 answered on 10 Jun 2013
1 answer
1.0K+ views
I'm populating a Radgrid in code behind and I am having some difficulty understanding how to get my image to appear.

The data column I'm trying to read from is called 'ImageUrl" however my src is an empty string when I build and run the project.

Here is the code for the GridImageColumn.

GridImageColumn gi1 = new GridImageColumn();
gi1.DataAlternateTextField = "ImageUrl";
gi1.DataImageUrlFields = new string [] {"ImageUrl"};
//gi1.DataImageUrlFormatString = "/{0}";
gi1.HeaderText = "Image";
gi1.HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
gi1.Visible = true;
gi1.ImageAlign = ImageAlign.Middle;
gi1.ImageHeight = Unit.Pixel(25);
gi1.ImageWidth = Unit.Pixel(25);
rg1.MasterTableView.Columns.Add(gi1);

Is there a property that I'm not setting or setting incorrectly? I was assuming that the DataImageUrlFields would read the data just like a GridBoundColumn would read it's DataField.
Princy
Top achievements
Rank 2
 answered on 10 Jun 2013
1 answer
101 views
Hello Friends,

I've to dynamically & constatly (depending on what user selectes in another dropdown) keep disabling one item. This worked well ... but then if the user selects another item, the former one obiously stays disabled, so I tried to iterate thru all items and explicitly enable each one (if there is a better and efficient possible scenario, please psot with code example)



Also please let me know how can I "unselect" the item ... as this combobox has checkboxes visible

I tried following w/o suuceess

item.select = false;
 
and
 
ddadditionalCaseTypes.Items[i].Selected = false;


I am using folllowing code (hopefully this will also provide a good reference like I got referecne from : this post)

Thanks,
-Aarsh
           function jsfun_CategoryTypeChanged() {
 
            var CategoryTypesID, additionalCategoryTypesID, selectedValue, ddadditionalCategoryTypes;
            CategoryTypesID = "#ctl00_ContentPlaceHolder1_ddCategoryTypes";
            additionalCategoryTypesID = "#ctl00_ContentPlaceHolder1_ddAdditionalCategoryTypes";
            ddadditionalCategoryTypes = $find("ctl00_ContentPlaceHolder1_ddAdditionalCategoryTypes");
            debugger;
            var allItems = ddadditionalCategoryTypes.get_items();
            for (var i = 0; i < allItems.get_count(); i++) {
                var thisItem = ddadditionalCategoryTypes.get_items().getItem(i);
                if (thisItem != null)
                    thisItem.enable();
            }
            selectedValue = $(CategoryTypesID).val();
            if (ddadditionalCategoryTypes != null) {
                var item = ddadditionalCategoryTypes.findItemByValue(selectedValue);
                if (item != null) {
                    ddadditionalCategoryTypes.commitChanges();
                    item.disable();
                    ddadditionalCategoryTypes.trackChanges();
                }
            }
 
        }

Shinu
Top achievements
Rank 2
 answered on 10 Jun 2013
6 answers
208 views
I placed 'telerik:RadComboBox' inside of <table><tr><td>.
Its not getting displayed/rendring properly. Edges are not 100% accurate.
<div><table><tr><td><telerik:RadComboBox runat="server" ID="radCmb1" HighlightTemplatedItems="true"                                      Width="220px"><ItemTemplate><asp:CheckBox runat="server" ID="FlagCheckBox" onclick="some(event);"                                                Text="" /><%# DataBinder.Eval(Container.DataItem, "somedata")%></ItemTemplate></telerik:RadComboBox></td></tr></table></div>



But, when i place outside of <table>, its rendring prpperly                   
<div><telerik:RadComboBox runat="server" ID="radCmb1" HighlightTemplatedItems="true"         Width="220px"><ItemTemplate><asp:CheckBox runat="server" ID="FlagCheckBox" onclick="some(event);"Text="" /><%# DataBinder.Eval(Container.DataItem, "somedata")%></ItemTemplate></telerik:RadComboBox></div

Problem here is , i can't place ouside of TD.
Please help me out on this ASAP.
Thanks in advance!!!!
Vijay
Top achievements
Rank 1
 answered on 10 Jun 2013
3 answers
250 views
Hello,

Am using the RadAsyncUpload. On OnClientValidationFailed am calling validationFailed script. But it doesn't show the message.Instead Something blinking near the file name. Kindly suggest

Note : Am using a Dropzone which is our requirement.

Thank you

My Code :


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript">
        function validationFailed(sender, eventArgs) {
            $(".ErrorHolder").append("<p>Validation failed for '" + eventArgs.get_fileName() + "'.</p>").fadeIn("slow");
        }
    </script>
    <style type="text/css" runat="server">
 .DropZone1
{
    width: 300px;
    height: 90px;
    background-color:white;
    border-color: #CCCCCC;
    color: #767676;
    float: left;
    text-align: center;
    font-size: 16px;
    color: white;
}

 .qsf-demo-canvas h2 {
     margin: -10px -10px 10px;
     padding: .25em 40px;
     color: #ffffff;
     background: #ff6b2b url("img/header-bg.gif") 15px center no-repeat;
}

    </style>
</head>
<body style="background-color:#505D66">
    <form id="form1" runat="server">
    <table>
        <tr>
            <td>  
                <div id="div1" class="qsf-demo-canvas">
          <h2>Upload files</h2>         
                <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>             
                <telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server" MultipleFileSelection="Automatic" AllowedFileExtensions="jpg" OnClientValidationFailed="validationFailed" DropZones=".DropZone1"></telerik:RadAsyncUpload>
                <div class="DropZone1">               
                <p style="color:black">Drop Files Here</p>
                </div>                   
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
Plamen
Telerik team
 answered on 10 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?