Skip to content

Commit 0f40084

Browse files
committed
Merge branch 'master' of https://github.com/telerik/ajax-docs
2 parents 27453ce + 157f1d5 commit 0f40084

File tree

7 files changed

+135
-157
lines changed

7 files changed

+135
-157
lines changed

controls/ajaxmanager/known-limitations.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ This article lists the known limitations you may encounter when working with the
4747

4848
* **Ajaxified control postbacks when controls are not updated**—The AjaxManager setting from the following example will not ajaxify the button.
4949

50-
````ASP.NET
50+
````ASP.NET
5151
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
5252
<AjaxSettings>
5353
<telerik:AjaxSetting AjaxControlID="Button1">
5454
</telerik:AjaxSetting>
5555
</AjaxSettings>
5656
</telerik:RadAjaxManager>
57-
````
57+
````
5858

5959

6060

@@ -64,21 +64,21 @@ This article lists the known limitations you may encounter when working with the
6464
<UpdatedControls>
6565
<telerik:AjaxUpdatedControl ControlID="Button1" />
6666
</UpdatedControls>
67-
````
67+
````
6868
6969
7070
7171
* **Using the AjaxManager and AjaxPanel in the same application**&mdash;In some complex scenarios, such as when using a master page or WebUserControls, having both the AjaxManager and the AjaxPanel may lead to issues. To handle such problems, use a single AjaxManager and no panels in the master or main page of the project.
7272
73-
* **The `OnRequestSent` and `OnResponseReceived` clisent-side events are missing**&mdash;The AjaxManager does not provide these events and you cannot simulate them due to the way ASP.NET AJAX works. To work around this issue, use the [`OnRequestStart`]({%slug ajaxmanager/client-side-programming/events/requeststart%}) and [`OnResponseEnd`]({%slug ajaxmanager/client-side-programming/events/responseend%}) for your needs.
73+
* **The `OnRequestSent` and `OnResponseReceived` client-side events are missing**&mdash;The AjaxManager does not provide these events and you cannot simulate them due to the way ASP.NET AJAX works. To work around this issue, use the [`OnRequestStart`]({%slug ajaxmanager/client-side-programming/events/requeststart%}) and [`OnResponseEnd`]({%slug ajaxmanager/client-side-programming/events/responseend%}) for your needs.
7474
7575
* **Various controls are not supported by the Microsoft AJAX framework**&mdash;For the full list of controls that are not compatible with the AjaxManager, refer to the article on [checking for incompatible controls and updating third-party controls]({%slug ajaxmanager/how-to/incompatible-controls-and-updating-3rd-party-controls-with-telerik-radajax%}).
7676
7777
* **AJAX requests are not working when `RestoreOriginalRenderDelegate` is `false`**&mdash;The same issue may occur when inheriting from an AjaxPage to support Medium Trust in DNN or SharePoint. You need to consider these limitations when you configure the AjaxManager or the AjaxPanel for your particular project schema.
7878
7979
* **When using Medium Trust, client-side validation does not execute and validators are added dynamically during an Ajax call**&mdash;When the Medium Trust level is used, you cannot use reflection to set private properties. However, when you use validators in a template that is placed in an AjaxPanel, you need to set the `_parent` private property of the validators to the updated panel with reflection. This approach is required so that all validators are rendered as expected. Therefore, in such scenarios, to make validators work as expected, use `asp:UpdatePanel` instead of the AjaxPanel or AjaxManager.
8080
81-
* **Parent-child control configuration**&mdash;Child elements cannot be the `AjaxSetting` initiator or update their parent container element. To add and update a container or a parent control, allow the container or the control, or an external component to be the initiator. It is similar to placing a `telerik:RadAjaxPanel` or `asp:UpdatePanel` on the page: it will affect only the content inside this panel. The AjaxManager is similar; only it achieves what is going on under the hood.
81+
* **Parent-child control configuration**&mdash;Child elements cannot be the `AjaxSetting` initiator or update their parent container element. To add and update a container or a parent control, allow the container or the control, or an external component to be the initiator. It is similar to placing a `telerik:RadAjaxPanel` or `asp:UpdatePanel` on the page: it will affect only the content inside this panel. The AjaxManager is similar; only it achieves what is happening under the hood.
8282
8383
## See Also
8484

controls/ajaxmanager/server-side-programming/methods.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,37 +33,37 @@ The AjaxManager and AjaxPanel both descend from the `RadAjaxControl`, which intr
3333

3434
````C#
3535
RadAjaxManager1.Alert("Please save your changes.");
36-
````
36+
````
3737

3838

3939
````VB
4040
RadAjaxManager1.Alert("Please save your changes.")
41-
````
41+
````
4242

4343

4444
* `FocusControl`&mdash;Places the focus on a specified control. `FocusControl()` takes a single parameter that can be the `ID` of the control to focus on or an object reference to the control to focus on.
4545

4646
````C#
4747
RadAjaxManager1.FocusControl(Button1);
48-
````
48+
````
4949

5050

5151
````VB
5252
RadAjaxManager1.FocusControl(Button1)
53-
````
53+
````
5454

5555
* `GetAjaxEventReference`&mdash;Produces client-side code that invokes the [`ajaxRequest()`]({%slug ajaxmanager/client-side-programming/overview%}) method.
5656

5757
````C#
5858
RadAjaxManager1.GetAjaxEventReference(Button1.ClientID);
5959
//... returns "$find("RadAjaxManager1").ajaxRequest("Button1");"
60-
````
60+
````
6161

6262

6363
````VB
6464
RadAjaxManager1.GetAjaxEventReference(Button1.ClientID)
6565
'... returns "$find("RadAjaxManager1").ajaxRequest("Button1");"
66-
````
66+
````
6767

6868
* `RaisePostBackEvent`&mdash;Triggers a server-side [`AjaxRequest`]({%slug ajaxmanager/server-side-programming/events/onajaxrequest%}) event and allows you to pass a single string parameter to the event. `AjaxRequest` can also be triggered by the client-side [`ajaxRequest()`]({%slug ajaxmanager/client-side-programming/overview%}) function.
6969

@@ -76,7 +76,7 @@ The AjaxManager and AjaxPanel both descend from the `RadAjaxControl`, which intr
7676
{
7777
Label1.Text = e.Argument;
7878
}
79-
````
79+
````
8080

8181

8282
````VB
@@ -86,22 +86,22 @@ The AjaxManager and AjaxPanel both descend from the `RadAjaxControl`, which intr
8686
Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest
8787
Label1.Text = e.Argument
8888
End Sub
89-
````
89+
````
9090

9191

9292
* `Redirect`&mdash;Navigates the browser to another web page. The method passes a single string parameter, which is the URL to navigate to.
9393

9494
````C#
9595
RadAjaxManager1.Redirect("https://www.telerik.com");
96-
````
96+
````
9797

9898

9999
````VB.NET
100100
RadAjaxManager1.Redirect("https://www.telerik.com")
101-
````
101+
````
102102

103103

104104
## See Also
105105

106106
* [AjaxManager Server-Side Properties]({%slug ajaxmanager/server-side-programming/properties%})
107-
* [AjaxUpdatedControl Properties]({%slug ajaxmanager/server-side-programming/ajaxupdatedcontrol-properties%})
107+
* [AjaxUpdatedControl Properties]({%slug ajaxmanager/server-side-programming/ajaxupdatedcontrol-properties%})

controls/chat/getting-started.md

Lines changed: 50 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -22,68 +22,66 @@ The following tutorial demonstrates how you can add a simple **RadChat** control
2222

2323
>caption **Example 1**: Declaration of a **RadChat** control.
2424

25-
````ASP.NET
26-
<asp:ScriptManager runat="server" ID="ScriptManager1" />
27-
<telerik:RadChat ID="RadChat1" runat="server">
28-
</telerik:RadChat>
29-
````
30-
25+
````ASP.NET
26+
<asp:ScriptManager runat="server" ID="ScriptManager1" />
27+
<telerik:RadChat ID="RadChat1" runat="server">
28+
</telerik:RadChat>
29+
````
3130

3231
1. Set some of the messages and user settings like **Placeholder**, **Name** and **IconUrl**.
3332

3433
>caption **Example 2**: The chat now has a custom placeholder message, username and avatar
3534

36-
````ASP.NET
37-
<asp:ScriptManager runat="server" ID="ScriptManager1" />
38-
<telerik:RadChat runat="server" ID="RadChat1">
39-
<MessagesSettings Placeholder="Type your message here..." />
40-
<UserSettings Name="John" IconUrl="avatar.png" />
41-
</telerik:RadChat>
42-
````
35+
````ASP.NET
36+
<asp:ScriptManager runat="server" ID="ScriptManager1" />
37+
<telerik:RadChat runat="server" ID="RadChat1">
38+
<MessagesSettings Placeholder="Type your message here..." />
39+
<UserSettings Name="John" IconUrl="avatar.png" />
40+
</telerik:RadChat>
41+
````
4342

4443
1. Press F5 to run the application. You will see the chat that is displayed in **Figure 1**. From this point you can start interacting with the chat.
4544

4645
>caption **Example 3**: Assigning the client-side event handlers:
4746

48-
````ASP.NET
49-
<asp:ScriptManager runat="server" ID="ScriptManager1" />
50-
<telerik:RadChat runat="server" ID="RadChat1" Width="300px" Height="300px">
51-
<ClientEvents
52-
OnActionClick="OnActionClick"
53-
OnInitialize="OnInitialize"
54-
OnLoad="OnLoad"
55-
OnPost="OnPost"
56-
OnSendMessage="OnSendMessage"
57-
OnTypingEnd="OnTypingEnd"
58-
OnTypingStart="OnTypingStart" />
59-
<MessagesSettings Placeholder="Type your message here..." />
60-
<UserSettings Name="John" IconUrl="avatar.png" />
61-
</telerik:RadChat>
62-
````
63-
64-
````JavaScript
65-
function OnActionClick(sender, args) {
66-
}
67-
68-
function OnInitialize(sender, args) {
69-
}
70-
71-
function OnLoad(sender) {
72-
sender.postMessage("Hello!");
73-
}
74-
75-
function OnPost(sender) {
76-
}
77-
78-
function OnSendMessage(sender, args) {
79-
}
80-
81-
function OnTypingEnd(sender, args) {
82-
}
83-
84-
function OnTypingStart(sender, args) {
85-
}
86-
````
47+
````ASP.NET
48+
<asp:ScriptManager runat="server" ID="ScriptManager1" />
49+
<telerik:RadChat runat="server" ID="RadChat1" Width="300px" Height="300px">
50+
<ClientEvents
51+
OnActionClick="OnActionClick"
52+
OnInitialize="OnInitialize"
53+
OnLoad="OnLoad"
54+
OnPost="OnPost"
55+
OnSendMessage="OnSendMessage"
56+
OnTypingEnd="OnTypingEnd"
57+
OnTypingStart="OnTypingStart" />
58+
<MessagesSettings Placeholder="Type your message here..." />
59+
<UserSettings Name="John" IconUrl="avatar.png" />
60+
</telerik:RadChat>
61+
<script>
62+
function OnActionClick(sender, args) {
63+
}
64+
65+
function OnInitialize(sender, args) {
66+
}
67+
68+
function OnLoad(sender) {
69+
sender.postMessage("Hello!");
70+
}
71+
72+
function OnPost(sender) {
73+
}
74+
75+
function OnSendMessage(sender, args) {
76+
}
77+
78+
function OnTypingEnd(sender, args) {
79+
}
80+
81+
function OnTypingStart(sender, args) {
82+
}
83+
</script>
84+
````
8785

8886
Once you have a working Chat control, you can use the [client-side API]({%slug chat/client-side-programming/overview%}) of the chat to [connect it to a Chatbot service]({%slug chat/how-to/configure-chat-agent%}).
8987

controls/combobox/troubleshooting/back-button-and-selectedvalue.md

Lines changed: 44 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -24,78 +24,69 @@ Steps to reproduce the problem:
2424

2525
3. Click on the Back button of the browser
2626

27-
The combobox shows the correct text, but the SelectedValue property is not correct (the SelectedItem is lost).
27+
The combobox shows the correct text, but the SelectedValue property is incorrect (the SelectedItem is lost).
2828

2929
**WORKAROUND**
3030

31-
1. Add a hidden field to the page which will hold the selected value of the combobox:
31+
1. Add a hidden field to the page that will hold the selected value of the combobox:
3232

33-
````ASPNET
34-
33+
````ASPNET
3534
<input type="hidden" id="RadComboBox1Value" value="" />
36-
37-
````
38-
39-
35+
````
4036

4137
2. Subscribe to the [OnClientSelectedIndexChanged]({%slug combobox/client-side-programming/events/onclientselectedindexchanged%}) event and update that hidden field:
4238

43-
````JavaScript
44-
45-
function onSelectedIndexChanged(sender, eventArgs) {
46-
$get("RadComboBox1Value").value = eventArgs.get_item().get_value();
47-
}
48-
49-
````
50-
51-
39+
````JavaScript
40+
function onSelectedIndexChanged(sender, eventArgs) {
41+
$get("RadComboBox1Value").value = eventArgs.get_item().get_value();
42+
}
43+
````
5244

5345
3. On pageLoad() check for the value of the hidden field. If it is not empty - find the appropriate combo item and select it:
5446

55-
````JavaScript
56-
57-
function pageLoad() {
58-
var savedValue = $get("RadComboBox1Value").value;
59-
var combo = $find('<%= RadComboBox1.ClientID %>');
60-
if (savedValue != "" && combo.findItemByValue(savedValue)) {
61-
combo.findItemByValue(savedValue).select();
47+
````JavaScript
48+
function pageLoad() {
49+
var savedValue = $get("RadComboBox1Value").value;
50+
var combo = $find('<%= RadComboBox1.ClientID %>');
51+
if (savedValue != "" && combo.findItemByValue(savedValue)) {
52+
combo.findItemByValue(savedValue).select();
53+
}
6254
}
63-
}
64-
65-
````
55+
````
6656

6757

6858

6959
Here is the final code:
7060

7161
````ASPNET
72-
<telerik:RadComboBox RenderMode="Lightweight" ID="RadComboBox1"
73-
runat="server"
74-
OnClientSelectedIndexChanged="onSelectedIndexChanged">
75-
<Items>
76-
<telerik:RadComboBoxItem runat="server" Text="Red" Value="red" />
77-
<telerik:RadComboBoxItem runat="server" Text="Blue" Value="blue" />
78-
<telerik:RadComboBoxItem runat="server" Text="Green" Value="Green" />
79-
</Items>
80-
</telerik:RadComboBox>
81-
82-
<input type="hidden" id="RadComboBox1Value" value="" />
83-
84-
<asp:Button ID="Button1" runat="server" Text="Button that Redirects" />
85-
<script type="text/javascript">
86-
function pageLoad() {
87-
var savedValue = $get("RadComboBox1Value").value;
88-
var combo = $find('<%= RadComboBox1.ClientID %>');
89-
90-
if (savedValue != "" && combo.findItemByValue(savedValue)) {
91-
combo.findItemByValue(savedValue).select();
62+
<telerik:RadComboBox RenderMode="Lightweight" ID="RadComboBox1"
63+
runat="server"
64+
OnClientSelectedIndexChanged="onSelectedIndexChanged">
65+
<Items>
66+
<telerik:RadComboBoxItem runat="server" Text="Red" Value="red" />
67+
<telerik:RadComboBoxItem runat="server" Text="Blue" Value="blue" />
68+
<telerik:RadComboBoxItem runat="server" Text="Green" Value="Green" />
69+
</Items>
70+
</telerik:RadComboBox>
71+
72+
<input type="hidden" id="RadComboBox1Value" value="" />
73+
74+
<asp:Button ID="Button1" runat="server" Text="Button that Redirects" />
75+
<script type="text/javascript">
76+
function pageLoad() {
77+
var savedValue = $get("RadComboBox1Value").value;
78+
var combo = $find('<%= RadComboBox1.ClientID %>');
79+
80+
if (savedValue != "" && combo.findItemByValue(savedValue)) {
81+
combo.findItemByValue(savedValue).select();
82+
}
9283
}
93-
}
94-
95-
function onSelectedIndexChanged(sender, eventArgs) {
96-
$get("RadComboBox1Value").value = eventArgs.get_item().get_value();
97-
}
98-
</script>
84+
85+
function onSelectedIndexChanged(sender, eventArgs) {
86+
$get("RadComboBox1Value").value = eventArgs.get_item().get_value();
87+
}
88+
</script>
9989
````
10090

10191

92+

controls/switch/troubleshooting/distorted-appearance.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ position: 1
1313
@[template](/_templates/button/distorted-appearance.md#intro "control: RadSwitch")
1414

1515
````ASP.NET
16-
<telerik:RadButton RenderMode="Lightweight" ID="RadButton1" runat="server" Text="RadButton" />
16+
<telerik:RadButton RenderMode="Classic" ID="RadButton1" runat="server" Text="RadButton" ButtonType="ToggleButton" ToggleType="CheckBox" />
1717
<br />
1818
<telerik:RadLabel ID="Label1" runat="server" AssociatedControlID="RadSwitch1" Text="RadSwitch"></telerik:RadLabel>
19-
<telerik:RadSwitch ID="RadSwitch1" runat="server" Checked="true"></telerik:RadSwitch>
19+
<telerik:RadSwitch RenderMode="Lightweight" ID="RadSwitch1" runat="server" Checked="true"></telerik:RadSwitch>
2020
````
2121

2222
@[template](/_templates/button/distorted-appearance.md#cause-resolve "control: RadSwitch")
6.13 KB
Loading

0 commit comments

Comments
 (0)