Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
664 views

how to clear RadAsyncUpload files which is hosted in Jquery UI dialog on clientside?

 

        // clears the radasync upload

        function ClearFileInput() {

            var upload = $find("<%= rauMailingDocument.ClientID %>");           

            if (upload._uploadedFiles.length > 0) {

                Array.removeAt(upload._uploadedFiles, 0);

                upload.deleteFileInputAt(0);

                upload.updateClientState();

            }  

        }

Edit:  Update, the above seems to work, is that the preferred method?

Esteban
Top achievements
Rank 1
 answered on 01 May 2012
1 answer
70 views
Hi,
 I have 2 controls raddatepicker and radtimepicker. Works perfect. But now I want to get the date only from the datepicker and the time only from the timepicker in code. How do I do this?


RadDPArrivalDate.Calendar.SelectedDate.Date.ToString
RadTPArrivalTime.DateInput.Text

But for both I seem to get the whole date and time.

4/30/2012 12:00:00 AM 2012-04-30-22-15-00

I would like to get 4/30/2012 and 3:00PM which is what was entered into the control.

Thanks.
Tash
Top achievements
Rank 1
 answered on 01 May 2012
1 answer
100 views
I want to be able to copy the personal address controls values over to the shipping address controls when a user clicks a link button. I have the following javascript

function NewUserCopyPrsnlToShip()
    {
        text = $find("<%= txtPersonalAddress.ClientID %>").get_textBoxValue();
        $find("<%= txtShippingAddress.ClientID %>").set_value(text);

        text = $find("<%= txtPersonalAddress2.ClientID %>").get_textBoxValue();
        $find("<%= txtShippingAddress2.ClientID %>").set_value(text);

        text = $find("<%= txtPersonalCity.ClientID %>").get_textBoxValue();
        $find("<%= txtShippingCity.ClientID %>").set_value(text);

        document.getElementById("<%=rcbShippingState.ClientID%>").selectedIndex = document.getElementById("<%=rcbPersonalState.ClientID%>").selectedIndex;

        text = $find("<%= txtPersonalZip.ClientID %>").get_textBoxValue();
        $find("<%= txtShippingZip.ClientID %>").set_value(text);
    }

It all works except the combobox copy part. Both comboboxes are bound to the exact same collections. How do I make this work?
Matt
Top achievements
Rank 1
 answered on 01 May 2012
1 answer
110 views
I'm working on a static website and would like to know if anyone can give me advice on what controls I could use to make it a better site for the users?  I'm currently using the radCalendar, the File Explorer and the Panel Bar.  I'm using the calendar to show users important dates, the file explorer i'm using to list some pdf files and the panel bar i'm using as my menu.  Since we purchased the controls I would like to use as many features as I can to enhance the website.  Since I have not read or worked with most of the other controls and just wanted to know if anyone to tell me what other controls I could use for a basic website. 

Thank you
M. R.
Top achievements
Rank 1
 answered on 01 May 2012
2 answers
226 views
Hi

I would like to write an aspx page that uses a RadBinaryImage to load an image from a database with a table structured as follows.

ImageID, ImageData
10, 12345678901234567890

With ImageID a key and ImageData the binary image data for a RadBinaryImage control.

This page (imageresize.aspx) should load the imge with an ImageID specified on a QueryString from the database, then resize the image and finally set the response contentType to "image/jpeg" and write out the image.

I would like to be able to include it on another page in another site, e.g. main.html.  The HTML for main.html might include <img src=imageresize.aspx?ID=10>. 

Is there any way I can convert a RadBinaryImage into System.Drawing.Image to be able to write it out, or is there any other way of doing this?

Kind Regards, Richard Jonas
Richard
Top achievements
Rank 1
 answered on 01 May 2012
2 answers
329 views
Hi,

I've got a RadComboBox (version 2012.1.411.40) that has the input/display box and down arrow sections showing up just fine, but when I click on the down arrow, the drop down list fails to appear.  I've checked the generated page source and can see the list of the items that are supposed to be showing up.  All list items are being loaded up-front, there is no on-demand functionality being utilized. I was using a custom skin that I thought might be the source of the issue, but I switched back to the default embedded skin, and the problem is persisting. I am trying to use the control on a content page which is contained within an UpdatePanel on the master page.  I'm not receiving any sort of error on the page (JavaScript or otherwise).  While the drop down list never shows up, I can use the up and down arrow keys to scroll through the options, and the auto-complete feature still works as well.

Here's the markup and generated HTML, in case it helps:

<telerik:RadComboBox ID="ddlSearchRoles" runat="server" EnableEmbeddedSkins="true"
    AllowCustomText="false" EnableLoadOnDemand="false" MarkFirstMatch="false" />
 
<div class="rcbSlide" style="z-index: 6000; visibility: visible; display: none; overflow: hidden; margin-left: 0pt; position: absolute; top: 323.5px; left: 806.283px; height: 107px; width: 160px;">
    <div id="ctl00_ContentPlaceHolder1_ddlSearchRoles_DropDown" class="RadComboBoxDropDown RadComboBoxDropDown_Default " style="display: block; visibility: visible; top: -107px; left: 0px; width: 158px;">
        <div class="rcbScroll rcbWidth" style="width: 100%; overflow: auto; height: 105px;">
            <ul class="rcbList" style="list-style:none;margin:0;padding:0;zoom:1;">
                <li class="rcbHovered ">-All-</li>
                <li class="rcbItem ">Application Admin</li>
                <li class="rcbItem ">Dependent Member</li>
                <li class="rcbItem ">Practice Admin</li>
                <li class="rcbItem ">Primary Member</li>
            </ul>
        </div>
    </div>
</div>
 
 <div id="ctl00_ContentPlaceHolder1_ddlSearchRoles" class="RadComboBox RadComboBox_Default" style="width:160px;">
    <table class="" style="border-width: 0pt; border-collapse: collapse;" summary="combobox">
        <tbody>
            <tr class="rcbReadOnly">
                <td class="rcbInputCell rcbInputCellLeft" style="width:100%;">
                    <input id="ctl00_ContentPlaceHolder1_ddlSearchRoles_Input" class="rcbInput" type="text" readonly="readonly" value="-All-" name="ctl00$ContentPlaceHolder1$ddlSearchRoles" autocomplete="off">
                </td>
                <td class="rcbArrowCell rcbArrowCellRight">
                    <a id="ctl00_ContentPlaceHolder1_ddlSearchRoles_Arrow" style="overflow: hidden;display: block;position: relative;outline: none;">select</a>
                </td>
            </tr>
        </tbody>
    </table>
    <input id="ctl00_ContentPlaceHolder1_ddlSearchRoles_ClientState" type="hidden" name="ctl00_ContentPlaceHolder1_ddlSearchRoles_ClientState" autocomplete="off">
</div>

Any ideas or suggestions?

Thanks,
Jason
Jason
Top achievements
Rank 1
 answered on 01 May 2012
4 answers
193 views
Hello,

   In my web page, i have 2 list boxes and i also have a radajaxmanager on the page. Everything works as expected on localhost but once i publish it on the server, the list box items are disabled. As they are disabled, i couldn't move the items from source listbox to destination list box. 
Can you guys think of any reason why it would behave like that?

Appreciate the help
Thanks 
Jagat
Top achievements
Rank 1
 answered on 01 May 2012
1 answer
120 views
Hi sir,
I  placed one tabcontrol inside the page and i am adding AccessKey it is working (ALT+AcessKey+Enter) that page open but my work (ALT+Acesskey) press that open how to sir ,please help me .how it will work ?

<telerik:RadTabStrip ID="radTabIn" runat="server" Skin="Web20" SelectedIndex="6"  
                                   style="float:none" MultiPageID="radIPPage" Width="100%">
                          <Tabs>
               <telerik:RadTab Text="<span class='underline'>R</span>egistration Address" Width="22%" 
                                  TabIndex="0" AccessKey="R" ToolTip="Alt+r">
               </telerik:RadTab>
               <telerik:RadTab Text="<span class='underline'>P</span>atient Details" Width="22%" TabIndex="1" AccessKey="P" ToolTip="Alt+p">
               </telerik:RadTab>
               <telerik:RadTab  Text="<span class='underline'>W</span>ork Address" Width="21%" TabIndex="2" AccessKey="W" ToolTip="Alt+w">
               </telerik:RadTab>
               <telerik:RadTab  Text="Past <span class='underline'>H</span>istroy" Width="25%" TabIndex="3" AccessKey="H" 
                                  ToolTip="Alt+h">
               </telerik:RadTab>
               <telerik:RadTab Text="Aller<span class='underline'>g</span>ies" Width="22%" TabIndex="4" AccessKey="G" ToolTip="Alt+g">
               </telerik:RadTab>
               <telerik:RadTab Text="Ha<span class='underline'>b</span>its-Immunisation" Width="22%" TabIndex="5" AccessKey="B" 
                                  ToolTip="Alt+m">
               </telerik:RadTab>
               <telerik:RadTab Text="D<span class='underline'>o</span>ctor Details" Width="21%" TabIndex="6" 
                                  AccessKey="O" ToolTip="Alt+o" Selected="True">
               </telerik:RadTab>
               <telerik:RadTab Text="Roo<span class='underline'>m</span> Allotment" Width="25%" TabIndex="7" AccessKey="M" ToolTip="Alt+m">
               </telerik:RadTab>
           </Tabs>
                               </telerik:RadTabStrip>

Kate
Telerik team
 answered on 01 May 2012
1 answer
67 views
I have a RadComboBox that I would like to have the following functionality:

When you re-enter the text area of the box I would like the text to be automatically selected and when a character is typed for the text to be replaced with the typed character unless that character is the AutoCompleteSeperator (in my case a semicolon) in which case I would like it to append the semicolon to the text that was already there and the drop down to show all items again.

I have it nearly working the combo box looks like this 
<telerik:RadComboBox ID="rcbPartNumber" runat="server" TabIndex="7" Width="140px" BackColor="#F9D295"
Skin="Vista" EmptyMessage="All" Font-Size="XX-Small" Height="140px" ShowMoreResultsBox="true"
CausesValidation="false" AllowCustomText="true" MarkFirstMatch="true" ShowDropDownOnTextboxClick="true"
OnClientFocus="ClientFocus" OnClientDropDownOpening="ClientFocus" OnClientKeyPressing="onClientDDLKeyPressing"
EnableVirtualScrolling="true" EnableLoadOnDemand="true" AutoPostBack="true" AutoCompleteSeparator=";" />

with the relevant code looking like this.
function onClientDDLKeyPressing(sender, args) {
    var keycode = args.get_domEvent().keyCode;
    if ((keycode == 59) || (keycode == 186)) { //a semicolon - it has 2 possible keycodes
        var currText = sender.get_text();
        varinputBox = sender.get_inputDomElement();
        setCaretPosition(sender.get_inputDomElement(), currText.length) //if this isn't done then the typed semicolon appears at the start of the text rather than at the end
    }
    if ((keycode == 8) || (keycode == 127)) { //a backspace or a delete
        sender.set_text('');
    }
 
function ClientFocus(sender, eventArgs) {
    var currText = sender.get_text();
    sender.set_text(currText);
    sender.selectText(0, currText.length);
    switch (sender._uniqueId.substr(sender._uniqueId.length - 13, sender._uniqueId.length - 1)) {
        case "rcbPartNumber":
            var hidPartNumJustGotFocus = document.getElementsByName('<%=hidPartNumJustGotFocus.uniqueId %>');
            hidPartNumJustGotFocus[0].value = "1";
            break;
    }
}
}
 
function setCaretPosition(elemId, caretPos) {
    var elem = document.getElementById(elemId);
 
    if (elem != null) {
        if (elem.createTextRange) {
            var range = elem.createTextRange();
            range.move('character', caretPos);
            range.select();
        }
        else {
            if (elem.selectionStart) {
                elem.focus();
                elem.setSelectionRange(caretPos, caretPos);
            }
            else
                elem.focus();
        }
    }
}

the SetFocus definitely works as when I move the focus back to the textarea the current text is selected. however when a semicolon is typed the combo box seems to do an ajax callback as if I have pressed enter and leaves the combo box with the text that was there before the semicolon was typed.

Any ideas as to what I am missing or have done wrong?
Ivana
Telerik team
 answered on 01 May 2012
1 answer
78 views
I discovered that clicking on certain toolbar buttons in the Image Editor triggers page validation but there is no CausesValidation attribute to turn this behavior off. Do you have a recommended way around this?
Pero
Telerik team
 answered on 01 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?