Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
331 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
64 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
50 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
73 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
145 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
117 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
216 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
273 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
4 answers
123 views
Version 2013.1.220.40

I have an expression that combined an 'or' with a 'between'

The resulting SQL is:

([Net Calorie Deficit] < 500 OR ([Steps Taken] >= 10000) AND ([Steps Taken] <= 20000)) 

I believe there needs to be parentheses around the 2 between conditions.

If I have rows with [Net Calorie Deficit] = 400 and [Steps Taken] = 30000 it will not return it because the 'AND ([Steps Taken] <= 20000))' will be treated as its own expression.

Because of this I was going to parse the expressions myself.  On the 'Getting familiar with Server-Side API' page:
http://www.telerik.com/help/aspnet-ajax/filter-getting-familiar-with-server-side-api.html

The methods: GetAllExpressionItems, GetSingleExpressionItems, GetSingleExpressionItems, and GetGroupExpressionItems  are listed but I can't find them off my control.












Andrey
Telerik team
 answered on 10 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?