or
<script type="text/javascript"> function onCheckBoxClickClass(chk, combo) { var combo; if (combo == 'rcbClassGroup') { combo = $find("<%= rcbClassGroup.ClientID %>"); } cancelDropDownClosing = true; //holds the text of all checked items var text = ""; //holds the values of all checked items var values = ""; //get the collection of all items var items = combo.get_items(); //enumerate all items for (var i = 0; i < items.get_count(); i++) { var item = items.getItem(i); //get the checkbox element of the current item var chkMultipleSelectclass = $get(combo.get_id() + "_i" + i + "_chkMultipleSelectclass"); if (chkMultipleSelectclass.checked) { text += item.get_text() + ","; values += item.get_value() + ","; } } //remove the last comma from the string text = removeLastComma(text); values = removeLastComma(values); if (text.length > 0) { //set the text of the combobox combo.set_text(text); } else { //all checkboxes are unchecked //so reset the controls combo.set_text(""); } } var cancelDropDownClosing = false; function removeLastComma(str) { return str.replace(/,$/, ""); } function StopPropagation(e) { //cancel bubbling e.cancelBubble = true; if (e.stopPropagation) { e.stopPropagation(); } } function onDropDownClosing() { cancelDropDownClosing = false; } function selectAllNodes(chk, combo, chkItem, ChkNone) { var combo; var combobox; if (combo == 'rcbClassGroup') { combobox = $find('<%=rcbClassGroup.ClientID %>'); } var nestedCheckBox = combobox.get_items()._array; for (var i = 0; i < nestedCheckBox.length; i++) { var chk1 = $get(combobox.get_id() + "_i" + i + "_" + chkItem); chk1.checked = chk.checked; } if (chk.checked && combo == 'rcbClassGroup') onCheckBoxClickClass(chk, combo); if (ChkNone != null) { var chkNone = $get(combobox.get_id() + "_Header_" + ChkNone); if (chkNone.checked) chkNone.checked = false; } if (!chk.checked) combobox.set_text(""); }</script><telerik:RadComboBox ID="rcbClassGroup" runat="server" AllowCustomText="true" SkinID="DropDownList298x200" Filter="Contains" EmptyMessage="--Select--" AutoPostBack="false" DataSourceID="test" DataTextField="Name" DataValueField="ID" > <HeaderTemplate> <asp:CheckBox ID="ChkClassroomGroup" runat="server" Text="Select All" AutoPostBack="false" onClick="selectAllNodes(this,'rcbClassGroup','chkMultipleSelectclass',null)" /> </HeaderTemplate> <ItemTemplate> <div onclick="StopPropagation(event)"> <asp:CheckBox ID="chkMultipleSelectclass" runat="server" Text='<%#Eval("Name") %>' AutoPostBack="false" onclick="onCheckBoxClickClass(this,'rcbClassGroup')" /> </div> </ItemTemplate> </telerik:RadComboBox> <asp:XmlDataSource ID="test" DataFile="../XMLFiles/RadCombo.xml" runat="server"></asp:XmlDataSource>Hi,
is it possible to place a RadAjaxLoadingPanel inside the master page so it will show on any kind of postback event!? I don't want to attach the RadAjaxLoadingPanel to specific controls like a send button which fire the postback. As for me, it should work on any page using the master page. Is this possible!?
Thanks in advance
Martin
Imports System Imports System.Collections.Generic Imports System.Drawing.Imaging Imports System.IO Imports System.Linq Imports System.Web Imports System.Drawing Imports System.Threading Namespace Data Public NotInheritable Class DataProvider Private Sub New() End Sub <ThreadStatic()> Private Shared _photos As List(Of Photo) Public Shared Function GetData() As IList(Of Photo) If _photos IsNot Nothing Then Return _photos End If _photos = New List(Of Photo)() For Each file As String In Directory.GetFiles(HttpContext.Current.Server.MapPath("Res1\User1\Residence1\")) Dim photo = New Photo() photo.Name = Path.GetFileName(file) Dim image__1 As Image = Image.FromFile(file) Using memoryStream = New MemoryStream() image__1.Save(memoryStream, ImageFormat.Png) photo.Data = memoryStream.ToArray() End Using _photos.Add(photo) Next Return _photos End Function End Class Public Class Photo Private Shared ReadOnly _key As New Object() <ThreadStatic()> Private Shared _counter As Integer Public Sub New() Id = GetId() End Sub Public Property Name() As String Get Return m_Name End Get Set(ByVal value As String) m_Name = value End Set End Property Private m_Name As String Public Property Data() As Byte() Get Return m_Data End Get Set(ByVal value As Byte()) m_Data = value End Set End Property Private m_Data As Byte() Public Property Id() As Integer Get Return m_Id End Get Private Set(ByVal value As Integer) m_Id = value End Set End Property Private m_Id As Integer Protected Shared Function GetId() As Integer SyncLock _key _counter += 1 End SyncLock Return _counter End Function End ClassEnd Namespace<telerik:RadComboBox ID="RadComboBox1" runat="server" Height="300px" > <Items> <telerik:RadComboBoxItem Text="Room1" /> <telerik:RadComboBoxItem Text="Room2" /></Items> </telerik:RadComboBox>