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
Where should the WebGrid's Culture should be set? In the following thread (http://www.intersoftpt.com/Community/WebGrid/Problem-with-Culture-and-Text-Settings/), the logic to set the WebGrid's culture is set within the page's PreRender event. This doesn't work for me. However, if I set the culture within the WebGrid's OnInitializeLayout event, it seems to work but has some issues.
For example, the en-GB format works properly only if I use the following format: "DD-MM-YYYY" such as 01-10-11 which is displayed as 01-Oct-2011 where as the following format ("DD/MM/YYYY" such as 01/10/11 displays incorrect as 10-Jan-2011. Why?
/// <summary> /// Handles the Treaty Claim's DataGrid control's OnInitializeLayout event /// </summary> /// <param name="sender">Sender</param> /// <param name="e">Event arguments</param> protected void grdTreatyClaims_OnInitializeLayout(object sender, ISNet.WebUI.WebGrid.LayoutEventArgs e) { // Set the user's culture this.SetUserCulture(); } /// <summary> /// Set the user's culture /// </summary> private void SetUserCulture() { Common.Utility.TraceLogger.Instance.Write("SetUserCulture [START]"); if (this.Security != null && this.Security.UserProfile != null) { // Get/Set culture's format //this.Security.UserProfile.Culture CultureInfo culture = new CultureInfo("en-GB"); this.grdTreatyClaims.LayoutSettings.Culture = culture; this.grdTreatyClaims.LayoutSettings.TextSettings.UseLanguage = culture.ToString(); } Common.Utility.TraceLogger.Instance.Write("SetUserCulture [END]"); }
Markup
<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" NewRowLostFocusAction="AlwaysUpdate" AllowAddNew="Yes" AllowEdit="Yes" AllowDelete="Yes" EditOnClick="True" AutoHeight="false" RowHeightDefault="22px" AutoWidth="false" AllowColumnFreezing="Yes" AllowExport="No" AllowFilter="No" AllowSelectColumns="Yes" AllowSorting="No" AlwaysShowHelpButton="False" ApplyFiltersKey="Enter" CellPaddingDefault="0" FilterBarVisible="True" HideColumnsWhenGrouped="Default" InProgressUIBehavior="ChangeCursorToHourGlass" 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" OnRowValidate="grdTreatyClaims_OnRowValidate" /> <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="3" MaxFrozenColumns="3" ShowInContextMenu="False" ShowSplitterLine="False" SplitterLineColor="ActiveBorder" SplitterLineWidth="1" /> </LayoutSettings> <RootTable Caption="Claims Transaction" DataKeyField="UniqueID" ColumnFooters="Yes"> <Columns> <ISWebGrid:WebGridColumn Caption="UniqueID" Name="UniqueID" DataType="System.Integer" ColumnType="Text" EditType="NoEdit" NewRowEditType="NoEdit" FilterEditType="NoEdit" Width="0px" Visible="false"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="ClaimMasterStatusCode2" Name="ClaimMasterStatusCode2" DataMember="ClaimMasterStatusCode2" DataType="System.String" ColumnType="Text" EditType="NoEdit" NewRowEditType="NoEdit" FilterEditType="NoEdit" Width="0px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="InceptionDate" Name="InceptionDate" DataMember="InceptionDate" DataFormatString="dd-MMM-yyyy" DataType="System.String" ColumnType="Text" EditType="NoEdit" NewRowEditType="NoEdit" FilterEditType="NoEdit" Width="0px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Claim Number" Name="ClaimMasterReference" DataMember="ClaimMasterReference" DataType="System.String" EditType="NoEdit" FilterEditType="TextBox" Width="100px" FooterText="Total"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Description" Name="ClaimTitle" DataMember="ClaimTitle" DataType="System.String" EditType="TextBox" FilterEditType="TextBox" Width="150px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Date Qual" Name="DateOfLossQualifier" DataMember="DateOfLossQualifier" DataType="System.Integer" ColumnType="Custom" EditType="DropdownList" NewRowEditType="DropdownList" FilterEditType="DropdownList" Width="75px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Date of Loss" Name="ClaimDateOfLossFrom" DataMember="ClaimDateOfLossFrom" DataFormatString="dd-MMM-yyyy" DataType="System.String" ColumnType="Text" EditType="CalendarCombo" NewRowEditType="CalendarCombo" FilterEditType="CalendarCombo" Width="75px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Reported Date" Name="ClaimAdvisedDate" DataMember="ClaimAdvisedDate" DataFormatString="dd-MMM-yyyy" DataType="System.String" ColumnType="Text" EditType="CalendarCombo" NewRowEditType="CalendarCombo" FilterEditType="CalendarCombo" Width="90px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Event Date" Name="DateOfEvent" DataMember="DateOfEvent" DataFormatString="dd-MMM-yyyy" DataType="System.String" ColumnType="Text" EditType="CalendarCombo" NewRowEditType="CalendarCombo" FilterEditType="CalendarCombo" Width="90px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Level 1 Cat" Name="ClaimLevel1CATCode" DataMember="ClaimLevel1CATCode" DataType="System.String" ColumnType="Custom" EditType="DropdownList" NewRowEditType="DropdownList" FilterEditType="DropdownList" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Level 3 Cat" Name="ClaimLevel3CATCode" DataMember="ClaimLevel3CATCode" DataType="System.String" ColumnType="Custom" EditType="DropdownList" NewRowEditType="DropdownList" FilterEditType="DropdownList" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Cause of Loss" Name="LossAnalysis1Code" DataMember="LossAnalysis1Code" DataType="System.String" ColumnType="Custom" EditType="DropdownList" NewRowEditType="DropdownList" FilterEditType="DropdownList" Width="120px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Paid" Name="Paid" DataMember="Paid" DataFormatString="#,##0.00" DataType="System.Decimal" DefaultValue="0" EditType="TextBox" FilterEditType="TextBox" Width="80px" AggregateFunction="Sum"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Expenses" Name="Expenses" DataMember="Expenses" DataFormatString="#,##0.00" DataType="System.Decimal" DefaultValue="0" EditType="TextBox" FilterEditType="TextBox" Width="80px" AggregateFunction="Sum"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Salvage" Name="Salvage" DataMember="Salvage" DataFormatString="#,##0.00" DataType="System.Decimal" DefaultValue="0" 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" DefaultValue="0" EditType="TextBox" FilterEditType="TextBox" Width="80px" AggregateFunction="Sum"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Refund" Name="Refund" DataMember="Refund" DataFormatString="#,##0.00" DataType="System.Decimal" DefaultValue="0" EditType="TextBox" FilterEditType="TextBox" Width="80px" AggregateFunction="Sum"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Port In" Name="ClaimPortfolioIn" DataMember="ClaimPortfolioIn" DataFormatString="#,##0.00" DefaultValue="0" 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" DefaultValue="0" DataType="System.Decimal" EditType="TextBox" FilterEditType="TextBox" Width="80px" AggregateFunction="Sum"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Current Ind O/S" Name="CurrentINDOutstanding" DataMember="CurrentINDOutstanding" DataFormatString="#,##0.00" DataType="System.Decimal" DefaultValue="0" EditType="NoEdit" FilterEditType="TextBox" Width="90px" AggregateFunction="Sum"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption=" " Name="IncludeINDOutstanding" DataMember="IncludeINDOutstanding" ColumnType="CheckBox" EditType="Checkbox" FilterEditType="NoEdit" Width="25px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="New Ind O/S" Name="INDOutstanding" DataMember="INDOutstanding" DataFormatString="#,##0.00" DataType="System.Decimal" DefaultValue="0" EditType="TextBox" FilterEditType="TextBox" Width="90px" AggregateFunction="Sum"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Current Fee O/S" Name="CurrentFEEOutstanding" DataMember="CurrentFEEOutstanding" DataFormatString="#,##0.00" DataType="System.Decimal" DefaultValue="0" EditType="NoEdit" FilterEditType="TextBox" Width="90px" AggregateFunction="Sum"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption=" " Name="IncludeFEEOutstanding" DataMember="IncludeFEEOutstanding" ColumnType="CheckBox" EditType="Checkbox" FilterEditType="NoEdit" Width="25px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="New Fee O/S" Name="FEEOutstanding" DataMember="FEEOutstanding" DataFormatString="#,##0.00" DataType="System.Decimal" DefaultValue="0" EditType="TextBox" FilterEditType="TextBox" Width="90px" AggregateFunction="Sum"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Current ACR O/S" Name="CurrentACROutstanding" DataMember="CurrentACROutstanding" DataFormatString="#,##0.00" DataType="System.Decimal" DefaultValue="0" EditType="NoEdit" FilterEditType="TextBox" Width="90px" AggregateFunction="Sum"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption=" " Name="IncludeACROutstanding" DataMember="IncludeACROutstanding" ColumnType="CheckBox" EditType="Checkbox" FilterEditType="NoEdit" Width="25px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="New ACR O/S" Name="ACROutstanding" DataMember="ACROutstanding" DataFormatString="#,##0.00" DataType="System.Decimal" DefaultValue="0" EditType="TextBox" FilterEditType="TextBox" Width="90px" AggregateFunction="Sum"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Current ACE O/S" Name="CurrentACEOutstanding" DataMember="CurrentACEOutstanding" DataFormatString="#,##0.00" DataType="System.Decimal" DefaultValue="0" EditType="NoEdit" FilterEditType="TextBox" Width="90px" AggregateFunction="Sum"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption=" " Name="IncludeACEOutstanding" DataMember="IncludeACEOutstanding" ColumnType="CheckBox" EditType="Checkbox" FilterEditType="NoEdit" Width="25px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="New ACE O/S" Name="ACEOutstanding" DataMember="ACEOutstanding" DataFormatString="#,##0.00" DataType="System.Decimal" DefaultValue="0" EditType="TextBox" FilterEditType="TextBox" Width="90px" AggregateFunction="Sum"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Current IND" Name="CurrentIND" DataMember="CurrentIND" DefaultValue="0" DataFormatString="#,##0.00" DataType="System.Decimal" EditType="NoEdit" FilterEditType="NoEdit" AggregateFunction="Sum" Visible="false"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Current FEE" Name="CurrentFEE" DataMember="CurrentFEE" DefaultValue="0" DataFormatString="#,##0.00" DataType="System.Decimal" EditType="NoEdit" FilterEditType="NoEdit" AggregateFunction="Sum" Visible="false"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Current REC" Name="CurrentREC" DataMember="CurrentREC" DefaultValue="0" DataFormatString="#,##0.00" DataType="System.Decimal" EditType="NoEdit" FilterEditType="NoEdit" AggregateFunction="Sum" Visible="false"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Current Incurred" Name="CurrentIncurred" DataMember="CurrentIncurred" DefaultValue="0" DataFormatString="#,##0.00" DataType="System.Decimal" EditType="NoEdit" FilterEditType="NoEdit" AggregateFunction="Sum" Visible="false"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Incurred" Name="Incurred" DataMember="" DefaultValue="0" DataFormatString="#,##0.00" DataType="System.Decimal" EditType="TextBox" FilterEditType="NoEdit" AggregateFunction="Sum" Visible="false"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Movement" Name="IncurredMovement" DataMember="" DefaultValue="0" DataFormatString="#,##0.00" DataType="System.Decimal" EditType="TextBox" FilterEditType="NoEdit" AggregateFunction="Sum" Visible="false"> </ISWebGrid:WebGridColumn> </Columns> </RootTable> </CommonCtrl:EnduranceWebGrid>
Hello Shawn,
You can set the culture in IntializeLayout or in PageLoad event. Please see the attached sample.In my test, I am using WebGrid 7 build 416 and WebUIFramework build 767. However, I could not replicate the issue. So, would you mind to send us a simple runable sample that replicates the issue?
Regards,Handy
Hello Shawn,You can set the culture in IntializeLayout or in PageLoad event. Please see the attached sample.In my test, I am using WebGrid 7 build 416 and WebUIFramework build 767. However, I could not replicate the issue. So, would you mind to send us a simple runable sample that replicates the issue?Regards,Handy
I have attached a screen shot showing 3 DateFields with an alert box showing the field's value which is 1/5/2011, 1-5-2011, and 1.5.2011 respectfully. You will notice the first field is not rendered properly (05-Jan-2011) but the others are 01-May-2011. I have also enclosed both the client and server-side code.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UKCultureBug.aspx.cs" Inherits="UKCultureBug" %> <%@ Register TagPrefix="iswebgrid" Namespace="ISNet.WebUI.WebGrid" Assembly="ISNet.WebUI.WebGrid" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <HTML> <HEAD runat=server> <title>UKCultureBug</title> <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1"> <meta name="CODE_LANGUAGE" Content="C#"> <meta name="vs_defaultClientScript" content="JavaScript"> <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"> <script type="text/javascript"> function DoRowSelect(controlId, tblName, rowIndex, rowEl) { var grid = ISGetObject(controlId); var table = grid.Tables[tblName]; var currentRow = table.ToRowObject(rowEl); // convert from element to WebGridRow object. var cells = currentRow.GetCells(); var field1 = cells.GetNamedItem("ClaimDateOfLossFrom"); var field2 = cells.GetNamedItem("ClaimAdvisedDate"); var field3 = cells.GetNamedItem("DateOfEvent"); window.alert(field1.Value + " - " + field2.Value + " - " + field3.Value); } </script> </HEAD> <body MS_POSITIONING="GridLayout"> <form id="Form1" method="post" runat="server"> <iswebgrid:webgrid id=WebGrid1 runat="server" DefaultStyleMode="Elegant" Height="100%" Width="100%" UseDefaultStyle="True" EnableViewState="false" ViewStateStorage="None" OnInitializeDataSource="WebGrid1_OnInitializeDataSource" OnInitializeLayout="WebGrid1_OnInitializeLayout" > <LayoutSettings AllowBatchUpdate="true" BatchUpdateSettings-PromptUnsavedChanges="false" NewRowLostFocusAction="AlwaysUpdate" AllowAddNew="Yes" AllowEdit="Yes" AllowDelete="Yes" EditOnClick="True" AutoHeight="false" RowHeightDefault="22px" AutoWidth="false" AllowColumnFreezing="Yes" AllowExport="No" AllowFilter="No" AllowSelectColumns="Yes" AllowSorting="No" AlwaysShowHelpButton="False" ApplyFiltersKey="Enter" CellPaddingDefault="0" FilterBarVisible="True" HideColumnsWhenGrouped="Default" InProgressUIBehavior="ChangeCursorToHourGlass" PagingExportMode="ExportAllData" PagingMode="VirtualLoad" ResetNewRowValuesOnError="False" ShowFilterStatus="True" VerboseEditingInformation="False" VirtualPageSize="200"> <ClientSideEvents OnRowSelect="DoRowSelect" /> <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="3" MaxFrozenColumns="3" ShowInContextMenu="False" ShowSplitterLine="False" SplitterLineColor="ActiveBorder" SplitterLineWidth="1" /> </LayoutSettings> <RootTable Caption="Claims Transaction" DataKeyField="UniqueID" ColumnFooters="Yes"> <Columns> <ISWebGrid:WebGridColumn Caption="UniqueID" Name="UniqueID" DataType="System.Integer" ColumnType="Text" EditType="NoEdit" NewRowEditType="NoEdit" FilterEditType="NoEdit" Width="0px" Visible="false"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Date of Loss" Name="ClaimDateOfLossFrom" DataMember="ClaimDateOfLossFrom" DataFormatString="dd-MMM-yyyy" DataType="System.String" ColumnType="Text" EditType="CalendarCombo" NewRowEditType="CalendarCombo" FilterEditType="CalendarCombo" Width="75px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Reported Date" Name="ClaimAdvisedDate" DataMember="ClaimAdvisedDate" DataFormatString="dd-MMM-yyyy" DataType="System.String" ColumnType="Text" EditType="CalendarCombo" NewRowEditType="CalendarCombo" FilterEditType="CalendarCombo" Width="90px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Event Date" Name="DateOfEvent" DataMember="DateOfEvent" DataFormatString="dd-MMM-yyyy" DataType="System.String" ColumnType="Text" EditType="CalendarCombo" NewRowEditType="CalendarCombo" FilterEditType="CalendarCombo" Width="90px"> </ISWebGrid:WebGridColumn> </Columns> </RootTable> </iswebgrid:webgrid> </form> </body> </HTML> using System; using System.Data; using System.Configuration; using System.Collections; using System.Collections.Generic; using System.Globalization; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using ISNet.WebUI.WebGrid; public partial class UKCultureBug : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void WebGrid1_OnInitializeLayout(object sender, ISNet.WebUI.WebGrid.LayoutEventArgs e) { // Set the user's culture this.SetUserCulture(); } protected void WebGrid1_OnInitializeDataSource(object sender, ISNet.WebUI.WebGrid.DataSourceEventArgs e) { List<MyClass> data = new List<MyClass>(); data.Add(new MyClass()); data.Add(new MyClass()); data.Add(new MyClass()); e.DataSource = data; } private void SetUserCulture() { // Get/Set culture's format CultureInfo culture = new CultureInfo("en-GB"); this.WebGrid1.LayoutSettings.Culture = culture; this.WebGrid1.LayoutSettings.TextSettings.Language = LanguageMode.UseCulture; this.WebGrid1.LayoutSettings.TextSettings.UseLanguage = culture.ToString(); } /// <summary> /// Perform batch update on the Inurings WebGrid control's source /// </summary> /// <param name="source">Source to update</param> /// <returns>Updated source after batch update</returns> public void PerformInuringsGridBatchUpdate(object sender, EventArgs e) { // Get changes List<WebGridRowChanges> rowChanges = this.WebGrid1.GetChanges(); // Perform change updates foreach (WebGridRowChanges rowChangesItem in rowChanges) { if (rowChangesItem.KeyValue != null) { switch (rowChangesItem.RowState) { // Add case RowState.Added: break; // Update case RowState.Modified: break; // Delete case RowState.Deleted: break; } } } } private class MyClass { #region Variables private string _uniqueID = Guid.NewGuid().ToString(); private DateTime? _claimDateOfLossFrom = null; private DateTime? _claimAdvisedDate = null; private DateTime? _dateOfEvent = null; #endregion Variables #region Properties public string UniqueID { get { return this._uniqueID; } set { this._uniqueID = value; } } /// <summary> /// Claims Date Of Loss From /// </summary> public DateTime? ClaimDateOfLossFrom { get { return this._claimDateOfLossFrom; } set { this._claimDateOfLossFrom = value; } } /// <summary> /// Claim Advised Date /// </summary> public DateTime? ClaimAdvisedDate { get { return this._claimAdvisedDate; } set { this._claimAdvisedDate = value; } } /// <summary> /// Date Of Event /// </summary> public DateTime? DateOfEvent { get { return this._dateOfEvent; } set { this._dateOfEvent = value; } } #endregion Properties #region Constructors /// <summary> /// GeniusClaimAmountMaster constructor /// </summary> public MyClass() { this._claimDateOfLossFrom = DateTime.Now; this._claimAdvisedDate = DateTime.Now; this._dateOfEvent = DateTime.Now; } #endregion Constructors } }
using System; using System.Data; using System.Configuration; using System.Collections; using System.Collections.Generic; using System.Globalization; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using ISNet.WebUI.WebGrid; public partial class UKCultureBug : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void WebGrid1_OnInitializeLayout(object sender, ISNet.WebUI.WebGrid.LayoutEventArgs e) { // Set the user's culture this.SetUserCulture(); } protected void WebGrid1_OnInitializeDataSource(object sender, ISNet.WebUI.WebGrid.DataSourceEventArgs e) { List<MyClass> data = new List<MyClass>(); data.Add(new MyClass()); data.Add(new MyClass()); data.Add(new MyClass()); e.DataSource = data; } private void SetUserCulture() { // Get/Set culture's format CultureInfo culture = new CultureInfo("en-GB"); this.WebGrid1.LayoutSettings.Culture = culture; this.WebGrid1.LayoutSettings.TextSettings.Language = LanguageMode.UseCulture; this.WebGrid1.LayoutSettings.TextSettings.UseLanguage = culture.ToString(); } /// <summary> /// Perform batch update on the Inurings WebGrid control's source /// </summary> /// <param name="source">Source to update</param> /// <returns>Updated source after batch update</returns> public void PerformInuringsGridBatchUpdate(object sender, EventArgs e) { // Get changes List<WebGridRowChanges> rowChanges = this.WebGrid1.GetChanges(); // Perform change updates foreach (WebGridRowChanges rowChangesItem in rowChanges) { if (rowChangesItem.KeyValue != null) { switch (rowChangesItem.RowState) { // Add case RowState.Added: break; // Update case RowState.Modified: break; // Delete case RowState.Deleted: break; } } } } private class MyClass { #region Variables private string _uniqueID = Guid.NewGuid().ToString(); private DateTime? _claimDateOfLossFrom = null; private DateTime? _claimAdvisedDate = null; private DateTime? _dateOfEvent = null; #endregion Variables #region Properties public string UniqueID { get { return this._uniqueID; } set { this._uniqueID = value; } } /// <summary> /// Claims Date Of Loss From /// </summary> public DateTime? ClaimDateOfLossFrom { get { return this._claimDateOfLossFrom; } set { this._claimDateOfLossFrom = value; } } /// <summary> /// Claim Advised Date /// </summary> public DateTime? ClaimAdvisedDate { get { return this._claimAdvisedDate; } set { this._claimAdvisedDate = value; } } /// <summary> /// Date Of Event /// </summary> public DateTime? DateOfEvent { get { return this._dateOfEvent; } set { this._dateOfEvent = value; } } #endregion Properties #region Constructors /// <summary> /// GeniusClaimAmountMaster constructor /// </summary> public MyClass() { this._claimDateOfLossFrom = DateTime.Now; this._claimAdvisedDate = DateTime.Now; this._dateOfEvent = DateTime.Now; } #endregion Constructors } }
Hello,
Please read my previous post. Please ensure that you use the latest hotfixes. You can see in my attachment video. All the fields show alert in format dd-MMM-yyyy. There are nothing wrong with the sample when I ran it unless I am missing something.
Hello,Please read my previous post. Please ensure that you use the latest hotfixes. You can see in my attachment video. All the fields show alert in format dd-MMM-yyyy. There are nothing wrong with the sample when I ran it unless I am missing something. Regards,Handy
It must be an issue with the 406 release. Where can I get the hotfix? I checked Support page and the UpdateManager and just the 406 comes across. Also, do the 416 release's release notes note that this was a fixed bug?
You can obtain the latest hotfixes by installing WebUIStudio2010R2. Unfortunately, the release note did not have this information. You reported the issue after we release the product which in the latest, the issue could not be replicated. So, we could not note this.
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