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
And the Web Input like this:
<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="false"> </ErrorWindowInfo> </EditFormat> </ISWebInput:WebInput>
For some reason when I input a new value into the Web Grid Cell, the cell immediately reverts to its original value.
Please help. I am using Web Grid Version 7.
Aaron
I made a simple sample based on your description.
The WebGrid column is defined like this.
<ISWebGrid:WebGridColumn Caption="OrderDate" DataMember="OrderDate" DataType="System.DateTime" EditType="Custom" Name="OrderDate" CustomEditorName="WebInputNET" CustomEditorServerId="WebInput1" Width="100px" DataFormatString="MM/dd/yyyy"> </ISWebGrid:WebGridColumn>
And the WebInput look like following.
<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>
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 here).
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.
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.
Please try to use following workaround in order to overcome this problem: it always revert to today no matter what I enter.
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; }
The workaround uses OnBlur client-side event of WebInput and OnExitEditMode client-side event of WebGrid.
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.
Please let us know whether this helps or not.
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