iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
I have an issue similiar to this thread -> http://www.intersoftpt.com/Community/WebGrid/PerformBatchUpdate-method-on-WebGrid-is-throwing-an-exception/?1288014730903
An exception occurs when calling the WebGrid's PerformBatchUpdate with the false, true parameters. The exception does not occur with the 2nd parameter (UpdateUI) is set to "false". The WebGrid's DLL version is 7.0.7200.403. Any ideas?
The 'rowErrors' start tag on line 2 does not match the end tag of 'BatchUpdateResult'. Line 2, position 167. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Xml.XmlException: The 'rowErrors' start tag on line 2 does not match the end tag of 'BatchUpdateResult'. Line 2, position 167. Source Error: Line 532: { Line 533: // Perform Treaty Claims Batch Update Line 534: this.grdTreatyClaims.PerformBatchUpdate(false, true); Line 535: } Line 536: Source File: C:\Code\FWB\Projects.Dev\Client\Endurance.Re.FWB.Web\FWBWebControls\Treaty\TreatyClaimsGrid.ascx.cs Line: 534 Stack Trace: [XmlException: The 'rowErrors' start tag on line 2 does not match the end tag of 'BatchUpdateResult'. Line 2, position 167.] System.Xml.XmlTextReaderImpl.Throw(Exception e) +76 System.Xml.XmlTextReaderImpl.Throw(String res, String[] args) +88 System.Xml.XmlTextReaderImpl.ThrowTagMismatch(NodeData startTag) +214 System.Xml.XmlTextReaderImpl.ParseEndElement() +3975838 System.Xml.XmlTextReaderImpl.ParseElementContent() +243 System.Xml.XmlTextReaderImpl.Read() +45 System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace) +58 System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) +20 System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) +129 System.Xml.XmlDocument.Load(XmlReader reader) +108 System.Xml.XmlDocument.LoadXml(String xml) +113 ISNet.WebUI.WebGrid.WebGrid.PerformBatchUpdate(Boolean throwExceptionOnError, Boolean updateUI) +1494 Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid.Save() in C:\Code\FWB\Projects.Dev\Client\Endurance.Re.FWB.Web\FWBWebControls\Treaty\TreatyClaimsGrid.ascx.cs:534 Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyProcess.SetClaimTransaction(TransactionHeader transactionHeader, String accountingTransactionTypeCode) in C:\Code\FWB\Projects.Dev\Client\Endurance.Re.FWB.Web\FWBWebControls\Treaty\TreatyProcess.ascx.cs:1598 Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyProcess.SetTransactionHeader() in C:\Code\FWB\Projects.Dev\Client\Endurance.Re.FWB.Web\FWBWebControls\Treaty\TreatyProcess.ascx.cs:1487 Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyProcess.Save() in C:\Code\FWB\Projects.Dev\Client\Endurance.Re.FWB.Web\FWBWebControls\Treaty\TreatyProcess.ascx.cs:1311 Endurance.Re.FWB.Web.Pages.Treaty.TreatyProcess.Save() in C:\Code\FWB\Projects.Dev\Client\Endurance.Re.FWB.Web\FWBPages\Treaty\TreatyProcess.aspx.cs:59 [TargetInvocationException: Exception has been thrown by the target of an invocation.] System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0 System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +71 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +350 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29 System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +19 Endurance.Re.Common.MasterSite.Classes.BaseMasterPage.InvokePageMethod(String methodName) in C:\Code\Common\Projects.Dev\Client\Endurance.Re.Common.MasterSite\Classes\BaseMasterPage.cs:332 Endurance.Re.Common.MasterSite.ShellMenuToolbar.ProcessCommandActions(String commandAction) in C:\Code\Common\Projects.Dev\Client\Endurance.Re.Common.MasterSite\MasterPages\ShellMenuToolbar.Master.cs:179 Endurance.Re.Common.MasterSite.ShellMenuToolbar.ToolBar_CommandClick(Object sender, ToolCommandClickEventArgs e) in C:\Code\Common\Projects.Dev\Client\Endurance.Re.Common.MasterSite\MasterPages\ShellMenuToolbar.Master.cs:127 ISNet.WebUI.WebDesktop.WebToolBar.OnCommandClick(ToolCommandClickEventArgs e) +167 ISNet.WebUI.WebDesktop.WebToolBar. (String[] eventArgumentArr) +642 ISNet.WebUI.WebDesktop.WebToolBar.RaisePostBackEvent(String eventArgument) +266 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TreatyClaimsGrid.ascx.cs" Inherits="Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid" %> <%@ Register Assembly="ISNet.WebUI.WebGrid" Namespace="ISNet.WebUI.WebGrid" TagPrefix="ISWebGrid" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolKit" %> <script type="text/javascript" language="javascript" src='<%= this.Page.ResolveUrl("~" + Endurance.Re.Common.Data.CommonConstants.PAGE_JAVASCRIPT_POPUPS_VALIDATEFIELDS_PATH)%>'></script> <script type="text/javascript"> // <!-- function <%=this.ClientID%>_GetGridCtrl() { return ISGetObject("<%=this.grdTreatyClaims.ClientID%>"); } function grdTreatyClaims_OnInitialize(gridID) { try { // Hide the Accept All Changes button WebGrid_ShowHideAcceptAllChangesButton(gridID, false); // Calculate Incurred data var grdTreatyClaims = ISGetObject(gridID); if (grdTreatyClaims != null) { for (var i = 0; i < grdTreatyClaims.TotalRows; i++) { var row = grdTreatyClaims.RootTable.GetRow(i) CalculateIncurred(row); } } } catch (ex) { ShowJSException(ex); } } function grdTreatyClaims_OnRowContextMenu(controlId, rowType, rowElement, menuObject) { try { // Hide the Accept All Changes button var acceptAllChanges = menuObject.Items.GetNamedItem("mnuAcceptAllChanges"); if (acceptAllChanges != null) { acceptAllChanges.Hide(); } // Hide default menu items //WebGrid_ShowContextMenuItems(menuObject, false); // Delete Claim // var deleteClaim = new WebMenuItem(); // deleteClaim.ImageURL = "../..<%=Endurance.Re.Common.Data.CommonConstants.IMAGE_DELETE_PATH%>"; // deleteClaim.Text = "Delete Claim"; // deleteClaim.Name = "itmDeleteClaim"; // deleteClaim.OnClick = "DeleteSelectedClaimRow"; // menuObject.Items.Add(deleteClaim); } catch (ex) { ShowJSException(ex); } } function grdTreatyClaims_OnCheckBoxClick(controlID, tblName, colName, checkboxValue, originalCheckBoxValue) { try { // Perform CheckBox functions switch(colName) { // Enable/Disable INDOutstanding based on Include CheckBox control // NOTE: Reset INDOutstanding if disabled and ensure all calculations are performed case "<%=Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid.GRID_COL_INCLUDEINDOUTSTANDING%>": var row = WebGrid_GetSelectedRow("<%=this.grdTreatyClaims.ClientID%>"); if (row != null) { var indOutstanding = row.GetCell("<%=Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid.GRID_COL_INDOUTSTANDING%>"); if (indOutstanding != null) { // Update field data if (checkboxValue == false) { indOutstanding.SetText("", true); } indOutstanding.SetForceNoEdit((checkboxValue == false)); <%=this.ClientID%>_UpdateField(row, indOutstanding, null, false); } } break; } } catch (ex) { ShowJSException(ex); } } function grdTreatyClaims_OnExitEditMode(controlID, tableName, editObject) { try { var grdTreatyClaims = ISGetObject(controlID); if (grdTreatyClaims == null) { return; } if (editObject == null) { return; } // Format data // NOTE: This performs hotkey shortcuts formatControl(editObject.element, "Number"); } catch (ex) { ShowJSException(ex); } } function grdTreatyClaims_OnAfterExitEditMode(controlID, tableName, editObject) { try { var grdTreatyClaims = ISGetObject(controlID); if (grdTreatyClaims == null) { return; } // Get updated column's name if (editObject == null) { return; } var colName = editObject.ToCellObject().Name; var colValue = editObject.ToCellObject().Value; // Force IncludeINDOutstanding if INDOutstanding is update to ensure update is made if (colName == "<%=Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid.GRID_COL_INDOUTSTANDING%>") { <%=this.ClientID%>_UpdateIncludeOutstandingField(WebGrid_GetSelectedRow("<%=this.grdTreatyClaims.ClientID%>"), colValue); } // Update footer column UpdateGridFooterColumn(controlID, colName); // Calculate Incurred row CalculateIncurredCurrentRow(controlID); return true; } catch (ex) { ShowJSException(ex); } } function <%=this.ClientID%>_SetEnabled(isEnabled) { try { // Enable/Disable // NOTE: A div is used to prevent user input due to Intersoft WebGrid bug allowing input of a disabled grid. WebGrid_Enabled("<%=this.grdTreatyClaims.ClientID%>", isEnabled); $("#divTreatyClaims").css("zIndex", (isEnabled == true) ? 0 : 1); } catch (ex) { ShowJSException(ex); } } function UpdateGridFooterColumn(controlID, colName) { try { if (IsNullOrEmpty(controlID) == true) { return; } if (IsNullOrEmpty(colName) == true) { return; } // Get footer column's new value if (colName == "<%=Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid.GRID_COL_INCLUDEINDOUTSTANDING%>") { colName = "<%=Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid.GRID_COL_INDOUTSTANDING%>"; } var colFooterNewValue = WebGrid_GetColumnAggregateValue(controlID, colName, null); // Update footer column if (IsNullOrEmpty(colFooterNewValue) == false) { WebGrid_SetFooterColumnValue(controlID, colName, <%=this.ClientID%>_FormatAmount(colFooterNewValue)); } } catch (ex) { ShowJSException(ex); } } function CalculateIncurredCurrentRow(controlID) { try { // Calculate Incurred row CalculateIncurred(WebGrid_GetSelectedRow("<%=this.grdTreatyClaims.ClientID%>")); } catch (ex) { ShowJSException(ex); } } function CalculateIncurred(row) { try { // NOTE: The Row's GetCells method is expensive so a local variable is used var rowCells = row.GetCells(); var paid = StripCommasFromNumeric(rowCells.GetNamedItem("<%=Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid.GRID_COL_PAID%>").Value); var expenses = StripCommasFromNumeric(rowCells.GetNamedItem("<%=Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid.GRID_COL_EXPENSES%>").Value); var salvage = StripCommasFromNumeric(rowCells.GetNamedItem("<%=Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid.GRID_COL_SALVAGE%>").Value); var indOutstanding = StripCommasFromNumeric(rowCells.GetNamedItem("<%=Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid.GRID_COL_INDOUTSTANDING%>").Value); var currentINDOutstanding = StripCommasFromNumeric(rowCells.GetNamedItem("<%=Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid.GRID_COL_CURRENT_INDOUTSTANDING%>").Value); var currentIND = StripCommasFromNumeric(rowCells.GetNamedItem("<%=Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid.GRID_COL_CURRENT_IND%>").Value); var currentFEE = StripCommasFromNumeric(rowCells.GetNamedItem("<%=Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid.GRID_COL_CURRENT_FEE%>").Value); var currentREC = StripCommasFromNumeric(rowCells.GetNamedItem("<%=Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid.GRID_COL_CURRENT_REC%>").Value); var cashLoss = StripCommasFromNumeric(rowCells.GetNamedItem("<%=Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid.GRID_COL_CASHLOSS%>").Value); var refund = StripCommasFromNumeric(rowCells.GetNamedItem("<%=Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid.GRID_COL_REFUND%>").Value); var claimPortfolioIn = StripCommasFromNumeric(rowCells.GetNamedItem("<%=Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid.GRID_COL_CLAIMPORTFOLIOIN%>").Value); var claimPortfolioOut = StripCommasFromNumeric(rowCells.GetNamedItem("<%=Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid.GRID_COL_CLAIMPORTFOLIOOUT%>").Value); var currentIncurred = StripCommasFromNumeric(rowCells.GetNamedItem("<%=Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid.GRID_COL_CURRENT_INCURRED%>").Value); var incurred = rowCells.GetNamedItem("<%=Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid.GRID_COL_INCURRED%>"); var incurredMovement = rowCells.GetNamedItem("<%=Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid.GRID_COL_INCURRED_MOVEMENT%>"); var includeOS = rowCells.GetNamedItem("<%=Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid.GRID_COL_INCLUDEINDOUTSTANDING%>"); // Check includeOS Checkbox to determine if the O/S value should be used in // incurred movement calculation. if (!includeOS.Value) { indOutstanding = currentINDOutstanding; } // Enable Incurred and Movement to update value. incurred.SetForceNoEdit(false); incurredMovement.SetForceNoEdit(false); var newIncurred = currentIND + currentFEE - currentREC + paid + expenses - salvage + indOutstanding + cashLoss - refund - claimPortfolioIn + claimPortfolioOut; var incurredMovementValue = newIncurred - currentIncurred; var txtIncurredMovement = document.getElementById("<%=txtIncurredMovement.ClientID %>"); incurred.SetText(<%=this.ClientID%>_FormatAmount(newIncurred), true); incurredMovement.SetText(<%=this.ClientID%>_FormatAmount(incurredMovementValue), true); // Update footer column var currentIncurred = WebGrid_GetColumnAggregateValue("<%=this.grdTreatyClaims.ClientID%>", "<%=Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid.GRID_COL_CURRENT_INCURRED%>", null); WebGrid_SetFooterColumnValue("<%=this.grdTreatyClaims.ClientID%>", "<%=Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid.GRID_COL_CURRENT_INCURRED%>", <%=this.ClientID%>_FormatAmount(currentIncurred)); // Update footer column var totalIncurredMovement = Math.abs(WebGrid_GetColumnAggregateValue("<%=this.grdTreatyClaims.ClientID%>", "<%=Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid.GRID_COL_INCURRED_MOVEMENT%>", null)); WebGrid_SetFooterColumnValue("<%=this.grdTreatyClaims.ClientID%>", "<%=Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid.GRID_COL_INCURRED_MOVEMENT%>", <%=this.ClientID%>_FormatAmount(totalIncurredMovement)); txtIncurredMovement.value = totalIncurredMovement; // Disable Incurred and Movement field after updating value. incurred.SetForceNoEdit(true); incurredMovement.SetForceNoEdit(true); } catch (ex) { ShowJSException(ex); } } function GetTotalIncurredMovement() { return document.getElementById("<%=txtIncurredMovement.ClientID %>").value; } function <%=this.ClientID%>_UpdateClaimData(fieldName, value, forceUpdate) { try { // Update only if 1 claim exists // NOTE: Do not force update if not specified if (forceUpdate == undefined) { forceUpdate = false; } var grid = <%=this.ClientID%>_GetGridCtrl(); if (grid == null) { return false; } var rowCount = grid.RootTable.GetRowsCount(); if (rowCount > 1 && forceUpdate == false) { return false; } // Get 1st claim var row = grid.RootTable.GetRow(0); if (row == null) { return false; } // Get claim's specified field to update var fieldToUpdate = row.GetCells().GetNamedItem(fieldName); if (fieldToUpdate == null) { return false; } // Update field <%=this.ClientID%>_UpdateField(row, fieldToUpdate, value); } catch (ex) { ShowJSException(ex); } } function <%=this.ClientID%>_UpdateField(row, field, value, updateField) { try { var grid = <%=this.ClientID%>_GetGridCtrl(); if (grid == null) { return false; } if (field == null) { return false; } if (updateField == undefined) { updateField = true; } // Update field data // NOTE: Force field update if not specified if (updateField == true) { if (field.ForceNoEdit == true) { field.SetForceNoEdit(false); } switch(field.Name) { // INDOutstanding // NOTE: Check/Uncheck based on if a value exists case "<%=Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid.GRID_COL_INDOUTSTANDING%>": if (row != null) { <%=this.ClientID%>_UpdateIncludeOutstandingField(row, value); } break; } field.SetText(<%=this.ClientID%>_FormatAmount(value), true); // Update row to force row changes if (row != null) { row.Update();} } // Update footer data UpdateGridFooterColumn(grid.Id, field.Name); // Update Incurred data if (row != null) { CalculateIncurred(row); } } catch (ex) { ShowJSException(ex); } } function <%=this.ClientID%>_UpdateIncludeOutstandingField(row, outstanding) { try { // Get/Update include indemnity outstanding field for update if (row == null) { return; } var includeINDOutstanding = row.GetCells().GetNamedItem("<%=Endurance.Re.FWB.Web.FWBWebControls.Treaty.TreatyClaimsGrid.GRID_COL_INCLUDEINDOUTSTANDING%>"); if (includeINDOutstanding == null) { return; } WebGrid_SetCheckboxValue(includeINDOutstanding, (IsNullOrEmpty(outstanding) == false)); } catch (ex) { ShowJSException(ex); } } function DeleteSelectedClaimRow() { try { // Delete Claim WebGrid_DeleteSelectedRow("<%=this.grdTreatyClaims.ClientID%>"); } catch (ex) { ShowJSException(ex); } } // Function to add formatting (eg "," etc) to supplied number value function <%=this.ClientID%>_FormatAmount(number) { try { var num = new NumberFormat(); num.setInputDecimal("."); num.setPlaces("2"); num.setNegativeFormat(num.LEFT_DASH); num.setCommas(true); var result = number; num.setNumber(result); result = num.toFormatted(); return result; } catch (ex) { ShowJSException(ex); } } // --> </script> <table style="table-layout:fixed;width:100%;height:100%"> <tr> <td> <div class="ContentTemplateGridContent"> <div id="divTreatyClaims" style="width:100%;height:100%;position:absolute;margin:0px; padding: 0px; background-color: #dcdcdc; filter: alpha(opacity=50); -moz-opacity: 0.5; -khtml-opacity: 0.5; opacity: 0.5"> </div> <asp:TextBox runat="server" ID="txtIncurredMovement" CssClass="HideControl" /> <CommonCtrl:EnduranceWebGrid runat="server" ID="grdTreatyClaims" DefaultStyleMode="Elegant" Height="100%" Width="100%" UseDefaultStyle="True" EnableViewState="false" ViewStateStorage="None" OnInitializeDataSource="grdTreatyClaims_OnInitializeDataSource" OnInitializeLayout="grdTreatyClaims_OnInitializeLayout" OnInitializePostBack="grdTreatyClaims_OnInitializePostBack" OnPrepareDataBinding="grdTreatyClaims_OnPrepareDataBinding" OnExport="grdTreatyClaims_OnExport" OnBatchUpdate="grdTreatyClaims_OnBatchUpdate" OnInitializeRow="grdTreatyClaims_OnInitializeRow"> <LayoutSettings AllowBatchUpdate="true" BatchUpdateSettings-PromptUnsavedChanges="false" AllowAddNew="No" AllowEdit="Yes" EditOnClick="True" AutoHeight="false" RowHeightDefault="22px" AutoWidth="false" AllowColumnFreezing="Yes" AllowExport="Yes" AllowFilter="No" AllowSelectColumns="Yes" AllowSorting="No" AlwaysShowHelpButton="False" ApplyFiltersKey="Enter" CellPaddingDefault="0" FilterBarVisible="True" HideColumnsWhenGrouped="Default" InProgressUIBehavior="ChangeCursorToHourGlass" NewRowLostFocusAction="AlwaysPrompt" PagingExportMode="ExportAllData" PagingMode="VirtualLoad" ResetNewRowValuesOnError="False" ShowFilterStatus="True" VerboseEditingInformation="False" VirtualPageSize="200"> <ClientSideEvents OnInitialize="grdTreatyClaims_OnInitialize" OnRowContextMenu="grdTreatyClaims_OnRowContextMenu" OnCheckBoxClick="grdTreatyClaims_OnCheckBoxClick" OnExitEditMode="grdTreatyClaims_OnExitEditMode" OnAfterExitEditMode="grdTreatyClaims_OnAfterExitEditMode" /> <FrameStyle> <BorderSettings> <Top Style="none" /> <Bottom Style="none" /> <Left Color="#6593cf" Style="solid" Width="1" /> <Right Color="#6593cf" Style="solid" Width="1" /> </BorderSettings> </FrameStyle> <HeaderStyle CssClass="WebGridHeaderStyle" /> <StatusBarStyle CssClass="WebGridStatusBarStyle" /> <StatusBarCommandStyle Active-CssClass="WebGridStatusBarCommandStyleActive" Normal-CssClass="WebGridStatusBarCommandStyleNormal" Over-CssClass="WebGridStatusBarCommandStyleOver"> <Normal CssClass="WebGridStatusBarCommandStyleNormal" /> <Over CssClass="WebGridStatusBarCommandStyleOver" /> <Active CssClass="WebGridStatusBarCommandStyleActive" /> </StatusBarCommandStyle> <FilterRowStyle CssClass="WebGridFilterRowStyle" /> <PreviewRowStyle CssClass="WebGridRowStyle" /> <RowStyle CssClass="WebGridRowStyle" /> <QuickFilterBarStyle CssClass="WebGridRowStyle" /> <RowHeaderStyle CssClass="WebGridRowHeaderStyle" /> <SelectedRowStyle CssClass="WebGridSelectedRowStyle" /> <EditFocusCellStyle CssClass="WebGridRowStyle" /> <FocusCellStyle CssClass="WebGridRowStyle" /> <LostFocusRowStyle CssClass="WebGridRowStyle" /> <NewRowStyle CssClass="WebGridRowStyle" /> <SortedColumnStyle CssClass="WebGridSortedColumnStyle" /> <AlternatingRowStyle CssClass="WebGridAlternatingRowStyle" /> <EditTextboxStyle CssClass="WebGridEditTextboxStyle" /> <FreezePaneSettings AbsoluteScrolling="True" ActiveFrozenColumns="1" MaxFrozenColumns="1" ShowInContextMenu="False" ShowSplitterLine="False" SplitterLineColor="ActiveBorder" SplitterLineWidth="1" /> </LayoutSettings> <RootTable Caption="Claims Transaction" DataKeyField="UniqueID" ColumnFooters="Yes"> <Columns> <ISWebGrid:WebGridColumn Caption="Claim Number" Name="ClaimMasterReference" DataMember="ClaimMasterReference" DataType="System.String" EditType="NoEdit" FilterEditType="TextBox" Width="150px" FooterText="Total"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Description" Name="ClaimTitle" DataMember="ClaimTitle" DataType="System.String" EditType="NoEdit" FilterEditType="TextBox" Width="275px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="CAT (Internal)" Name="ClaimLevel1CATCode" DataMember="ClaimLevel1CATCode" DataType="System.String" EditType="NoEdit" FilterEditType="TextBox" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Cat (Market)" Name="ClaimLevel3CATCode" DataMember="ClaimLevel3CATCode" DataType="System.String" EditType="NoEdit" FilterEditType="TextBox" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Paid" Name="Paid" DataMember="Paid" DataFormatString="#,##0.00" DataType="System.Decimal" EditType="TextBox" FilterEditType="TextBox" Width="80px" AggregateFunction="Sum"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Expenses" Name="Expenses" DataMember="Expenses" DataFormatString="#,##0.00" DataType="System.Decimal" EditType="TextBox" FilterEditType="TextBox" Width="80px" AggregateFunction="Sum"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Salvage" Name="Salvage" DataMember="Salvage" DataFormatString="#,##0.00" DataType="System.Decimal" EditType="TextBox" FilterEditType="TextBox" Width="80px" AggregateFunction="Sum"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Cash Loss" Name="CashLoss" DataMember="CashLoss" DataFormatString="#,##0.00" DataType="System.Decimal" EditType="TextBox" FilterEditType="TextBox" Width="80px" AggregateFunction="Sum"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Refund" Name="Refund" DataMember="Refund" DataFormatString="#,##0.00" DataType="System.Decimal" EditType="TextBox" FilterEditType="TextBox" Width="80px" AggregateFunction="Sum"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Current O/S" Name="CurrentINDOutstanding" DataMember="CurrentINDOutstanding" DataFormatString="#,##0.00" DataType="System.Decimal" EditType="NoEdit" FilterEditType="TextBox" Width="80px" AggregateFunction="Sum"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption=" " Name="IncludeINDOutstanding" DataMember="IncludeINDOutstanding" ColumnType="CheckBox" EditType="Checkbox" FilterEditType="NoEdit" Width="25px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="O/S" Name="INDOutstanding" DataMember="INDOutstanding" DataFormatString="#,##0.00" DataType="System.Decimal" EditType="TextBox" FilterEditType="TextBox" Width="80px" AggregateFunction="Sum"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Port In" Name="ClaimPortfolioIn" DataMember="ClaimPortfolioIn" DataFormatString="#,##0.00" DataType="System.Decimal" EditType="TextBox" FilterEditType="TextBox" Width="80px" AggregateFunction="Sum"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Port Out" Name="ClaimPortfolioOut" DataMember="ClaimPortfolioOut" DataFormatString="#,##0.00" DataType="System.Decimal" EditType="TextBox" FilterEditType="TextBox" Width="80px" AggregateFunction="Sum"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Current IND" Name="CurrentIND" DataMember="CurrentIND" DataFormatString="#,##0.00" DataType="System.Decimal" EditType="NoEdit" FilterEditType="NoEdit" AggregateFunction="Sum"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Current FEE" Name="CurrentFEE" DataMember="CurrentFEE" DataFormatString="#,##0.00" DataType="System.Decimal" EditType="NoEdit" FilterEditType="NoEdit" Visible="true" AggregateFunction="Sum" /> <ISWebGrid:WebGridColumn Caption="Current REC" Name="CurrentREC" DataMember="CurrentREC" DataFormatString="#,##0.00" DataType="System.Decimal" EditType="NoEdit" FilterEditType="NoEdit" AggregateFunction="Sum"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Current Incurred" Name="CurrentIncurred" DataMember="CurrentIncurred" DataFormatString="#,##0.00" DataType="System.Decimal" EditType="NoEdit" FilterEditType="NoEdit" AggregateFunction="Sum"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Incurred" Name="Incurred" DataMember="" DataFormatString="#,##0.00" DataType="System.Decimal" EditType="TextBox" FilterEditType="NoEdit" AggregateFunction="Sum"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Movement" Name="IncurredMovement" DataMember="" DataFormatString="#,##0.00" DataType="System.Decimal" EditType="TextBox" FilterEditType="NoEdit" AggregateFunction="Sum"> </ISWebGrid:WebGridColumn> </Columns> </RootTable> </CommonCtrl:EnduranceWebGrid> </div> </td> </tr> </table>
Based on my discussion with the developer, the rowErrors issue has also been fixed.
Using a simple test page in my environment using the latest WebGrid build, invoking PerformBatchUpdate(false, true) will not cause any error and the UI is updated sucessfully.
Have you tried the suggested solution in the thread you mention?
The workaround is invoking a refresh client side method after calling the PerformBatchUpdate. Here is the snippet:
protected void Button1_Click(object sender, EventArgs e){ WebGrid1.PerformBatchUpdate(true, false); Page.ClientScript.RegisterStartupScript(this.GetType(), "RefreshGrid", "<script>RefreshGrid()</script>");}
Refresh client side method:
function RefreshGrid() { var grid = ISGetObject("WebGrid1"); grid.Refresh();}
Have you tried the suggested solution in the thread you mention? The workaround is invoking a refresh client side method after calling the PerformBatchUpdate. Here is the snippet:protected void Button1_Click(object sender, EventArgs e){ WebGrid1.PerformBatchUpdate(true, false); Page.ClientScript.RegisterStartupScript(this.GetType(), "RefreshGrid", "<script>RefreshGrid()</script>");}Refresh client side method:function RefreshGrid() { var grid = ISGetObject("WebGrid1"); grid.Refresh();}
I'd like to avoid doing a double postback to fix this bug. Also, we have pages with multiple WebGrids.
I'd like to address the bug instead of trying another work-around.
Thanks.
Do you mind providing a simple runable sample? Using an ASP button to invoke the PerformBatchUpdate in the batch update provided sample I could not replicate the issue. I could discuss the issue further with our developer if the issue is replicable in our environment.
It will take some time given the complexity of our software. Can you talk to the developer on what the exception might be? That might shed some light given it's a specific error message.
Sorry about the late reply.
Based on my discussion with the developer, the issue has been fixed in the latest build. Have you tried updating you WebGrid and WebUI Framework control to the latest build, build 405 and build 756 respectively, by installing the WebUI 2010 R1 SP1?
Sorry about the late reply. Based on my discussion with the developer, the issue has been fixed in the latest build. Have you tried updating you WebGrid and WebUI Framework control to the latest build, build 405 and build 756 respectively, by installing the WebUI 2010 R1 SP1?
Thanks! I will check it out.
Can you also check with the developer on the issue where the method does not update the UI properly? The previous work around was to call the JS's RefreshGrid method from the server-side which basically did another postback. This is not a valid workaround as we have pages with multiple grids and the performance would be terrible.
Please let me know. This is a very high priority bug for us.
The fix for the issue I refer to in my previous post is the UpdateUI parameter set to True in PerformBatchUpdate method. With the fix in the latest build, we could pass True in the UpdateUI parameter in PerformBatchUpdate method so the UI will be updated properly.
Did you find another issue when using the latest build?
The fix for the issue I refer to in my previous post is the UpdateUI parameter set to True in PerformBatchUpdate method. With the fix in the latest build, we could pass True in the UpdateUI parameter in PerformBatchUpdate method so the UI will be updated properly.Did you find another issue when using the latest build?
Please explain. My last post refers to two seperate issues regarding the PerformBatchUpdate method. The first is that exception which appears to be fixed (I need to test but we are going through a deployment cycle) The second is the UI not updating properly after the PerformBatchUpdate is called and the Intersoft workaround was to call the "WebGrid's Refresh" method which basically called a second postback. This won't work for us so I am trying to see if this bug is fixed as well.
Thanks!
The current definition for PerformBathUpdate method accepts 2 parameter, public bool PerformBatchUpdate(bool throwExceptionOnError, bool UpdateUI). The reported issue is passing True as UpdateUI paramater value will result in WebGrid error. Since the UpdateUI value is false, WebGrid will not update the UI after batch update execution so we need to call the refresh method manually in order to update the UI. With the fix, UpdateUI value could be set to true and the UI will be updated properly after batch update execution.
So, the latest build, build 405 and build 756 respectively which can be obtained by installing the WebUI 2010 R1 SP1 fixes both bugs:
1) The 'rowErrors' start tag on line 2 does not match the end tag of 'BatchUpdateResult'. Line 2, position 167.
2) Updates the Grid's UI without needed to call the WebGrid's JavaScript Refresh method
???
The PerformBacthUpdate method already have the option to update the WebGrid UI automatically by passing true in the second parameter of the method. However, since passing True causes JS error in the previous build; as a workaround, you will need to manually call refresh method for the WebGrid to update UI properly.
Since in the latest build this issue has been fix, passing true in the second parameter does not cause JS error, passing true in the PerformBacthUpdate method will update the WebGrid UI properly.
The PerformBacthUpdate method already have the option to update the WebGrid UI automatically by passing true in the second parameter of the method. However, since passing True causes JS error in the previous build; as a workaround, you will need to manually call refresh method for the WebGrid to update UI properly.Since in the latest build this issue has been fix, passing true in the second parameter does not cause JS error, passing true in the PerformBacthUpdate method will update the WebGrid UI properly.
Awesome. That confirms that #2 has been fixed.
Can you also confirm that this is fixed too: 1) The 'rowErrors' start tag on line 2 does not match the end tag of 'BatchUpdateResult'. Line 2, position 167.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname