or
<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" GridLines="None" Skin="WebBlue" OnNeedDataSource="RadGrid1_NeedDataSource" OnDataBound="RadGrid1_DataBound" width="100%" AutoGenerateColumns="False"> <ExportSettings ExportOnlyData="True" IgnorePaging="true" OpenInNewWindow="true"> <Excel Format="ExcelML" /> </ExportSettings> <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True"> </ClientSettings> <MasterTableView CommandItemDisplay="Top" PageSize="10"> <CommandItemSettings > </CommandItemSettings> <RowIndicatorColumn> <HeaderStyle Width="20px"></HeaderStyle> </RowIndicatorColumn> <ExpandCollapseColumn> <HeaderStyle Width="20px"></HeaderStyle> </ExpandCollapseColumn> <Columns> <telerik:GridButtonColumn CommandName="Edit" Text="Edit" UniqueName="EditColumn" ButtonType="ImageButton" ></telerik:GridButtonColumn> <telerik:GridBoundColumn DataField="ID" FilterControlWidth="30px" HeaderText="Comment ID" UniqueName="ID"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="CommentDate" FilterControlWidth="30px" HeaderText="Comment Date" UniqueName="column2"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Commentor" HeaderText="Commentor" UniqueName="column3"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Comment" HeaderText="Comment" UniqueName="column4"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="InsertDate" FilterControlWidth="30px" HeaderText="Insert Date" UniqueName="column5"> </telerik:GridBoundColumn> </Columns> <CommandItemTemplate> <a href="#" onclick="return ShowInsertForm();">Add New Comment</a> <asp:ImageButton ID="excelExport" runat="server" ImageUrl="~/images/ExportToExcel.gif" CommandName="ExportToExcel" ImageAlign="Right" /> </CommandItemTemplate> <EditFormSettings EditFormType="Template"> <EditColumn FilterControlAltText="Filter EditCommandColumn column" UniqueName="editTemplate"></EditColumn> <FormTemplate> <table id="Table1" cellspacing="1" cellpadding="1" border="0" class="module"> <tr> <td colspan="2"><strong>Update Comment:</strong> </td> </tr> <tr> <td> ID: </td> <td> <asp:label ID="ID_TextBox" runat="server" Text='<%# Bind("ID") %>'> </asp:label> </td> </tr> <tr> <td> Comment Date: </td> <td> <telerik:RadDatePicker ID="cmDate" Runat="server" DateInput-EmptyMessage="Select a Date" Skin="WebBlue" SelectedDate='<%# Bind("CommentDate") %>' > </telerik:RadDatePicker> <asp:RequiredFieldValidator ID="PickerRequiredFieldValidator" runat="server" Display="Dynamic" ControlToValidate="cmDate" ErrorMessage="Please select a date" ForeColor="Black" Font-Bold="True" Font-Italic="True" /> </td> </tr> <tr> <td> Comment: </td> <td> <asp:RequiredFieldValidator ID="TextBoxRequiredFieldValidator" runat="server" Display="Dynamic" ControlToValidate="txtComment" ErrorMessage="Must Enter Comment" ForeColor="Black" Font-Bold="True" Font-Italic="True" /><br /> <telerik:RadEditor ID="txtComment" runat="server" Skin="WebBlue" EnableResize="False" Width="600px" Height="250px" Content='<%# Bind("Comment")%>'> <CssFiles> <telerik:EditorCssFile value="~Style/EditorContentArea.css" /> </CssFiles> <Tools> <telerik:EditorToolGroup Tag="MainToolbar"> <telerik:EditorTool Name="FindAndReplace" /> <telerik:EditorSeparator /> <telerik:EditorSplitButton Name="Undo"> </telerik:EditorSplitButton> <telerik:EditorSplitButton Name="Redo"> </telerik:EditorSplitButton> <telerik:EditorSeparator /> <telerik:EditorTool Name="Cut" /> <telerik:EditorTool Name="Copy" /> <telerik:EditorTool Name="Paste" ShortCut="CTRL+V" /> </telerik:EditorToolGroup> <telerik:EditorToolGroup Tag="Formatting"> <telerik:EditorTool Name="Bold" /> <telerik:EditorTool Name="Italic" /> <telerik:EditorTool Name="Underline" /> <telerik:EditorSeparator /> <telerik:EditorSplitButton Name="ForeColor"> </telerik:EditorSplitButton> <telerik:EditorSplitButton Name="BackColor"> </telerik:EditorSplitButton> <telerik:EditorSeparator /> <telerik:EditorDropDown Name="FontName"> </telerik:EditorDropDown> <telerik:EditorDropDown Name="RealFontSize"> </telerik:EditorDropDown> </telerik:EditorToolGroup> </Tools> <Content> </Content> </telerik:RadEditor> </td> </tr> <tr> <td align="right" colspan="2"> <asp:Button ID="btnUpdate" Text='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "Insert", "Update") %>' runat="server" CommandName='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "PerformInsert", "Update")%>' > </asp:Button> <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button> </td> </tr> </table> </FormTemplate> </EditFormSettings> </MasterTableView> </telerik:RadGrid>Private Sub RadGrid1_UpdateCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.UpdateCommand 'Get User's name connSql.ConnectionString = sqlConn.ToString() Dim exSqlUser As New SqlCommand("dbo.getUser", connSql) exSqlUser.CommandType = CommandType.StoredProcedure exSqlUser.Parameters.AddWithValue("@UID", user) exSqlUser.Parameters.Add("@UserName", SqlDbType.VarChar, 40) exSqlUser.Parameters("@UserName").Direction = ParameterDirection.Output connSql.Open() exSqlUser.ExecuteNonQuery() connSql.Close() Dim username As String = exSqlUser.Parameters("@UserName").Value.ToString() 'get Values and compare Dim gridediteditem As GridEditFormItem = CType(e.Item, GridEditFormItem) Dim newValues As Hashtable = New Hashtable e.Item.OwnerTableView.ExtractValuesFromItem(newValues, gridediteditem) 'e.Item.OwnerTableView.ExtractValuesFromItem(oldValues, gridediteditem.SavedOldValues) Dim Comment As String, CommentDate As DateTime, Updating As String Dim oldComment As String = gridediteditem.SavedOldValues("Comment") Dim oldDate As DateTime = gridediteditem.SavedOldValues("CommentDate") Dim ID As Integer If newValues.Item("ID") = Nothing Then ID = "" Else ID = CInt(newValues.Item("ID")) End If Dim newCommentDate As DateTime If newValues.Item("CommentDate") = Nothing Then newCommentDate = "" Else newCommentDate = newValues.Item("CommentDate").ToString() End If Dim newComment As String If newValues.Item("Comment") = Nothing Then newComment = "" Else newComment = newValues.Item("Comment").ToString() End If If oldComment <> newComment And newComment <> "" Then Updating = "Yes" If oldDate <> newCommentDate Then Comment = newComment & "<br />Modified by " & username & " on " & Today().ToString() & "<br />" & "Date changed from: " & oldDate & " to: " & newCommentDate & " by " & username & " on " & Today().ToString() & "<br /><br />" & oldComment CommentDate = newCommentDate Else Comment = newComment & "<br />Modified by " & username & " on " & Today().ToString() & oldComment End If Else If oldDate <> newCommentDate Then Updating = "Yes" CommentDate = newCommentDate Comment = "<br /> Date changed from: " & oldDate & " to: " & newCommentDate & " by " & username & " on " & Today().ToString() & "<br /><br />" & oldComment End If End If If Updating = "Yes" Then Dim exSqlCom As New SqlCommand("dbo.EditComment", connSql) exSqlCom.CommandType = CommandType.StoredProcedure exSqlCom.Parameters.AddWithValue("@ID", ID) exSqlCom.Parameters.AddWithValue("@RapID", RadComboBox1.SelectedValue) exSqlCom.Parameters.AddWithValue("@User", user) exSqlCom.Parameters.AddWithValue("@CommentDate", CommentDate) exSqlCom.Parameters.AddWithValue("@Comment", Comment) exSqlCom.Parameters.Add("@ReturnValue", SqlDbType.Int) exSqlCom.Parameters("@ReturnValue").Direction = ParameterDirection.Output connSql.Open() exSqlCom.ExecuteNonQuery() connSql.Close() End IfEnd Sub<%@ Control Language="VB" AutoEventWireup="false" CodeFile="ImageRotator.ascx.vb" Inherits="ImageRotator" %> <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> <div id="scrollingImages"> <telerik:RadRotator ID="RadRotator1" runat="server" FrameDuration="4000" SlideShowAnimation-Duration="1000" Width="100%" ItemWidth="100%" Height="400px" PauseOnMouseOver="true" ItemHeight="400px" ScrollDirection="Left"> <Items> <telerik:RadRotatorItem ID="item1" runat="server" > <ItemTemplate> <asp:Image ID="Image1" runat="server" ImageUrl="~/images/managedservices2.jpg" /> </ItemTemplate> </telerik:RadRotatorItem> <telerik:RadRotatorItem ID="item2" runat="server" > <ItemTemplate> <asp:Image ID="Image2" runat="server" ImageUrl="~/images/managedservices2.jpg" /> </ItemTemplate> </telerik:RadRotatorItem> <telerik:RadRotatorItem ID="item3" runat="server" > <ItemTemplate> <asp:Image ID="Image3" runat="server" ImageUrl="~/images/managedservices2.jpg" /> </ItemTemplate> </telerik:RadRotatorItem> </Items> </telerik:RadRotator> </div> <%@ Control Language="VB" AutoEventWireup="false" CodeFile="ImageRotator.ascx.vb" Inherits="ImageRotator" %> <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> <div id="scrollingImages"> <telerik:RadRotator ID="RadRotator1" runat="server" FrameDuration="4000" WrapFrames="true" SlideShowAnimation-Duration="1000" Width="100%" ItemWidth="100%" Height="400px" PauseOnMouseOver="true" ItemHeight="400px" ScrollDirection="Left"> <Items> <telerik:RadRotatorItem ID="item1" runat="server" > <ItemTemplate> <asp:Image ID="Image1" runat="server" ImageUrl="images/managedservices2.jpg" /> </ItemTemplate> </telerik:RadRotatorItem> <telerik:RadRotatorItem ID="item2" runat="server" > <ItemTemplate> <asp:Image ID="Image2" runat="server" ImageUrl="images/managedservices2.jpg" /> </ItemTemplate> </telerik:RadRotatorItem> <telerik:RadRotatorItem ID="item3" runat="server" > <ItemTemplate> <asp:Image ID="Image3" runat="server" ImageUrl="images/managedservices2.jpg" /> </ItemTemplate> </telerik:RadRotatorItem> </Items> </telerik:RadRotator> </div>
<telerik:RadWindowManager ID="rWinManager" runat="server"> <Windows> <telerik:RadWindow ID="rWinResult" runat="server" OnClientActivate="WindowOnClientActivate" Width="350" Behaviors="Close"> <ContentTemplate> <!--This is the main content that needs to work only with ajax.--> </ContentTemplate> </telerik:RadWindow> </Windows></telerik:RadWindowManager><asp:UpdatePanel ID="MyUpdatePanel" runat="server" UpdateMode="Always"> <ContentTemplate> <!--poting in a table will make the controls aligned.. it was not.--> <table> <tr> <td><telerik:RadTextBox ID="TxtSearch" runat="server" Width="200"></telerik:RadTextBox></td> <td> <telerik:RadButton ID="BtnSearch" runat="server" OnClick="BtnSearch_Click"> <Icon PrimaryIconCssClass="rbSearch" /> </telerik:RadButton> </td> <td> <asp:UpdateProgress ID="MyUpdateProgress" runat="server" AssociatedUpdatePanelID="MyUpdatePanel"> <ProgressTemplate> <span style="color:Gray;font-size:10px;"> Loading... </span> </ProgressTemplate> </asp:UpdateProgress> </td> </tr> </table> <telerik:RadTreeView ID="rtvResult" runat="server" DataFieldID="Key" DataValueField="Key" DataTextField="DisplayValue"></telerik:RadTreeView> </ContentTemplate></asp:UpdatePanel>Cannot unregister UpdatePanel with ID 'MyUpdatePanel' since it was not registered with the ScriptManager. This might occur if the UpdatePanel was removed from the control tree and later added again, which is not supported.Parameter name: updatePanel public static void ShowDocumentDialog(RadDialogOpener rdo, string sFolders, string sExts, string sClientCallbackFunction, int iMaxUploadFileSize){ string[] aFolder = sFolders.Split(','); FileManagerDialogParameters documentManagerParameters = new FileManagerDialogParameters(); documentManagerParameters.ViewPaths = aFolder; documentManagerParameters.UploadPaths = aFolder; documentManagerParameters.DeletePaths = aFolder; documentManagerParameters.MaxUploadFileSize = iMaxUploadFileSize; if (!string.IsNullOrEmpty(sExts)) documentManagerParameters.SearchPatterns = sExts.Split(','); //{ "*.doc", "*.docx", "*.pdf", "*.xls", "*.xlsx", "*.ppt", "*.pptx", "*.zip", "*.rar", "*.txt" }; DialogDefinition documentManager = new DialogDefinition(typeof(DocumentManagerDialog), documentManagerParameters); documentManager.ClientCallbackFunction = sClientCallbackFunction; documentManager.Width = Unit.Pixel(694); documentManager.Height = Unit.Pixel(440); // Remove it if exist if (rdo.DialogDefinitions.ContainsKey("DocumentManager")) rdo.DialogDefinitions.Remove("DocumentManager"); rdo.DialogDefinitions.Add("DocumentManager", documentManager);}
<rad:RadNumericTextBox ID="radNumQty" runat="server" CssClass="txtbox" Width="40px" IncrementSettings-Step="1" MinValue="1" MaxValue="9999999" MaxLength="7" NumberFormat-DecimalDigits="0" ClientEvents-OnValueChanging="clientUpsellChanges"></rad:RadNumericTextBox>if (intQtyError != 0) {// Toggle css on field with errorvar radQtyBox = $find(arrExtraItemFields[0]);radQtyBox.TextBoxElement.className = "txtboxerror";}