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

Hi all,

I'm updating EndDate value when StartDate value changes. This seems to work fine, but when I try to save the appointment the old date value appears in the EndDatePicker and I cannot save the appointment.

 

Here is mycode

 

JavaScript

function changeEndDate(sender, e) {
 var endDatePickerID = sender.get_id().replace("StartDate", "EndDate");
 var endDatePicker = $find(endDatePickerID);
 endDatePicker.set_selectedDate(sender.get_selectedDate());
}

 

c#

RadDatePicker startDate = (RadDatePicker)e.Container.FindControl("StartDate");
if (startDate != null){
startDate.ClientEvents.OnDateSelected = "changeEndDate"
}

 

Can 

 

The code is copied from this link https://docs.telerik.com/devtools/aspnet-ajax/controls/scheduler/how-to/change-the-end-date-when-the-start-date-changes

 

Any help on this?
Thanks a lot

Simon
Top achievements
Rank 1
 answered on 09 Oct 2019
5 answers
683 views
Hi,

I need to set DateTimePicker.DateInput.Text in codebehind, but the following error occurs when I set as dateTimeBirthDate.DateInput.Text = "2007/11/12"; for example.

Text property cannot be set. String was not recognized as a valid DateTime.

How could I set this property appropriately?

Thanks,
Ricky.
okouin
Top achievements
Rank 1
 answered on 09 Oct 2019
5 answers
229 views
Just discovered the solution to this, and since I'd not managed to find it online when I was struggling with it, wanted to share for the benefit of others: I experienced a number of issues trying to get RadAsyncUpload to work, and just when I thought I'd got everything sorted, I ran into a new issue on the live server (but not local dev): for files over 2MB, the upload would start, but then fail at exactly 2048Kb; Firebug helped me to discover that it was the second POST to Telerik.Web.UI.WebResource.axd?type=rau that was returning a 500 error; after having gone through all the suggested troubleshooting etc. during earlier phases, I was left to my own devices to figure this one out - thankfully it came to me pretty quickly: the file could be written (initial chunk), but not modified (for the addition of subsequent chunks)!  Adding Modify permissions for NETWORK SERVICE to RadUploadTemp cleared it up right away, as well as solving the file moving to TargetFolder on PostBack failure which I was experiencing on the live server.  Hopefully this helps someone else! :)
DJG
Top achievements
Rank 1
 answered on 08 Oct 2019
0 answers
170 views

     Hello Folks,

I would like to get a css class for HeaderStyle-Width="200" and then call using mediaquery for mobile.

Unable to assign a css for this property unlike asp grid.Please help me

PuriTelerik
Top achievements
Rank 1
 asked on 08 Oct 2019
3 answers
513 views

I am experiencing an issue when I converted a .NET radioButtonList to a Telerik.Web.UI.RadRadioButtonList.

We display Yes/No Radio Buttons, then depending on which was clicked we show a panel.

After the OnSelectedIndexChanged fires the RadRadioButtonList will disappear. 

Additionally during the Event the SelectedValue is not set, and the SelectedIndex = -1. Niether of these issues happen with the ASP RadioButtonList object. 

Any help would be greatly appreciated.

WG

 

Sample code to reproduce error:

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="TelerikRadioButtonListError.aspx.vb" Inherits="TelerikQuickQuote.TelerikRadioButtonListError" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>

    <form id="form1" runat="server">
        <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
        <div>
            <span>Are you Currently Insured:</span>

            <telerik:RadRadioButtonList ID="RBL_CurrentlyInsured" runat="server" AutoPostBack="true" OnSelectedIndexChanged="RBL_CurrentlyInsured_SelectedIndexChanged">
                <Items>
                    <telerik:ButtonListItem Text="Yes" Value="1" Selected="false"></telerik:ButtonListItem>
                    <telerik:ButtonListItem Text="No" Value="0" Selected="false"></telerik:ButtonListItem>
                </Items>
            </telerik:RadRadioButtonList>

            <asp:Panel ID="PNL_PresentlyInsured" runat="server" Visible="false">
                Presently Insured Controls
            </asp:Panel>
            <asp:Panel ID="PNL_NotPresentlyInsured" runat="server" Visible="false">
                Not Presently Insured Controls
            </asp:Panel>
        </div>

    </form>
</body>
</html>

Public Class TelerikRadioButtonListError
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub RBL_CurrentlyInsured_SelectedIndexChanged(sender As Object, e As EventArgs)
        Dim isPresentlyInsured As Boolean = (RBL_CurrentlyInsured.SelectedValue = "1")
        If isPresentlyInsured Then
            PNL_PresentlyInsured.Visible = True
            PNL_NotPresentlyInsured.Visible = False
        Else
            PNL_PresentlyInsured.Visible = False
            PNL_NotPresentlyInsured.Visible = True
        End If
    End Sub
End Class

 

 

 

Vessy
Telerik team
 answered on 08 Oct 2019
1 answer
777 views

Having a bit of trouble with the resize mode on the BinaryImage. I have specified the Width and Height in the aspx attributes and set the ResizeMode to fit, however it's just setting every image to the sizes that I specified rather than fitting them as it should be. This results in images being stretched rather than fit as if it's actually set to fill instead.

I'm using an httphandler to serve the image from a database and this is the relevant code:

Is there something that I'm missing here? Simply setting the ResizeMode to fit and setting a max height and width should be enough, right?

<asp:Panel runat="server" Style="text-align:center;" >
                <telerik:RadBinaryImage runat="server" ID="imgStu" ResizeMode="Fit" Width="1050" Height="700" />
              </asp:Panel>

 

imgStu.ImageUrl = "~/frm/ShowImage.ashx?id=" + strImageID;

Eyup
Telerik team
 answered on 08 Oct 2019
5 answers
265 views

Hi,

 

Why would the following not accept the value 12.1 as valid?

 

 Dim tb As RadNumericTextBox = New RadNumericTextBox
                        plh.Controls.Add(tb)

                        tb.ID = "check_" + e.Item.DataItem("id").ToString
                        tb.Type = NumericType.Number
                        tb.NumberFormat.DecimalSeparator = "."
                     
                        Dim rv As RangeValidator = New RangeValidator
                        rv.ControlToValidate = tb.ID
                        rv.Type = ValidationDataType.Double
                        rv.MinimumValue = "12"
                        rv.MaximumValue = "13"
                        rv.ErrorMessage = "Invalid"
                        plh.Controls.Add(rv)

 

in the above the value 12.1 is not accepted as valid and should be I guess...

 

Marc

Vessy
Telerik team
 answered on 07 Oct 2019
1 answer
278 views

Hi,

Please refer to demo on this page for the dropdown of "Region"

https://demos.telerik.com/aspnet-ajax/combobox/examples/overview/defaultcs.aspx

As you type a letter or two it highlights a value and that value is displayed in the textbox of combobox. 

I have used exactly same properties but this feature is not accomplished, as a result of which on tab press, the value of combobox goes to default one.

But if I select using mouse it works that time and for other attempts going ahead. 

Please help me in this regard. Below is my code

<telerik:RadComboBox ID="ddlPrimaryPMForThisGO" runat="server" Width="115px" Filter="Contains" RenderMode="Lightweight" EmptyMessage="--Select--" MarkFirstMatch="true" EnableLoadOnDemand="true"
                              AutoPostBack="false"  ForeColor="#0067cd" CausesValidation="false"
                              autocompletemode="SuggestAppend" dropdownstyle="Dropdown">
                          </telerik:RadComboBox>

 

 

Rumen
Telerik team
 answered on 07 Oct 2019
1 answer
278 views

Hi,

I have a RadEditor and I want to get some text, I get the cursor position with getRange(), but I now need to create a range from the beginning of my text to that position.

Example text:"Hello my world!",

My cursor is after "my|", in the middle of the sentence...

so I want to return "Hello my", excluding "world!".

thanks

Rumen
Telerik team
 answered on 07 Oct 2019
5 answers
486 views
I have a grid that is empty on page load, and columns change  a few time (columns getting added from code behind, and column names get changed from code behind).  I am unable to get the columns to size to the contents.  Here is my code:

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        function pageLoad() {
            var grid = $find("<%= grdImportData.ClientID %>");
            var columns = grid.get_masterTableView().get_columns();
            var columnIndex = columns.length + 1;
                columns[columnIndex].resizeToFit();
            }       
    </script>
</telerik:RadCodeBlock>
<telerik:RadGrid runat="server" ID="grdImportData" RenderMode="Lightweight" AllowPaging="true" PageSize="10" OnNeedDataSource="grdImportData_NeedDataSource" OnPageIndexChanged="grdImportData_PageIndexChanged" OnUpdateCommand="grdImportData_UpdateCommand" OnDeleteCommand="grdImportData_DeleteCommand" OnItemCommand="grdImportData_ItemCommand"  OnItemDataBound="grdImportData_ItemDataBound" AllowSorting="False" AlternatingItemStyle-BackColor="#f5f5f5" ItemStyle-BackColor="#ffffff" ColumnWidth="Auto" HorizontalAlignment="Stretch" >
        <ClientSettings>
            <Scrolling AllowScroll="True" SaveScrollPosition="true" FrozenColumnsCount="1" EnableVirtualScrollPaging="true"></Scrolling>
                <Resizing AllowColumnResize="true" ResizeGridOnColumnResize="true" EnableRealTimeResize="true" AllowResizeToFit="true"/>
        </ClientSettings>
    <MasterTableView EditMode="InPlace" DataKeyNames="Id">
        <Columns>
            <telerik:GridEditCommandColumn  HeaderStyle-Width="75px" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right"/>
            <telerik:GridTemplateColumn HeaderStyle-Width="50px">
                <ItemTemplate>
                    <asp:LinkButton runat="server" CommandName="Delete"><i class="icon s7-junk grid-edit-icon"></i></asp:LinkButton>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>
Attila Antal
Telerik team
 answered on 04 Oct 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?