or
| <telerik:RadGrid ID="RadGrid1" runat="server" AllowMultiRowSelection="false" GridLines="None" |
| Width="100%" Height="500px" AllowSorting="true" EnableAjaxSkinRendering="true" |
| EnableViewState="true" AutoGenerateColumns="false"> |
| <MasterTableView AllowAutomaticUpdates="true" AutoGenerateColumns="false" AllowCustomSorting="true" |
| AllowNaturalSort="false" NoMasterRecordsText="This item has no documents"> |
| <Columns> |
| <telerik:GridBoundColumn UniqueName="DocumentID" DataField="DocumentID" HeaderText="ID" Display="false"></telerik:GridBoundColumn> |
| <telerik:GridBoundColumn UniqueName="Barcode" DataField="Barcode" HeaderText="Barcode" Display="true" ItemStyle-Width="110px"></telerik:GridBoundColumn> |
| <telerik:GridBoundColumn UniqueName="Type" DataField="Type" HeaderText="Document Type" Display="true" ItemStyle-Width="200px"></telerik:GridBoundColumn> |
| <telerik:GridBoundColumn UniqueName="FolderID" DataField="ID" HeaderText="FolderID" Display="false"></telerik:GridBoundColumn> |
| <telerik:GridBoundColumn UniqueName="ReceivedOn" DataField="Received On" HeaderText="Received On" Display="true" ItemStyle-Width="70px"></telerik:GridBoundColumn> |
| <telerik:GridBoundColumn UniqueName="LinkedOn" DataField="Linked On" HeaderText="Linked On" Display="true" ItemStyle-Width="70px"></telerik:GridBoundColumn> |
| <telerik:GridBoundColumn UniqueName="FileType" DataField="File Type" HeaderText="File Type" Display="true" ItemStyle-Width="130px"></telerik:GridBoundColumn> |
| <telerik:GridBoundColumn UniqueName="eDocSource" DataField="eDocSource" HeaderText="eDocSource" Display="false"></telerik:GridBoundColumn> |
| <telerik:GridBoundColumn UniqueName="Ref1" DataField="Ref1" HeaderText="Ref1" Display="false"></telerik:GridBoundColumn> |
| <telerik:GridCheckBoxColumn UniqueName="Linked" DataField="Linked" HeaderText="Linked" Display="false"></telerik:GridCheckBoxColumn> |
| <telerik:GridTemplateColumn UniqueName="doclink" ItemStyle-Width="300px"> |
| <ItemTemplate> |
| <telerik:RadUpload ID="RadUpload1" runat="server" MaxFileInputsCount="1" RegisterWithScriptManager="true" |
| TargetFolder="" OnValidatingFile="RadUpload1_ValidatingFile" EnableFileInputSkinning="true" |
| ControlObjectsVisibility="RemoveButtons" Visible='<%# IIf(DataBinder.Eval(Container.DataItem, "Linked"), false, true) %>' |
| Enabled='<%# IIf(DataBinder.Eval(Container.DataItem, "Linked"), false, true) %>' |
| docid='<%# DataBinder.Eval(Container.DataItem, "DocumentID") %>' InputSize="25" |
| docbarcode='<%# DataBinder.Eval(Container.DataItem, "Barcode") %>' |
| OnClientAdded="OnClientAddedHandler" OnClientDeleting="OnClientDeleting" OnClientClearing="uploadFileClearing" |
| OnClientFileSelected="uploadFileSelected"> |
| </telerik:RadUpload> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
| </Columns> |
| </MasterTableView> |
| <ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="false"> |
| <Scrolling AllowScroll="true" /> |
| <Selecting AllowRowSelect="true" /> |
| <ClientEvents OnRowCreating="radDummy" OnRowCreated="radDummy" /> |
| </ClientSettings> |
| </telerik:RadGrid> |
| '*** some validation here - removed from example |
| Try |
| _sDocid = TryCast(sender, Telerik.Web.UI.RadUpload).Attributes.Item("docid") |
| Catch ex1 As Exception |
| _isValid = False |
| End Try |
| If Not _isValid Then |
| '** deal with invalid upload |
| Return |
| End If |
| Try |
| _barcode = TryCast(sender, Telerik.Web.UI.RadUpload).Attributes.Item("docbarcode") |
| Catch ex1 As Exception |
| _isValid = False |
| End Try |
| If Not _isValid Then |
| '** deal with invalid upload |
| Return |
| End If |
| Try |
| _docName = e.UploadedFile.GetFieldValue("Name") |
| _docName = _docName.Trim() |
| Catch ex1 As Exception |
| _docName = "" |
| End Try |
| If _docName.Length = 0 Then |
| _docName = String.Format("Document [{0}]", _barcode) |
| End If |
| '** process the upload |
| '** -- code removed from example |
| var numberOfCustomFields = 0; |
| function OnClientAddedHandler(sender, eventArgs) { |
| var inputRow = eventArgs.get_row(); |
| var uList = inputRow.parentNode; |
| var count = 0; |
| // add a new row for a Title field |
| newRow = document.createElement("li"); |
| count++; |
| uList.insertBefore(newRow, inputRow); |
| var label = document.createElement("span"); |
| label.innerHTML = "Name : "; |
| label.style.width = "150px"; |
| label.style.fontSize = "10pt"; |
| label.style.fontWeight = "bold"; |
| input = document.createElement("input"); |
| input.type = "text"; |
| input.style.width = "200px"; |
| input.id = input.name = sender.getID("Name"); |
| newRow.appendChild(label); |
| newRow.appendChild(input); |
| //add a File label in front of the file input |
| var fileInputSpan = inputRow.getElementsByTagName("span")[0]; |
| label = document.createElement("span"); |
| label.innerHTML = "File : "; |
| label.style.width = "150px"; |
| label.style.fontSize = "10pt"; |
| label.style.fontWeight = "bold"; |
| label.style.verticalAlign = "middle"; |
| label.style.paddingTop = "5px"; |
| inputRow.insertBefore(label, fileInputSpan); |
| numberOfCustomFields = count; |
| }; |
| function uploadFileClearing(sender, eventArgs) { |
| }; |
| function OnClientDeleting(sender, eventArgs) { |
| }; |
| <form id="frmLogin" runat="server"> |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server" |
| HttpHandlerUrl="~/SBP.UI.WebResource.axd"> |
| </telerik:RadScriptManager> |
| <div id="login" align="center"> |
| <div style="position:absolute; left:0; right:0; top:0; height:35px; background-color:#d9d9d9; text-align:center"> |
| <img src="/App_Themes/login/logo_sbp.png" width="93" height="35" /> |
| </div> |
| <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Black"> |
| </telerik:RadAjaxLoadingPanel> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" |
| DefaultLoadingPanelID="RadAjaxLoadingPanel1"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="LogOnSBP"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="LogOnSBP" |
| LoadingPanelID="RadAjaxLoadingPanel1" UpdatePanelRenderMode="Inline" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <telerik:RadAjaxPanel ID="rpLogin" runat="server"> |
| <asp:Login ID="LogOnSBP" runat="server" |
| FailureText="Acesso negado" FailureTextStyle-CssClass="falhaAcesso" Orientation="Horizontal" |
| LoginButtonText="Entrar" |
| OnAuthenticate="LogOn1_Authenticate" PasswordLabelText="Senha:" |
| PasswordRequiredErrorMessage="Pass required" |
| TitleText="" UserNameLabelText="Login:" |
| UserNameRequiredErrorMessage="User required" |
| VisibleWhenLoggedIn="False" DestinationPageUrl="~/Default.aspx" |
| DisplayRememberMe="False" > |
| <CheckBoxStyle HorizontalAlign="Left" /> |
| <LoginButtonStyle CssClass="btLogin" /> |
| <LayoutTemplate> |
| <table border="0" cellpadding="1" cellspacing="0" |
| style="border-collapse:collapse;"> |
| <tr> |
| <td> |
| <table border="0" cellpadding="0"> |
| <tr> |
| <td align="left"> |
| <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName"><asp:RequiredFieldValidator CssClass="erroFail" ID="UserNameRequired" runat="server" ControlToValidate="UserName" ErrorMessage="User required" ToolTip="Usuário necessário" ValidationGroup="LogOnSBP">*</asp:RequiredFieldValidator> Login:</asp:Label> |
| <asp:TextBox CssClass="tiLogin" ID="UserName" runat="server"></asp:TextBox> |
| </td> |
| <td align="left" style=" padding-left:10px;"> |
| <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password"><asp:RequiredFieldValidator CssClass="erroFail" ID="PasswordRequired" runat="server" ControlToValidate="Password" ErrorMessage="Pass required" ToolTip="Senha necessária" ValidationGroup="LogOnSBP">*</asp:RequiredFieldValidator> Senha:</asp:Label> |
| <asp:TextBox CssClass="tiSenha" ID="Password" runat="server" TextMode="Password"></asp:TextBox> |
| </td> |
| </tr> |
| <tr> |
| <td style="width:180px; position:relative; height:80px;"> |
| <telerik:RadCaptcha ID="rcBotProtection" runat="server" |
| ProtectionMode="InvisibleTextBox"> |
| </telerik:RadCaptcha> |
| <telerik:RadCaptcha ID="rcCaptcha" runat="server" CaptchaLinkButtonText="" |
| ValidatedTextBoxID="txtCaptcha" ValidationGroup="LogOnSBP" |
| CaptchaTextBoxLabel="" CssClass="rcAreaCaptcha" EnableRefreshImage="true" |
| HttpHandlerUrl="~/SBP.UI.WebResource.axd" Height="24px" Width="128px" |
| ImageStorageLocation="Cache" IgnoreCase="False"> |
| <CaptchaImage ImageCssClass="rcCaptchaImage" TextLength="5" LineNoise="High" BackgroundNoise="High" RenderImageOnly="true"/> |
| </telerik:RadCaptcha> |
| </td> |
| <td style="width:180px; padding-left:10px; text-align:left"> |
| <div style="float:right"><asp:Label ID="Label1" runat="server" CssClass="lblCaptcha" AssociatedControlID="rcCaptcha">Digite os caracteres:</asp:Label><asp:TextBox CssClass="tiCaptcha" ID="txtCaptcha" runat="server"></asp:TextBox><asp:RequiredFieldValidator CssClass="erroFail" ID="CaptchaRequired" runat="server" ControlToValidate="txtCaptcha" ErrorMessage="Pass required" ToolTip="Captcha necessário" ValidationGroup="LogOnSBP">*</asp:RequiredFieldValidator></div> |
| </td> |
| </tr> |
| <tr> |
| <td colspan="2" style="text-align:center"> |
| <asp:Button ID="Login" runat="server" CommandName="Login" CssClass="btLogin" Text="Entrar" ValidationGroup="LogOnSBP" /> |
| <span style="display:block; color:#D00"><asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal></span> |
| </td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| </table> |
| </LayoutTemplate> |
| <InstructionTextStyle Font-Italic="True" ForeColor="Black" /> |
| <LabelStyle HorizontalAlign="Left" /> |
| <FailureTextStyle CssClass="falhaAcesso"></FailureTextStyle> |
| </asp:Login> |
| </telerik:RadAjaxPanel> |
| </div> |
| </form> |
Does anyone imagine what is going on ? Tought about something related to Javascript...
Best regards,
Daniel Bichuete
| protected void btnUpdateCart_Click(object sender, EventArgs e) |
| { |
| // TODO: Use for loop to stop when an expression evaluates to false. |
| //for (int i = 0; i < grdCart.Items.Count; i++) |
| foreach (GridDataItem dataItem in grdCart.MasterTableView.Items) |
| { |
| // TODO: Cast (GridDataItem)dataItem here and remove foreach |
| string strItemId = dataItem.GetDataKeyValue("ID").ToString(); |
| RadTextBox txtQuantity = (RadTextBox)dataItem.FindControl("txtQuantity"); |
| int itemId, quantity; |
| bool success = false; |
| if (Int32.TryParse(strItemId, out itemId) && Int32.TryParse(txtQuantity.Text, out quantity)) |
| { |
| success = _cartItem.Update(itemId, quantity); |
| } |
| lblFeedback.Text = success ? "Your cart has been successfully updated!" : "There was an error updating your cart.<br />Please verify that the quantity value is a number and try again."; |
| } |
| grdCart.Rebind(); |
| } |
| ... |
| <tool name="FormatStripper"> |
| <tool name="StripCss" /> |
| <tool name="StripFont" /> |
| <tool name="StripWord" /> |
| </tool> |
| ... |
| ... |
| <property name="StripFormattingOptions">MSWord, Css, Font</property> |
| .... |

<add assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
plus there is a tag not defined error on| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="btnSearch"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadTabStripResults" /> |
| <telerik:AjaxUpdatedControl ControlID="RadMultiPageresults" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="listAttests"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadTabStripDetails" /> |
| <telerik:AjaxUpdatedControl ControlID="RadMultiPageDetails" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| ... |
| <telerik:RadTabStrip ID="RadTabStripSearch" runat="server" Skin="Outlook" MultiPageID="RadMultiPageSearch" SelectedIndex="0"> |
| <Tabs> |
| <telerik:RadTab Text="Zoeken"> |
| </telerik:RadTab> |
| </Tabs> |
| </telerik:RadTabStrip> |
| <telerik:RadMultiPage ID="RadMultiPageSearch" runat="server" SelectedIndex="0" CssClass="pageView"> |
| <telerik:RadPageView ID="RadPageViewSearch" runat="server"> |
| ... |
| <asp:Button ID="btnSearch" runat="server" Text="Zoeken" /> |
| ... |
| </telerik:RadPageView> |
| </telerik:RadMultiPage> |
| <telerik:RadTabStrip ID="RadTabStripResults" runat="server" Skin="Outlook" MultiPageID="RadMultiPageResults" SelectedIndex="0"> |
| <Tabs> |
| <telerik:RadTab Text="Resultaten"> |
| </telerik:RadTab> |
| </Tabs> |
| </telerik:RadTabStrip> |
| <telerik:RadMultiPage ID="RadMultiPageresults" runat="server" SelectedIndex="0" CssClass="pageView"> |
| <telerik:RadPageView ID="RadPageViewResults" runat="server"> |
| ... |
| <asp:ListBox ID="listAttests" runat="server" Width="300px" AutoPostBack="true"></asp:ListBox> |
| ... |
| </telerik:RadPageView> |
| </telerik:RadMultiPage> |
| <telerik:RadTabStrip ID="RadTabStripDetails" runat="server" Skin="Outlook" MultiPageID="RadMultiPageDetails" SelectedIndex="0"> |
| <Tabs> |
| <telerik:RadTab Text="Attest" PageViewID="RadPageViewAttestDetails"> |
| </telerik:RadTab> |
| <telerik:RadTab Text="Redenen" PageViewID="RadPageViewReasonDetails"> |
| </telerik:RadTab> |
| <telerik:RadTab Text="Artikels" PageViewID="RadPageViewArticles"> |
| </telerik:RadTab> |
| </Tabs> |
| </telerik:RadTabStrip> |
| <telerik:RadMultiPage ID="RadMultiPageDetails" runat="server" SelectedIndex="0" CssClass="pageView"> |
| <telerik:RadPageView ID="RadPageViewAttestDetails" runat="server"> |
| ... |
| </telerik:RadPageView> |
| <telerik:RadPageView ID="RadPageViewReasonDetails" runat="server" CssClass="pageView"> |
| ... |
| </telerik:RadPageView> |
| <telerik:RadPageView ID="RadPageViewArticles" runat="server" CssClass="pageView"> |
| ... |
| </telerik:RadPageView> |
| </telerik:RadMultiPage> |
| <telerik:RadDockLayout runat="server" ID="RadDockLayout1" |
| OnLoadDockLayout="RadDockLayout1_LoadDockLayout" |
| OnSaveDockLayout="RadDockLayout1_SaveDockLayout" |
| StoreLayoutInViewState=true |
| > |
| <div id="div_rdZoneCurrentCycle"> |
| <telerik:RadDockZone runat="server" ID="RadDockZone_ExistingPriorities" |
| BorderStyle="None" |
| MinHeight="30px" width="100%" |
| > |
| </telerik:RadDockZone> |
| </div> |
| </telerik:RadDockLayout> |
| public partial class SSPPrioritizePriorities : System.Web.UI.UserControl |
| { |
| private List<DockState> CurrentDockStates |
| { |
| get |
| { |
| // Store the info about the added docks in the session. |
| List<DockState> _currentDockStates = (List<DockState>)Session["CurrentDockStatesDynamicDocks"]; |
| if (Object.Equals(_currentDockStates, null)) |
| { |
| _currentDockStates = new List<DockState>(); |
| Session["CurrentDockStatesDynamicDocks"] = _currentDockStates; |
| } |
| return _currentDockStates; |
| } |
| set |
| { |
| Session["CurrentDockStatesDynamicDocks"] = value; |
| } |
| } |
| #endregion |
| const string TitleBarText = "TitleText"; |
| const string CurrentRank = "CurRankText"; |
| const string PreviousRank = "PreRankText"; |
| #endregion |
| #region " Page Load Events " |
| protected void Page_Load(object sender,EventArgs e) |
| { |
| } |
| protected override void OnInit(EventArgs e) |
| { |
| base.OnInit(e); |
| if (!Page.IsPostBack) |
| { |
| using (ObjectsContext context = new ObjectsContext()) |
| { |
| MyManager manager = new MyManager(context); |
| CurrentCyclePriorities = manager.something.Cycle(); |
| CurrentCycleSSP = manager.somehingelse.GetCurrent(this._SSPK); |
| PreviousCycleSSP = manager.somehingelse.GetPrevious(this._SSPK); |
| LoadPriorities(); |
| } |
| } |
| else |
| { |
| for (int i = 0; i < CurrentDockStates.Count; i++) |
| { |
| RadDock dock = CreateRadDockFromState(CurrentDockStates[i]); |
| RadDockLayout1.Controls.Add(dock); |
| CreateSaveStateTrigger(dock); |
| } |
| } |
| SetRadDockOrder(); |
| } |
| #endregion |
| #region " Priorities Load Events " |
| protected void LoadPriorities() |
| { |
| CreateRadDock(sspPrevious.Priority, true, true, false, |
| } |
| #endregion |
| #region " Dock Events " |
| #region " Create " |
| private void CreateRadDock(BusinessObjects.Priority apriority, Boolean BottomDock, Boolean Closed, Boolean New, int previousRanking, int? CurrentRanking) |
| { |
| try |
| { |
| // Create the Rad Dock and set properties |
| RadDock dock = new RadDock(); |
| dock.DockMode = DockMode.Docked; |
| dock.DockHandle = DockHandle.TitleBar; |
| dock.Collapsed = true; |
| dock.Width = Unit.Percentage(96); |
| dock.Skin = "MySkin"; |
| dock.EnableEmbeddedSkins = false; |
| dock.EnableRoundedCorners = true; |
| dock.EnableAnimation = true; |
| dock.Font.Name = "Arial"; |
| int intIndex = dock.Index; |
| dock.AutoPostBack = true; |
| dock.CommandsAutoPostBack = true; |
| // Create the TitleBar and add to Rad Dock |
| TitleBarTemplate2 tbt = new TitleBarTemplate2(); |
| tbt.GenerateTitleBar(dock.TitlebarContainer, 5); |
| dock.TitlebarTemplate = tbt; |
| // Add Rad Dock Title information |
| dock.UniqueName = apriority.PK.ToString(); |
| dock.ID = string.Format("rd{0}", dock.UniqueName); |
| dock.Title = "<span style=\"font-size:14px;\"><b>" + apriority.PK.ToString() + "</b></span> "; |
| ((Label)dock.TitlebarContainer.Controls[0].FindControl(TitleBarText)).Text = dock.Title; |
| // Add Rad Dock Previous Rank information |
| if (!New) |
| { |
| String preRanking = "<span style=\"font-size:14px;\"><b>(" + previousRanking.ToString() + ")</b></span>"; |
| ((Label)dock.TitlebarContainer.Controls[0].FindControl(PreviousRank)).Text = preRanking; |
| } |
| // Set Rad Dock Events and Triggers |
| if (BottomDock) |
| dock.OnClientDragStart = "OnClientDragStart"; |
| CreateSaveStateTrigger(dock); |
| RadDockZone_ExistingPriorities.Controls.Add(dock); |
| } |
| catch (Exception ex) |
| { |
| string s = ex.StackTrace; |
| } |
| } |
| #endregion |
| #region " Order " |
| private void SetRadDockOrder() |
| { |
| foreach (RadDock dock in RadDockZone_ExistingPriorities.Docks) |
| { |
| ((Label)dock.TitlebarContainer.Controls[0].FindControl(CurrentRank)).Text = ""; |
| int newRank = dock.Index + 1; |
| String newRanking = "<span style=\"font-size:14px;\"><b>" + newRank.ToString() + ".</b></span>"; |
| ((Label)dock.TitlebarContainer.Controls[0].FindControl(CurrentRank)).Text = newRanking; |
| } |
| } |
| #endregion |
| #region " States " |
| private RadDock CreateRadDockFromState(DockState state) |
| { |
| RadDock dock = new RadDock(); |
| //// Create the TitleBar and add to Rad Dock |
| TitleBarTemplate2 tbt = new TitleBarTemplate2(); |
| tbt.GenerateTitleBar(dock.TitlebarContainer, 5); |
| dock.TitlebarTemplate = tbt; |
| //// Add Rad Dock Title information |
| dock.UniqueName = state.UniqueName; |
| //dock.Index = state.Index; |
| dock.Title = "<span style=\"font-size:14px;\"><b>" + dock.UniqueName + "</b></span> "; |
| ((Label)dock.TitlebarContainer.Controls[0].FindControl(TitleBarText)).Text = state.Title; |
| return dock; |
| } |
| private void CreateSaveStateTrigger(RadDock dock) |
| { |
| // Ensure that the RadDock control will initiate postback when its position changes on the client or any of the commands is clicked. |
| // Using the trigger we will "ajaxify" that postback. |
| dock.AutoPostBack = true; |
| dock.CommandsAutoPostBack = true; |
| } |
| protected void RadDockLayout1_LoadDockLayout(object sender, DockLayoutEventArgs e) |
| { |
| foreach (DockState state in CurrentDockStates) |
| { |
| e.Positions[state.UniqueName] = state.DockZoneID; |
| e.Indices[state.UniqueName] = state.Index; |
| } |
| } |
| protected void RadDockLayout1_SaveDockLayout(object sender, DockLayoutEventArgs e) |
| { |
| CurrentDockStates = new List<DockState>(); |
| foreach (DockState ds in RadDockLayout1.GetRegisteredDocksState()) |
| { |
| CurrentDockStates.Add(ds); |
| } |
| } |
| #endregion |
| #endregion |
| } |