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

Hello, I'm using a custom advanced form (both insertion and edition)

 

And I'd like all of the events fired within the advanced form to only show a panel for the advanced form modal window.

 

So in my AdvancedForm.ascx I hate the following code : 

 

<telerik:RadAjaxManagerProxy ID="rAjaxMan_advForm" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadMultiPage1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="rAjaxLPan_advForm" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
 
 
<telerik:RadAjaxLoadingPanel ID="rAjaxLPan_advForm" runat="server" />

 

Which is supposed to display the loading panel for the RadMultiPage1 in case an even is fired inside the RadMultiPage1

But this never happens. Also tried setting different "AjaxControl" and "AjaxUpdatedControl", but this does not seem to change anything

 

My AdvancedForm is based on Telerik's template and the RadMultiPage is the top element in the "<div class="rsAdvContentWrapper">" element (which is the div right after the title bar)

I also have an AjaxSettings for the Radscheduler events and he is "catching" those postbacks when I'm in the AdvancedForm. I want to override it 

 

Thank you for taking your time to answer me !

 

Anton
Telerik team
 answered on 04 Jan 2017
1 answer
60 views

Hello,

I am tring to add/create html buttons to the toolsbar something like <> 

Also I want to add language localization to the toolsbar.

I am not able to make it work. can you please give me a hand with some example code or information.

Thanks.

Rumen
Telerik team
 answered on 04 Jan 2017
5 answers
81 views

I use the following to print the middle pane on my project , but i will get times when the print preview is blank, if you hit cancel then print it will be good, but if you then hit cancel again and hit print again it will once again be blank

function PrintPaneScada(paneID) {
    var splitter = $find("RadSplitter1");
    var pane = splitter.GetPaneById(paneID);
    if (!pane) return;

    var arrExtStylsheetFiles = getTelerikCssLinks2();

    pane.Print(arrExtStylsheetFiles);
}

Vessy
Telerik team
 answered on 04 Jan 2017
1 answer
1.1K+ views

The problem is as followed:

I have 3 text boxes: Fee, Donation, Total.

Fee cannot be modified, and the user cannot type in this textbox

Donation starts at 0 and the user can change the value based on what they want to donate

Total needs to be updated based on what the user types in donation. It needs to be Donation+Fee

How can I use AJAX to make the Total textbox get updated on the fly based on what is entered in Donation?

 

 

 

Viktor Tachev
Telerik team
 answered on 04 Jan 2017
3 answers
60 views

I have a question about the behavior of the RadEditor control.

We a page in our website that contains a RadEditor control.   This page is on two different servers representing two different environments.  Test environment and Production Environment.   The page is the same page in both environments.

Here is the quandary, the RadEditor control is behaving differently on the two servers.

In the test Environment if I type the following into the control:

Test
Test
Test
Test

And then look at the HTML I see:

Test<br />
Test<br />
Test<br />
Test<br />

As I would expect.

However in the Production Environment if I type

Test
Test
Test
Test

Then look at the HTML I see:

<p>Test </p>
<p>Test </p>
<p>Test </p>
<p>Test </p>

I am at a loss as to why the behavior is so different.   Is there some configuration that could be different between the servers / environments?
Why would the control behave differently like this?

Thanks for your help.

Gary Graham

Vessy
Telerik team
 answered on 04 Jan 2017
6 answers
120 views

Hello and thank you for taking your time to help me :

When the user is moving the appointment or resizing them, I'm displaying a javascript "confirm" that should impact the appointment to be updated

If the confirm returns true, I want to add a custom attribute to the appointment, else, I do nothing

But it seems that client-side modifications do not affect the appointment that is received on server-side

 

Here is my function for Moving (Resizing is pretty much the same) : 

 

function ClientAppointmentMoveEndHandler(sender, args) {
 
    var app = args.get_appointment();
 
    var confirmMessage = "Bla bla bla." +
        "\nWant to notify?";
 
    if (confirm(confirmMessage)) {
        app.get_attributes().setAttribute("notifyModif", "true");
    }
 
}

 

Also tried to modify the subject in case it would be related to the attributes, but didn't work either

 

My server-side event handler is :

protected void RadScheduler1_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)
{
 
    AppointmentInfo ai = FindById(e.ModifiedAppointment.ID);
 
    ai.CopyInfo(e.ModifiedAppointment);
 
    ai.ApplyChangesToDB();
 
 
}

 

I'm using the debugger to see the state of e.ModifiedAppointment when reaching the first line of the handler, and neither the subject nor the Attributes collection are changed (though they should have been by my Javascript code)

 

How can I achieve that?

 

Also, if your solution could use a radconfirm instead of a confirm that would be awesome !

 

Thank you for your help

Anton
Telerik team
 answered on 04 Jan 2017
4 answers
103 views

When I type a long paragraph until the vertical scroll bar appears and then press enter key the scroll bar jumps up and I need to scroll it down to continue typing. It happens when the NewLineMode is set "P". It works fine NewLineMode is set to "Br".

Ianko
Telerik team
 answered on 04 Jan 2017
2 answers
592 views
I know you can hide columns client-side using masterTableView.hideColumn(columnIndex). However, this leads to very difficult to maintain code since column ordinals can change frequently. Is there a way to find a column by UniqueName or DataField client side and then call .hide() or show() functions, or set_visible() , or something to that effect?
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
 answered on 03 Jan 2017
2 answers
124 views

I have the following Combobox setup on my page:

<telerik:RadComboBox ID="cbxDup" runat="server" Width="350px" DropDownWidth="375px" Height="340px"
    Skin="Default" HighlightTemplatedItems="True" MarkFirstMatch="true"
    AutoPostBack="True" EnableLoadOnDemand="True" EnableVirtualScrolling="True">
    <HeaderTemplate>
        <h2>Codes</h2>
    </HeaderTemplate>
    <ClientItemTemplate>
        <ul class="Main">
            <li><span> #= Text # </span></li>
            <span> #= Attributes.Description # </span>
        </ul>
    </ClientItemTemplate>
    <WebServiceSettings Method="LoadComboBox" Path="SysProf-Add.aspx" />
</telerik:RadComboBox>

 

With the following server code:

<WebMethod()>
Public Shared Function LoadComboBox(ByVal context As RadComboBoxContext) As RadComboBoxData
    Dim data As DataTable = Nothing
    Dim comboData As New RadComboBoxData()
 
    Try
        data = GetData()
 
        Dim itemOffset As Integer = context.NumberOfItems
        Dim endOffset As Integer = Math.Min(itemOffset + 100, data.Rows.Count)
        comboData.EndOfItems = endOffset = data.Rows.Count
 
        Dim result As New List(Of RadComboBoxItemData)(endOffset - itemOffset)
 
        For Each dr As DataRow In data.Rows
            Dim itemData As New RadComboBoxItemData()
            itemData.Value = dr.Item(0)
            itemData.Text = dr.Item(1)
            itemData.Attributes.Add("Description", dr.Item(2))
            result.Add(itemData)
        Next
 
        comboData.Message = GetStatusMessage(endOffset, data.Rows.Count)
 
        comboData.Items = result.ToArray()
 
        Return comboData
    Catch ex As Exception
        Return Nothing
    End Try
End Function

 

What I would like to do is access the Description attribute in the cbxDup.SelectedIndexChanged event?  

 

Thanks in advance

Steve

SSirica
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 03 Jan 2017
1 answer
639 views

Hi everybody, I hope someone of you can give a hand. I will post some sample code however they are pretty much what I am trying to do.

I have a button which executes both client side (OnClientClicking) and server side (OnClick) events. The point is that from the client side I execute a PageMethod in order to get the result of a calculation. Up to this point everything is OK but here comes the tricky part.

I need to check for the result in order to determine if it is greater than some value. If this condition is true then I ask the user to confirm if he wishes to continue, so if the user says YES then the code continues executing OnClick event but if user says NO then OnClick must not be executed.

I have tried passing teleriks args as a parameter but it is not working (OnSuccess function receives it as null). I do this in order to call args.set_cancel() method.

Here is the code at client side

01.function btnCallback_Clicking(sender,args)
02.{
03.    var num = parseInt( prompt("Enter an integer number", "1") );
04.
05.    PageMethods.multiply(num, function (response, args){ TheSuccess(response, args); });
06.}
07.
08.function TheSuccess(response, args)
09.{
10.    //alert(' TheSuccess: \nResult obtained was: ' + response);
11.    if (response > 70) {
12.        var cancel = !confirm("Result obtained was greater than 70 ¿Continue?");
13.        args.set_cancel(cancel);
14.    }
15.}

 

Here is the code at server side

01.[System.Web.Services.WebMethod]
02.public static int multiply(int num)
03.{
04.   int res = num * num;
05.   return res;
06.}
07. 
08.protected void btnCallback_Click(object sender, EventArgs e)
09.{
10.   string extra = "User agreed to do this";
11.   btnCallback.Text = extra;
12.}

 

Any ideas about how to achieve this.

Thanks in advance.

 

Niko
Telerik team
 answered on 03 Jan 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?