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
Actually, we cannot use filter on dates because the users needs to know exactly how to type the date. I.E. if a user mistype a date in the filter, they will have an exception. See file attached,.
Can you fix this bug?
Hello,Perhaps you could modify the column’s “EditType” property to “CalendarDropdown” or “CalendarCombo”.So user can select the date from the Calendar, without having to know the date format.Here’s example snippet code how to set the EditType property:
<ISWebGrid:WebGridColumn Caption="Date Column" DataMember="" Name="date_column" Width="150px" EditType="CalendarDropdown" DataType="System.Datetime" DataFormatString="yyyy-MM-dd" EditInfoText="Select Date from Calendar"> </ISWebGrid:WebGridColumn>
Hope this helps.Regards,Hans K.
Hi Hans,
We tried CalendarCombo, but it still allows the user to enter a date manually and to possibly crash if the format is not valid.
We did not find CalendarDropdown in the options. Are you sure it is available?
Do you know if it is possible to use our own control and then bypass this error by managing it by ourselves ?
Regards,
Alex
You can try to use WebInput with pre-defined format and mask expression, for example:
<ISWebInput:WebInput ID="WebInput1" runat="server"> <HighLight IsEnabled="True" Type="Phrase" /> <CultureInfo CultureName="en-US"> </CultureInfo> <EditFormat Format="MM/dd/yyyy" IsEnabled="True"> <MaskInfo MaskExpression="00/00/0000"> </MaskInfo> <ErrorWindowInfo IsEnabled="True"> </ErrorWindowInfo> </EditFormat> </ISWebInput:WebInput>
And use it as WebGrid's FilterEditType.
<ISWebGrid:WebGrid ID="WebGrid1" runat="server" ..> <RootTable DataKeyField="OrderID"> <Columns> ... <ISWebGrid:WebGridColumn Caption="OrderDate" DataMember="OrderDate" DataType="System.DateTime" Name="OrderDate" EditType="Custom" CustomEditorName="WebInputNET" CustomEditorServerId="WebInput1" Width="100px" FilterEditType="SameAsEditType"> </ISWebGrid:WebGridColumn> ... </Columns> </RootTable> <LayoutSettings AllowEdit="Yes" AllowFilter="Yes" FilterBarVisible="True"> </LayoutSettings> </ISWebGrid:WebGrid>
WebGrid sample: IntegrationwithWebInput.NET.aspx uses WebInput as WebGrid's EditType. With a minor modification, set FilterEditType to SameAsEditType, we can have same experience on the filter bar.
WebGrid also has calendar editor that resembles Vista's calendar styles and behaviors. Fully integrated with WebCalendar API, you can take advantage many of the powerful calendar features, such as multiple months calendar, show week numbers, easy month and year navigation and much more.
<ISWebGrid:WebGrid ID="WebGrid1" runat="server" ...> <RootTable Caption="Assets" DataKeyField="AssetID" DataMember="Assets"> <Columns> ... <ISWebGrid:WebGridColumn Caption="Date Acquired" DataMember="DateAcquired" DataType="System.DateTime" Name="DateAcquired" Width="100px" CustomEditorName="VistaCalendar" CustomEditorProperties="IsReadOnly=true" DataFormatString="d" EditType="Custom" FilterEditType="SameAsEditType"> </ISWebGrid:WebGridColumn> ... </Columns> </RootTable> </ISWebGrid:WebGrid>
Using the above settings, will avoid user for mistakenly input incorrect date format (since IsReadOnly is enabled in CustomEditorProperties).
Another thing to try is to inform user about the desired date time format by utilizing the verbose information text in editing mode. This feature is useful to deliver intuitive editing experience for users as they can notice on important information related to a specific column in status bar area. It also allows you to assign information text and image for each WebGridColumn.
In order to use this feature, we need to enable VerboseEditingInformation property (WebGrid\LayoutSettings\VerboseEditingInformation) and assign EditInfoText and/or EditInfoImage on each WebGridColumn.
CustomEditor_VistaCalendar.aspx sample of WebGrid shows the usage of VistaCalendar custom editor and simple EditInfoText in one place.
Please have the samples evaluated on your end and let us know whether it helps or not.
Hi Yudi,
I tried using VistaCalendar, it works only if I leave AllowEdit to true; In my case, I must leave it at false.
When AllowEdit is false and I try to open the calendar, it crashes on a null exption in VistaCalendar.js trying to access this.Grid.CultureInfo which is null.
Here is my sample
function WebGrid1_OnBeforeDelete(controlId, tblName, rowObject){ return false; }
In OnRowContextMenu event:
function WebGrid1_OnRowContextMenu(controlId, rowType, rowElement, menuObject) { var WebGrid1 = ISGetObject(controlId); menuObject.Items.GetNamedItem("mnuSep2").Hide(); menuObject.Items.GetNamedItem("mnuDelete").Hide(); return true; }
These codes above to prevent user delete row from WebGrid.I attached the WebGrid sample regarding this work around. In this sample, I bind WebGrid to AccessDataSource (Northwind.mdb and Employees table).I apologize for the inconvenience.Regards,Hans K.
Thank you but I would like to know if you are going to resolve the issue about the grid not being able to manage an invalid date.
I think this should be addressed like a bug, the user must not see the error screen with all the stack.
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