or
Hi everyone,
I've a small issue with my radgrids. This is the scenario
2 radgrids in the page: the first one with "temporary" records, while the second one with the "confirmed" records. In the first grid there's a commandbutton in the footer which allows the user to confirm, in one click, all the records. When the user confirms, then I need to refresh the 2 radgrids and I've achieved this task by writing this piece of code:
<telerik:AjaxSetting AjaxControlID="RadAjaxManager1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGridSales" /> <telerik:AjaxUpdatedControl ControlID="RadGridSoldlConfirmed" /> </UpdatedControls> </telerik:AjaxSetting><%@ Page Language="VB" AutoEventWireup="false" CodeFile="test_listbox.aspx.vb" Inherits="test_listbox" %><%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title></head><body> <form id="form1" runat="server"><telerik:RadScriptManager ID="RSM" runat="server" /> <telerik:RadListBox ID="RadListBox1" runat="server" AllowTransfer="true" EnableDragAndDrop="true" AutoPostBackOnTransfer="true" Height="200px" SelectionMode="Multiple" OnTransferred="RadListBox1_Transferred" TransferToID="RadListBox2" Width="215px"> <ButtonSettings ShowTransferAll="false" VerticalAlign="Middle" /> <ItemTemplate> <span class="product-title"> <%# DataBinder.Eval(Container, "Text")%></span> <span class="bearing">1 bearing</span> </ItemTemplate> <Items> <telerik:RadListBoxItem Text="Spinning Reel 1" Value="reel1_thumb.png" Price="99" Selected="true" /> <telerik:RadListBoxItem Text="Spinning Reel 2" Value="reel2_thumb.png" Price="199" /> <telerik:RadListBoxItem Text="Spinning Reel 3" Value="reel3_thumb.png" Price="99" /> <telerik:RadListBoxItem Text="Spinning Reel 4" Value="reel4_thumb.png" Price="299" /> <telerik:RadListBoxItem Text="Spinning Reel 5" Value="reel5_thumb.png" Price="199" /> <telerik:RadListBoxItem Text="Spinning Reel 6" Value="reel6_thumb.png" Price="99" /> <telerik:RadListBoxItem Text="Spinning Reel 7" Value="reel7_thumb.png" Price="299" /> <telerik:RadListBoxItem Text="Spinning Reel 8" Value="reel8_thumb.png" Price="199" /> </Items> </telerik:RadListBox> <telerik:RadListBox runat="server" EnableDragAndDrop="true" ID="RadListBox2" Height="200px" Width="270px" SelectionMode="Multiple"> <ItemTemplate> <span class="detail-title"> <%# DataBinder.Eval(Container, "Text")%></span> <ul class="details"> <li> <label> Price:</label> <span> <%# Convert.ToInt32(DataBinder.Eval(Container, "Attributes['Price']")).ToString("C0") %></span> </li> <li> <label> Quantity:</label> <telerik:RadNumericTextBox runat="server" ID="QuantityTextBox" Width="40px" MinValue="1" MaxValue="10" ShowSpinButtons="true" Value="1" NumberFormat-DecimalDigits="0" /> </li> </ul> </ItemTemplate> <Items> <telerik:RadListBoxItem Text="Spinning Reel 9" Value="reel9.png" Price="99" /> </Items> </telerik:RadListBox> </form></body></html>Imports Telerik.Web.UIPartial Class test_listbox Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then RadListBox1.DataBind() RadListBox2.DataBind() End If End Sub Protected Sub RadListBox1_Transferred(ByVal sender As Object, ByVal e As RadListBoxTransferredEventArgs) For Each item As RadListBoxItem In e.Items 'Update the image If e.SourceListBox Is RadListBox1 Then item.Value = item.Value.Replace("_thumb", "") Else item.Value = item.Value.Replace(".png", "_thumb.png") End If 'Databind the item in order to evaluate the databinding expressions from the template item.DataBind() Next End SubEnd ClassResponse.Redirect(ConfigurationManager.AppSettings("SSOLogin") & "?Source=" & Request.Url.ToString)If Page.IsCallback Then Response.Clear() Response.StatusCode = 302 Response.Status = "302 Moved Temporarily" Response.RedirectLocation = ConfigurationManager.AppSettings("SSOLogin") & "?Source=" & Request.Url.ToString Response.End()Else Response.Redirect(ConfigurationManager.AppSettings("SSOLogin") & "?Source=" & Request.Url.ToString)End IfDim rtfString As String = "{\rtf1\ansi\ansicpg1252\deff0\deftab720{\fonttbl" & _"{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}" &"{\f2\froman\fprq2 Times New Roman;}}" & _"{\colortbl\red0\green0\blue0;\red255\green0\blue0;}" & _"\deflang1033\horzdoc{\*\fchars }{\*\lchars }" & _"\pard\plain\f2\fs24 Test LeftDoubleQuote=\ldblquote RightDoubleQuote=\rdblquote Test single quote LeftQuote=\lquote and RightQuote=\rquote \par }"
RadEditor1.LoadRtfContent(rtfString)
<telerik:RadDateInput runat="server" ID="rdiDate" DateFormat="MMM yyyy" DisplayDateFormat="MMM yyyy"> <IncrementSettings InterceptMouseWheel="false" InterceptArrowKeys="true" /></telerik:RadDateInput>function changeDate(sender, args) { var tbVal = sender.get_textBoxValue(); if (!(document.getElementById('<%= hdnDate.ClientID %>').value == tbVal)) { var month = tbVal.substr(0, 3); var year = tbVal.substr(4, 4); var newDate = new Date(Date.parse(month + " 01, " + year)); document.getElementById('<%= hdnDate.ClientID %>').value = month + " " + year; window.setTimeout(function () { sender.set_selectedDate(newDate); }, 1); }}<telerik:RadDateInput runat="server" ID="rdiDate" DateFormat="MMM yyyy" DisplayDateFormat="MMM yyyy"> <ClientEvents OnValueChanging="changeDate" /> <IncrementSettings InterceptMouseWheel="false" InterceptArrowKeys="true" /></telerik:RadDateInput><input runat="server" type="hidden" value="" id="hdnDate" /><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title> <style type="text/css"> div.RadMenu a.rmLink .rmLeftImage { position: relative; } div.RadMenu .rmItem .rmLink .rmLeftImage, div.RadMenu .rmItem .rmLink, div.RadMenu .rmLink .rmText { margin: 0; padding: 0; } .RadTabStrip .rtsLevel, .RadTabStrip .rtsUL, .RadTabStrip .rtsLI { float: left !important; overflow: visible !important; } </style></head><body> <form id="form1" runat="server"> <div> <telerik:RadScriptManager ID="RadScriptManager" runat="server"> </telerik:RadScriptManager> <telerik:RadTabStrip ID="RadTabStrip" runat="server" Skin="WebBlue"> <Tabs> <telerik:RadTab Text="Test 1" Selected="true" /> <telerik:RadTab Text="Test 2" /> <telerik:RadTab Text="Test 3" /> <telerik:RadTab Text="Test 4"> <TabTemplate> Test 4 <telerik:RadMenu ID="RadMenu" runat="server" Skin="" EnableImagePreloading="true" DefaultGroupSettings-OffsetY="-1"> <Items> <telerik:RadMenuItem ImageUrl="~/Images/downarrow.png"> <Items> <telerik:RadMenuItem Text="Menu Item 1" /> <telerik:RadMenuItem Text="Menu Item 2" /> </Items> </telerik:RadMenuItem> </Items> </telerik:RadMenu> </TabTemplate> </telerik:RadTab> <telerik:RadTab Text="Test 5" /> <telerik:RadTab Text="Test 6" /> <telerik:RadTab Text="Test 7" /> <telerik:RadTab Text="Test 8" /> </Tabs> </telerik:RadTabStrip> </div> </form></body></html>