﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebGrid Enterprise - Problem with filter not tolerent to error in format</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Problem-with-filter-not-tolerent-to-error-in-format/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Problem with filter not tolerent to error in format</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Problem-with-filter-not-tolerent-to-error-in-format/</link><pubDate>Wed, 25 Jun 2014 22:49:39 GMT</pubDate><dc:creator>Hans</dc:creator><description>Hello,&lt;br&gt;&lt;br&gt;Basically, WebGrid’s main purpose is data presenter. WebGrid doesn’t handle any input validation. You should create your own input validation code. &lt;br&gt;There are couple ways to validate or reduce input errors.&lt;br&gt;&lt;br&gt;The first option you could use “Edit Type” method or use “Integration with WebInput”, like Yudi said in his prior post.&lt;br&gt;&lt;br&gt;The second you could add validation code in WebGrid’s client side events.&lt;br&gt;For example, there is “OnEditKeyDown” client side event. This event will be invoked when keypress is detected during editing mode (edit control is in focus).&lt;br&gt;Or “OnKeyUp” client side event, this event will be invoked when keypress is detected during editing mode (edit control is in focus).&lt;br&gt;Or “OnExitEditMode”, this event will be invoked when edit mode is being ended.&lt;br&gt;&lt;br&gt;You could found more about ClientSideEvent in WebGrid’s documentation.&lt;br&gt;You could choose the client side event and add the validation code that suitable with your current scenario.&lt;br&gt;&lt;br&gt;Regards,&lt;br&gt;Hans K.</description></item><item><title>Problem with filter not tolerent to error in format</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Problem-with-filter-not-tolerent-to-error-in-format/</link><pubDate>Wed, 25 Jun 2014 14:30:24 GMT</pubDate><dc:creator>aliard@sigma-rh.com</dc:creator><description>&lt;p&gt;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.&lt;/p&gt;&lt;p&gt;I think this should be addressed like a bug, the user must not see the error screen with all the stack.&lt;/p&gt;</description></item><item><title>Problem with filter not tolerent to error in format</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Problem-with-filter-not-tolerent-to-error-in-format/</link><pubDate>Wed, 18 Jun 2014 02:58:22 GMT</pubDate><dc:creator>Hans</dc:creator><description>Hello,&lt;br&gt;&lt;br&gt;Thank you for the reply.&lt;br&gt;&lt;br&gt;Perhaps you could try to use the first option, use WebInput control, like in Yudi’s prior post.&lt;br&gt;&lt;br&gt;However, if you still want to use the VistaCalendar, I have a work around regarding this VistaCalendar issue.&lt;br&gt;&lt;br&gt;First, set the “AllowDelete” property to “Yes”. Then add a couple line of code in “OnBeforeDelete” &amp;amp; “OnRowContextMenu” client side event.&lt;br&gt;&lt;br&gt;In OnBeforeDelete event:&lt;pre&gt;function WebGrid1_OnBeforeDelete(controlId, tblName, rowObject){
    return false;
}&lt;/pre&gt;&lt;p&gt;In OnRowContextMenu event:&lt;br&gt;&lt;/p&gt;&lt;pre&gt;function WebGrid1_OnRowContextMenu(controlId, rowType, rowElement, menuObject)
{
    var WebGrid1 = ISGetObject(controlId);
    menuObject.Items.GetNamedItem("mnuSep2").Hide();
    menuObject.Items.GetNamedItem("mnuDelete").Hide();
    return true;
}&lt;/pre&gt;&lt;p&gt;These codes above to prevent user delete row from WebGrid.&lt;br&gt;&lt;br&gt;I attached the WebGrid sample regarding this work around. In this sample, I bind WebGrid to AccessDataSource (Northwind.mdb and Employees table).&lt;br&gt;&lt;br&gt;I apologize for the inconvenience.&lt;br&gt;&lt;br&gt;Regards,&lt;br&gt;Hans K.&lt;br&gt;&lt;/p&gt;</description></item><item><title>Problem with filter not tolerent to error in format</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Problem-with-filter-not-tolerent-to-error-in-format/</link><pubDate>Tue, 17 Jun 2014 16:17:26 GMT</pubDate><dc:creator>aliard@sigma-rh.com</dc:creator><description>&lt;p&gt;Here is my sample&lt;/p&gt;</description></item><item><title>Problem with filter not tolerent to error in format</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Problem-with-filter-not-tolerent-to-error-in-format/</link><pubDate>Tue, 17 Jun 2014 16:16:22 GMT</pubDate><dc:creator>aliard@sigma-rh.com</dc:creator><description>&lt;p&gt;Hi Yudi,&lt;/p&gt;&lt;p&gt;I tried using VistaCalendar, it works only if I leave AllowEdit to true; In my case, I must leave it at false.&amp;nbsp;&lt;/p&gt;&lt;p&gt;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.&lt;/p&gt;&lt;p&gt;Regards,&lt;/p&gt;&lt;p&gt;Alex&lt;/p&gt;</description></item><item><title>Problem with filter not tolerent to error in format</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Problem-with-filter-not-tolerent-to-error-in-format/</link><pubDate>Tue, 17 Jun 2014 05:58:11 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="color: #1f497d;"&gt;You can try to use WebInput with pre-defined format and mask expression, for example:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&amp;lt;ISWebInput:WebInput ID="WebInput1" runat="server"&amp;gt;    &amp;lt;HighLight IsEnabled="True" Type="Phrase" /&amp;gt;
    &amp;lt;CultureInfo CultureName="en-US"&amp;gt;
    &amp;lt;/CultureInfo&amp;gt;
    &amp;lt;EditFormat Format="MM/dd/yyyy" IsEnabled="True"&amp;gt;
        &amp;lt;MaskInfo MaskExpression="00/00/0000"&amp;gt;
        &amp;lt;/MaskInfo&amp;gt;
        &amp;lt;ErrorWindowInfo IsEnabled="True"&amp;gt;
        &amp;lt;/ErrorWindowInfo&amp;gt;
    &amp;lt;/EditFormat&amp;gt;
&amp;lt;/ISWebInput:WebInput&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;And use it as WebGrid's &lt;em&gt;FilterEditType&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&amp;lt;ISWebGrid:WebGrid ID="WebGrid1" runat="server" ..&amp;gt;
    &amp;lt;RootTable DataKeyField="OrderID"&amp;gt;
        &amp;lt;Columns&amp;gt;
            ...
            &amp;lt;ISWebGrid:WebGridColumn Caption="OrderDate" DataMember="OrderDate"
                DataType="System.DateTime" Name="OrderDate" EditType="Custom"
                CustomEditorName="WebInputNET" CustomEditorServerId="WebInput1"
                Width="100px" FilterEditType="SameAsEditType"&amp;gt;
            &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
            ...
        &amp;lt;/Columns&amp;gt;
    &amp;lt;/RootTable&amp;gt;
    &amp;lt;LayoutSettings AllowEdit="Yes" AllowFilter="Yes" FilterBarVisible="True"&amp;gt;
    &amp;lt;/LayoutSettings&amp;gt;
&amp;lt;/ISWebGrid:WebGrid&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;WebGrid sample: &lt;a href="http://live.intersoftpt.com/cs/WebGrid/IntegrationwithWebInput.NET.aspx?noframe=1" target="_blank"&gt;IntegrationwithWebInput.NET.aspx&lt;/a&gt; uses WebInput as WebGrid's EditType. With a minor modification, set &lt;strong&gt;FilterEditType&lt;/strong&gt; to &lt;strong&gt;SameAsEditType&lt;/strong&gt;, we can have same experience on the filter bar.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;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.&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&amp;lt;ISWebGrid:WebGrid ID="WebGrid1" runat="server" ...&amp;gt;
    &amp;lt;RootTable Caption="Assets" DataKeyField="AssetID" DataMember="Assets"&amp;gt;
        &amp;lt;Columns&amp;gt;
            ...
            &amp;lt;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"&amp;gt;
            &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
            ...
        &amp;lt;/Columns&amp;gt;
    &amp;lt;/RootTable&amp;gt;
&amp;lt;/ISWebGrid:WebGrid&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Using the above settings, will avoid user for mistakenly input incorrect date format (since &lt;strong&gt;IsReadOnly&lt;/strong&gt; is enabled in &lt;strong&gt;CustomEditorProperties&lt;/strong&gt;).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Another thing to try is to inform user about the desired date time format by utilizing the &lt;em&gt;verbose information text in editing mode&lt;/em&gt;. This feature is useful to deliver intuitive editing experience for users as they can notice on important information related to a specific column in &lt;em&gt;status bar&lt;/em&gt; area. It also allows you to assign information text and image for each WebGridColumn.&lt;/span&gt;&lt;/p&gt;
&lt;img src="http://www.intersoftpt.com/Community/Attachments/4034/VerboseEditingInformation.jpg" alt="VerboseEditingInformation Feature"&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;In order to use this feature, we need to enable &lt;strong&gt;VerboseEditingInformation&lt;/strong&gt; property (WebGrid\LayoutSettings\VerboseEditingInformation) and assign &lt;strong&gt;EditInfoText&lt;/strong&gt; and/or &lt;strong&gt;EditInfoImage&lt;/strong&gt; on each WebGridColumn.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;&lt;a href="http://live.intersofpt.com/cs/WebGrid/CustomEditor_VistaCalendar.aspx?noframe=1" target="_blank"&gt;CustomEditor_VistaCalendar.aspx&lt;/a&gt; sample of WebGrid shows the usage of VistaCalendar custom editor and simple EditInfoText in one place.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Please have the samples evaluated on your end and let us know whether it helps or not.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Problem with filter not tolerent to error in format</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Problem-with-filter-not-tolerent-to-error-in-format/</link><pubDate>Mon, 16 Jun 2014 13:18:57 GMT</pubDate><dc:creator>aliard@sigma-rh.com</dc:creator><description>&lt;p&gt;Hi Hans,&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;We tried CalendarCombo, but it still allows the user to enter a date manually and to possibly crash if the format is not valid.&lt;/p&gt;&lt;p&gt;We did not find CalendarDropdown in the options. Are you sure it is available?&lt;/p&gt;&lt;p&gt;Do you know if it is possible to use our own control and then bypass this error by managing it by ourselves ?&lt;/p&gt;&lt;p&gt;Regards,&lt;/p&gt;&lt;p&gt;Alex&lt;/p&gt;</description></item><item><title>Problem with filter not tolerent to error in format</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Problem-with-filter-not-tolerent-to-error-in-format/</link><pubDate>Mon, 16 Jun 2014 00:07:59 GMT</pubDate><dc:creator>Hans</dc:creator><description>&lt;p&gt;Hello,&lt;br&gt;&lt;br&gt;Perhaps you could modify the column’s “EditType” property to “CalendarDropdown” or “CalendarCombo”.&lt;br&gt;So user can select the date from the Calendar, without having to know the date format.&lt;br&gt;&lt;br&gt;Here’s example snippet code how to set the EditType property:&lt;br&gt;&lt;/p&gt;&lt;pre&gt;&amp;lt;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"&amp;gt;
&amp;lt;/ISWebGrid:WebGridColumn&amp;gt;&lt;/pre&gt;&lt;p&gt;Hope this helps.&lt;br&gt;&lt;br&gt;Regards,&lt;br&gt;Hans K.&lt;br&gt;&lt;/p&gt;</description></item><item><title>Problem with filter not tolerent to error in format</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Problem-with-filter-not-tolerent-to-error-in-format/</link><pubDate>Fri, 13 Jun 2014 09:33:10 GMT</pubDate><dc:creator>aliard@sigma-rh.com</dc:creator><description>&lt;p&gt;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,.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;Can you fix this bug?&lt;br&gt;&lt;/p&gt;</description></item></channel></rss>