﻿<?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 - WebGrid/WebInput Integration Not Working</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGridWebInput-Integration-Not-Working/</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>WebGrid/WebInput Integration Not Working</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGridWebInput-Integration-Not-Working/</link><pubDate>Wed, 26 Mar 2014 20:44:22 GMT</pubDate><dc:creator>yudi</dc:creator><category>WebGrid</category><category>WebInput</category><description>&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;Please try to use following workaround in order to overcome this problem: it always revert to today no matter what I enter.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;var RowType = "";
var RowPosition = "";
function WebGrid2_OnExitEditMode(controlId, tblName, editObject)
{
    var WebGrid2 = ISGetObject(controlId);
    var cell = editObject.cellElement;
    var colName = WebGrid2.GetColumnByElement(cell).Name;
            
    if (colName == "OrderDate")
    {
        RowType = WebGrid2.GetSelectedObject().ToRowObject().Type;
        RowPosition = WebGrid2.GetSelectedObject().ToRowObject().Position;
    }
            
    return true;
}
function WebInput1_OnBlur()
{
    var WebInput1 = ISGetObject("WebInput1");
    var WebGrid2 = ISGetObject("WebGrid2");
            
    if (RowType == "NewRow")
    {
        var newRowElement = WebGrid2.RootTable.GetNewRow();
        var newRow = WebGrid2.RootTable.ToRowObject(newRowElement);
        var orderDateCell = newRow.GetCell("OrderDate");
                
        orderDateCell.SetText(WebInput1._AfterUpdatedValue, true);
    }
    else if (RowType == "Record")
    {
        var currRow = WebGrid2.RootTable.GetRow(RowPosition);
        currRow.GetCells().GetNamedItem("OrderDate").SetText(WebInput1._AfterUpdatedValue, true);
    }
            
    return true;
}&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;The workaround uses OnBlur client-side event of WebInput and OnExitEditMode client-side event of WebGrid.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;The bottom line of this workaround is to re-set the cell’s text and value (of WebGrid) with the correct value when editing process completed.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;Please let us know whether this helps or not.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>WebGrid/WebInput Integration Not Working</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGridWebInput-Integration-Not-Working/</link><pubDate>Tue, 25 Mar 2014 13:32:34 GMT</pubDate><dc:creator>ayashinsky@gmail.com</dc:creator><category>WebGrid</category><category>WebInput</category><description>&lt;p&gt;I have set up my code the way you described, but when I enter a date it always reverts to today no matter what I enter.&lt;/p&gt;</description></item><item><title>WebGrid/WebInput Integration Not Working</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGridWebInput-Integration-Not-Working/</link><pubDate>Tue, 25 Mar 2014 00:42:48 GMT</pubDate><dc:creator>yudi</dc:creator><category>WebGrid</category><category>WebInput</category><description>&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;I made a simple sample based on your description.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;The WebGrid column is defined like this.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&amp;lt;ISWebGrid:WebGridColumn Caption="OrderDate" DataMember="OrderDate"
    DataType="System.DateTime" EditType="Custom" Name="OrderDate"
    CustomEditorName="WebInputNET" CustomEditorServerId="WebInput1"
    Width="100px" DataFormatString="MM/dd/yyyy"&amp;gt;
&amp;lt;/ISWebGrid:WebGridColumn&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;And the WebInput look like following.&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: rgb(31, 73, 125);"&gt;By using this configuration, OrderDate column will have value and text of a date with no time. The same thing happen when user input a new value into the WebGrid cell (as can be seen on the video uploaded in &lt;a href="https://onedrive.live.com/download?resid=A29317908CEA783A%21371"&gt;here&lt;/a&gt;).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;For your information, I’m using WebGrid 8 assembly to test the reported problem. Please feel free to let us know if you have different result on WebGrid 7.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>WebGrid/WebInput Integration Not Working</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGridWebInput-Integration-Not-Working/</link><pubDate>Mon, 24 Mar 2014 19:21:31 GMT</pubDate><dc:creator>ayashinsky@gmail.com</dc:creator><category>WebGrid</category><category>WebInput</category><description>I have an editable WebGrid. I want cells in a certain column to always be have the value and text of a Date with no time. To do this I defined the column like this:
&lt;div&gt;&lt;div&gt;&lt;span style="background-color: rgb(255, 252, 225); font-family: 'courier new', tahoma; font-size: 9pt;"&gt;&amp;lt;ISWebGrid:WebGridColumn Caption="Start Date" CustomEditorName="WebInputNET" CustomEditorServerId="WebInput1" &lt;/span&gt;&lt;span style="background-color: rgb(255, 252, 225); font-family: 'courier new', tahoma; font-size: 9pt;"&gt;DataMember="StartDate" DataType="System.DateTime" EditType="Custom" FilterEditType="TextBox" Name="StartDate" &lt;/span&gt;&lt;span style="background-color: rgb(255, 252, 225); font-family: 'courier new', tahoma; font-size: 9pt;"&gt;Width="100px" GroupRowInfoFormat="[caption]: [value] ([count])" GroupInterval="Text" DataFormatString="MM/dd/yyyy"&amp;gt;&lt;/span&gt;&lt;span style="background-color: rgb(255, 252, 225); font-family: 'courier new', tahoma; font-size: 9pt;"&gt;&amp;lt;/ISWebGrid:WebGridColumn&amp;gt;  &lt;/span&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;And the Web Input like this:&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="false"&amp;gt;
                    &amp;lt;/ErrorWindowInfo&amp;gt;
                &amp;lt;/EditFormat&amp;gt;
            &amp;lt;/ISWebInput:WebInput&amp;gt;&lt;/pre&gt;&lt;p&gt;For some reason when I input a new value into the Web Grid Cell, the cell immediately reverts to its original value.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Please help. I am using Web Grid Version 7.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Aaron&lt;/p&gt;&lt;/div&gt;</description></item></channel></rss>