| <form id="form1" runat="server"> |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> |
| </telerik:RadScriptManager> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="LinkButton1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" |
| LoadingPanelID="RadAjaxLoadingPanel1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" |
| Width="75px"> |
| <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' |
| style="border: 0px;" /> |
| </telerik:RadAjaxLoadingPanel> |
| <telerik:RadWindowManager ID="RadWindowManager1" runat="server"> |
| </telerik:RadWindowManager> |
| <div id="left" style="float:left;width:200px"> |
| <center> |
| <h3>Menu</h3> |
| <ul> |
| <li> |
| <asp:LinkButton ID="LinkButton1" runat="server">Test RadAlert in Ajax</asp:LinkButton> |
| </li> |
| </ul> |
| </center> |
| </div> |
| <div id="content" style="float:left;width:800px"> |
| <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px" Width="800px"> |
| <asp:Label ID="lblMessage" runat="server">Main Page</asp:Label> |
| </telerik:RadAjaxPanel> |
| </div> |
| </form> |
| Private Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkButton1.Click |
| Try |
| System.Threading.Thread.Sleep(3000) |
| Throw New Exception("Test of Rad Alert in Ajax") |
| Me.lblMessage.Text = "Label value changed on click of Link Button" |
| Catch ex As Exception |
| 'Me.RadAjaxManager1.ResponseScripts.Add("radalert('" & ex.Message & "', 330, 210);") |
| 'Me.RadAjaxManager1.ResponseScripts.Add("Sys.Application.add_load(function() { var f = function() { radalert('" & ex.Message & "', 330, 210, 'Test RadAlert'); Sys.Application.remove_load(f);};Sys.Application.add_load(f);})()") |
| Me.RadAjaxManager1.ResponseScripts.Add("(function(){var f = function() { radalert('" & ex.Message & "', 330, 210, 'Test RadAlert');Sys.Application.remove_load(f);}; Sys.Application.add_load(f);})()") |
| End Try |
| End Sub |
| if(_46&&_46.focus){ |
| window.setTimeout(function(){ |
| if(_46.setActive){ |
| _46.setActive(); |
| }else{ |
| _46.focus(); |
| } |
| },0); |
| } |
1. I have two events itemsrequested and selected indexchanged on my combo box.
On pageload combo box is loaded with a single value.
On text search the selected values get loaded and after that post back occurs. After post back if I expand the dropdown original single value( the value on page load is present). Why the searched value is not present?
For Example:
I have control which displays Manufacturers. On page load I get all the manufacturers in the datatable and load the selected value(eg. 'caterpilllar') in the dropdown(By filering all the other values). So my dropdown has one value only.
Now if I type 'a' all the records starting 'a' gets filtred and loaded in the dropdown. I select one of them and post back happens so as to bring the values related to the selected. But now the dropdown has only one value i.e. 'caterpillar' which is wrong. I am not modifying the value that is attached to thew control.
2. Once I erase all the text from the text area, I want all the records coming into the dropdown list but I see this going for infinite loop in the ItemsRequested event handler.
I have put ItemRequestTimeout="500". It is going in an infinite loop between item requested and page load. The total records are 1267.
Any help would be highly appreciated.
Hi,
I'm experiencing an issue in Firefox 3.0 where the overlying dimensions of the drag handle extend down about 200 pixels, way out of the boundaries of the actual RadSlider. Doesn't seem to happen in other browsers. If I turn off the inline styles via the Web Developer plugin, it seems to work normally (but obviously that has other side effects). I have verified this happens even in a completely blank page with no other styles.
| <%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucColorPicker.ascx.cs" Inherits="userControls_ucColorPicker" %> | |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> | |
| <div style="width: 100%;"> | |
| <div style="width: 410px; float: left"> | |
| <asp:Label ID="Label2" runat="server" Text="Select a color:" CssClass="normalTextBold"></asp:Label> | |
| </div> | |
| <div> | |
| <asp:Label ID="Label1" runat="server" Text="Or enter color code:" CssClass="normalTextBold"></asp:Label> | |
| </div> | |
| <div style="width: 410px; float: left"> | |
| <telerik:RadColorPicker ID="rcpColor" runat="server" Preset="Default" AutoPostBack="True" | |
| OnColorChanged="rcpColor_ColorChanged" PreviewColor="False"> | |
| </telerik:RadColorPicker> | |
| </div> | |
| <telerik:RadTextBox ID="rtbxColor" runat="server" Height="16px" InvalidStyleDuration="100" | |
| Skin="Outlook" Width="60px" EmptyMessage="#000000" OnTextChanged="rtbxColor_TextChanged"> | |
| </telerik:RadTextBox> | |
| <br /> | |
| <asp:RegularExpressionValidator ID="revColor" runat="server" ErrorMessage="Format: # followed by 6 hex digits." | |
| ControlToValidate="rtbxColor" ValidationExpression="^\#[0-9a-fA-f]{6}$"> | |
| </asp:RegularExpressionValidator> | |
| </div> | |
The c# code is as follows:
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Web; | |
| using System.Web.UI; | |
| using System.Web.UI.WebControls; | |
| public partial class userControls_ucColorPicker : System.Web.UI.UserControl | |
| { | |
| public string SelectedColor | |
| { | |
| get | |
| { | |
| return (string)ViewState["Color"]; | |
| } | |
| set | |
| { | |
| ViewState["Color"] = value; | |
| } | |
| } | |
| protected void Page_Load(object sender, EventArgs e) | |
| { | |
| } | |
| // ********************************* | |
| // ***** rcpColor_ColorChanged ***** | |
| // ********************************* | |
| protected void rcpColor_ColorChanged(object sender, EventArgs e) | |
| { | |
| SelectedColor = "#" + String.Format("{0:X2}", rcpColor.SelectedColor.R) + String.Format("{0:X2}", rcpColor.SelectedColor.G) + String.Format("{0:X2}", rcpColor.SelectedColor.B); | |
| rtbxColor.Text = SelectedColor; | |
| } | |
| // ********************************* | |
| // ***** rtbxColor_TextChanged ***** | |
| // ********************************* | |
| protected void rtbxColor_TextChanged(object sender, EventArgs e) | |
| { | |
| SelectedColor = rtbxColor.Text; | |
| } | |
| // *********************** | |
| // ***** OnPreRender ***** | |
| // *********************** | |
| protected override void OnPreRender(EventArgs e) | |
| { | |
| rtbxColor.Text = SelectedColor; | |
| } | |
| } | |