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
I have forwarded your comment to the developer. Such behavior will be discussed for implementation in the future revision of WebScheduler.
The current behavior is done because 12AM is already considered as the next calendar day. Such event will be considered as a switch day event and will be rendered in the all day event area section.
For scenario 2-4, the workaround would be utilizing the OnSelectRow to re-select the previously selected row, in addition to re-populate the new row (scenario 4).
In both scenario 2 and 3, during OnBeforeUpdate client side event handler you will need to buffer the row key value and using the buffered row key value in the OnRowSelect event handler you will need to reselect the previous row. Here is the snippet:
var selectLastRow = null;function WebGrid1_OnBeforeUpdate(controlId, tblName, rowObject){ var grid = ISGetObject(controlId); var retVal = false; //Line of code to determine return value if(!retVal) selectLastRow = rowObject.KeyValue; return retVal;}function WebGrid1_OnRowSelect(ctrlId){ var grid = ISGetObject(ctrlId); if (selectLastRow != null) { var rowKey = selectLastRow; selectLastRow = null; setTimeout(function() { grid.ClearSelection(); grid.RootTable.GetRowByKeyValue(rowKey).Select(); grid.RootTable.GetRowByKeyValue(rowKey).GetCell("CustomerID").ActivateEdit(); grid.RootTable.GetRowByKeyValue(rowKey).SetDataChanged(); grid.MarkEdit(); }, 15); }}
For scenario 4, it will be similar with the scenario 2 and 3 however, in this scenario you will be utilizing the OnBeforeAdd event handler:
var newRowTemp = null;function WebGrid1_OnBeforeAdd(controlId, tblName, rowObject){ var grid = ISGetObject(controlId); var retVal = false; //Determine the return value if(!retVal) newRowTemp = rowObject.GetCells(); return retVal;}function fillNewRow(newRowTempCells){ var grid = ISGetObject("WebGrid1"); setTimeout(function() { var newRowObj = grid.GetRowByElement(grid.RootTable.GetNewRow()); grid.ClearSelection(); newRowObj.Select(); newRowObj.BeginEdit(); var newRowCells = newRowObj.GetCells(); for (var i = 0; i < newRowCells.length; i++) { newRowCells[i].SetText(newRowTempCells[i].Text); newRowCells[i].SetValue(newRowTempCells[i].Value); if (i == 0) newRowCells[0].ActivateEdit(); } newRowObj.SetDataChanged(); grid.MarkEdit(); }, 15);}function WebGrid1_OnRowSelect(ctrlId){ var grid = ISGetObject(ctrlId); if (newRowTemp != null) { var rowKeyCells = newRowTemp; newRowTemp = null; fillNewRow(rowKeyCells); }}
For scenario 4, in order for the WebGrid to always trigger the OnBeforeAdd event handler you will need to use the NewRowLostFocusAction="AlwaysUpdate" attribute under WebGrid LayoutSettings
I do not have any objection for the workaround you suggested.
Since in your case, the WebCombo field must be filled, so the WebCombo.GetRows()[0].RowElement.cells[3].innerText function in the add scenario will always return the correct value.
Setting the event end time to 00.00 is known as swith day event in WebScheduler and it will be rendered in all day event section.
Regarding your scenario, you will need to modify the shipped editing form to accept HH:mm:ss format instead of the HH:mm format or you will need to create a custom editing form that will allow you to set the end time to 23:59:59.
We have provided some article regarding custom editing form in article "EditingForm" in WebScheduler documentation or in the blog.
In my test, using the property PersistRowChecker="true" and RestoreExpandedChildRows="true" under LayoutSettings in the WebGrid will achieve the result you wanted.
Attached is the simple test sample I used to simulate the scenario in my environment.
Currently our developer is focusing on WebUI Studio 2010 release. At the earliest a fix will be available by the end of May 2010.
Based on my discussion with the developer regarding this issue, the issue is caused by improper standard implementation in IE 7.
A workaround in IE 7 would be to set the height manually during OnAfterInitialize event based on the WebGrid number of rows. Here is the snippet:
function wgScroll_OnAfterInitialize(controlId){ var wgScroll = ISGetObject(controlId); if (IS.ie && IS.GetIEVersion() == 7) { var totalRows = parseInt(wgScroll.TotalRows); //70 is the status bar height //24 is the height of a single row content wgScroll.SetHeight((70 + (24 * totalRows))); } return true;}
For your second scenario, you will need to use WebCombo.NET set additional filter function, as described in "How-to: Filter the data in WebCombo using SetAdditionalFilter method" WebCombo documentation. In WebGrid, the function should be invoked during OnEnterEditMode client side event handler. Here is the snippet:
function wgTest_OnEnterEditMode(controlId, tblName, editObject){ var wgTest = ISGetObject(controlId); if (editObject.type == "WebComboNET") { editObject.element.SetAdditionalFilters("[Type] = '" + editObject.ToCellObject().Value + "'"); } return true;}
If you could like to add more than 1 custom attribute during InitializeRow server side event, just seperate the custome attribute with a single space. For example:
protected void WebGrid1_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e){ //GetHiddenMember function will retrieve phone number based on CustomerID e.Row.Cells.GetNamedItem("CustomerID").CustomAttributes = "Phone = '" + GetHiddenMember(e.Row.Cells.GetNamedItem("CustomerID").Value.ToString()) + "' PhoneType='LandLine'";}
If you would like to add custom attribute for new row, please use the OnAfterAdd client side event handler. You will need to retrieve the key value and add the custom attribute to the newly added WebGrid row. Here is the snippet:
function WebGrid1_OnAfterAdd(controlId, tblName, rowObject, xmlResponseObject){ var WebGrid1 = ISGetObject(controlId); var htmlRowXml = ISXml.GetNodeText(xmlResponseObject, "isnet.webui.webgrid/htmlRow"); var keyValue = document.createElement(htmlRowXml).keyValue; setNewAtributeCell(keyValue); return true;}function setNewAtributeCell(keyValue){ var WebGrid1 = ISGetObject("WebGrid1"); var rowNew = WebGrid1.RootTable.GetRowByKeyValue(keyValue); if (rowNew == null) { setTimeout(function() { setNewAtributeCell(keyValue) }, 15); } else { rowNew.GetCell("CustomerID").GetElement().setAttribute("Phone", "555-1234"); }}
In order to pass infromation from the client side to server side, you will need to use the AddInput function. This information will be hold in the Request object in the server side. Here is the snippet:
function WebGrid1_OnBeforeUpdate(controlId, tblName, rowObject) { var grid = ISGetObject(controlId); var rowObj = grid.GetSelectedObject().GetRowObject(); var cells = rowObj.GetCells(); var customer = cells.GetNamedItem("CustomerID"); var phone = customer.GetElement().attributes["Phone"].value; //Process phone variable grid.AddInput("PhoneJS", phone); return true;}
Attached is a simple sample of the scenario you are describing. I could not replicate the issue using the sample in my environment. The test is done using all the latest build of WebGrid and WebDesktop.
Feel free to modify the sample so the issue could be replicated.
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