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
Hi Guillermo Montes,
Yes, that would be a new event on R2, apologize for that. You can use the OnAfterInitialize client event instead. Here is the workaround:
function WebGrid1_OnAfterInitialize(controlId) { var grid = ISGetObject("WebGrid1"); grid.ExportTypeList = new Array("PDF", "EXCEL", "XML"); grid.ExportWndAttr = "height= 500, width= 700, scrollbars= yes, status= yes, toolbar= no, menubar= yes, location= no, resizable= yes"; return true; }
I hope it helps and please, do not hesitate to ask if you have any other questions. Thank you.
Best Regards,
Andi Santoso
Hi Nicola,
Please try this workaround for your issue.
Protected Sub WebGrid1_PrepareExportExecute(ByVal sender As Object, ByVal e As ISNet.WebUI.WebGrid.PrepareExportExecuteEventArgs) Handles WebGrid1.PrepareExportExecute Dim report As New DataDynamics.ActiveReports.ActiveReport3() report = e.GetType().GetProperty("ReportObject").GetValue(e, Nothing) report.Document.Printer.PrinterName = "" End Sub
I hope it helps and please let me know if it works on your issue.
Sorry, but I can not reproduct your issue. From what I see, the error is not occur on the coding. It seems that something wrong with the printer of yours. Have you tried to turn off your printer? Or, if it is still not working, here is a workaround, please do following steps:
1. Open a WebGrid Serverside event called PrepareExportExecute.
2. Set the printer name to an empty string.
private void WebGrid1_PrepareExportExecute (object sender,ISNet.WebUI.WebGrid.PrepareExportExecuteEventArgs e) { e.ReportObject.Document.Printer.PrinterName = ""; }
I hope it helps and could you please to let me know if it is working. Thank you.
Best Regards,Andi Santoso
Yes, there is a way to hide the specific export context menu. We need to use client side event OnExportContextMenu. Here is the sample code to hide the Excel menu.
function WebGrid1_OnExportContextMenu(controlId, table, menu, location) { var WebGrid1 = ISGetObject(controlId); menu.Items[6].Hide(); return true; }
I hope it helps and please, do not hesitate to ask if you have any other questions, Thank you.
Best Regards,Andi Santoso.
Hi James,
Glad to hear that it works nicely, please do not hesitate to ask if you have any other questions. Thank you.
Hi Madhavan G,
Sorry for the late response. Here are the sample code that I have, of two HTML button to move next and previous of row within a group.function NextButton() { var grid = ISGetObject("WebGrid1"); var rootTable = grid.GetRootTable(); var selObj = grid.GetSelectedObject(); var selObjIndex = selObj.rowIndex; if (selObj != null) { var rowObj = selObj.GetRowObject(); if (rowObj.Type == "GroupHeader") { if (rowObj.GroupExpanded == false) rowObj.ExpandGroupRow() rowObj.GetGroupChildRows()[0].Select(); } else if (rowObj.Type == "Record") { var rowElemList = grid.RootTable.GetElement(WG40.BODY, WG40.HTMLTABLE); var nextRowElem = rowElemList.getElementsByTagName("tr")[selObjIndex + 1]; var nextRow = grid.GetRowByElement(nextRowElem); if (nextRow != null) { if (nextRow.Type == "Record") { nextRow.Select(); } else { if (nextRow.GroupExpanded == false) nextRow.ExpandGroupRow(); nextRow.GetGroupChildRows()[0].Select(); } } } } } This is the previous button:function Button1_onclick() { var grid = ISGetObject("WebGrid1"); var rootTable = grid.GetRootTable(); var selObj = grid.GetSelectedObject(); var selObjIndex = selObj.rowIndex; if (selObj != null) { var rowObj = selObj.GetRowObject(); if (rowObj.Type == "GroupHeader") { if (rowObj.GroupExpanded == false) rowObj.ExpandGroupRow() rowObj.GetGroupChildRows()[0].Select(); } else if (rowObj.Type == "Record") { var rowElemList = grid.RootTable.GetElement(WG40.BODY, WG40.HTMLTABLE); var prevRowElem = rowElemList.getElementsByTagName("tr")[selObjIndex - 1]; var prevRow = grid.GetRowByElement(prevRowElem); if (prevRow != null) { if (prevRow.Type == "Record") { prevRow.Select(); } else { if (prevRow.GroupExpanded == true) prevRow.CollapseGroupRow(); } } } } } I hope it helps and please, do not hesitate to ask if you have any other questions, thank you. Best regards,Andi Santoso.
function NextButton() { var grid = ISGetObject("WebGrid1"); var rootTable = grid.GetRootTable(); var selObj = grid.GetSelectedObject(); var selObjIndex = selObj.rowIndex; if (selObj != null) { var rowObj = selObj.GetRowObject(); if (rowObj.Type == "GroupHeader") { if (rowObj.GroupExpanded == false) rowObj.ExpandGroupRow() rowObj.GetGroupChildRows()[0].Select(); } else if (rowObj.Type == "Record") { var rowElemList = grid.RootTable.GetElement(WG40.BODY, WG40.HTMLTABLE); var nextRowElem = rowElemList.getElementsByTagName("tr")[selObjIndex + 1]; var nextRow = grid.GetRowByElement(nextRowElem); if (nextRow != null) { if (nextRow.Type == "Record") { nextRow.Select(); } else { if (nextRow.GroupExpanded == false) nextRow.ExpandGroupRow(); nextRow.GetGroupChildRows()[0].Select(); } } } } }
This is the previous button:
function Button1_onclick() { var grid = ISGetObject("WebGrid1"); var rootTable = grid.GetRootTable(); var selObj = grid.GetSelectedObject(); var selObjIndex = selObj.rowIndex; if (selObj != null) { var rowObj = selObj.GetRowObject(); if (rowObj.Type == "GroupHeader") { if (rowObj.GroupExpanded == false) rowObj.ExpandGroupRow() rowObj.GetGroupChildRows()[0].Select(); } else if (rowObj.Type == "Record") { var rowElemList = grid.RootTable.GetElement(WG40.BODY, WG40.HTMLTABLE); var prevRowElem = rowElemList.getElementsByTagName("tr")[selObjIndex - 1]; var prevRow = grid.GetRowByElement(prevRowElem); if (prevRow != null) { if (prevRow.Type == "Record") { prevRow.Select(); } else { if (prevRow.GroupExpanded == true) prevRow.CollapseGroupRow(); } } } } }
I hope it helps and please, do not hesitate to ask if you have any other questions, thank you.
Best regards,Andi Santoso.
I have created another CssClass to be used by the WebCombo. Here are the sample code of CssClass:
.borderClass { border-color:#286A9B; border-bottom-style:solid; border-bottom-width:1px; border-left-style:solid; border-left-width:1px; border-right-style:solid; border-right-width:1px; border-top-style:solid; border-top-width:1px; margin-left:3px; margin-bottom:3px; margin-right:3px; margin-top:3px; }
And here is the HTML code for the WebCombo:
<ISWebCombo:WebCombo ID="WebCombo1" runat="server" UseDefaultStyle="true" > <LayoutSettings AllowFloatingText="false" > <framestyle> <Normal CssClass="borderClass"> </Normal> <Over CssClass="borderClass"> </Over> <Active CssClass="borderClass"> </Active> </framestyle> </LayoutSettings> </ISWebCombo:WebCombo>
Hi Nicolas,
I have tried again and everything seems to work fine in here. May I know what browser are you using? and have you tried to download the newest version of your browser? Thank you.
From what I see on your code, you are using percentage on your WebGridColumn which is not supported on IE. So we do not recommend for our customer to use percentage in our WebGrid, for further information you can check this thread, http://www.intersoftpt.com/Community/WebGrid/Column-Width-as-Percentage/.
Anyway, here are the sample code that I made using pixel on html and it works fine on here. You can, as well, see the result from the attached file.
<ISWebGrid:WebGridColumn Caption="CompanyName" DataMember="CompanyName" Name="CompanyName" Width="100px"> <HeaderStyle Height="100px" CustomRules="writing-mode:tb-rl;" />
Andi Santoso.
Hi Jocelyn,
In order to set the cell's background color and bold the value, you need to use an OnAfterResponseProcess event. Here are the sample code:
function WebGrid1_OnAfterResponseProcess(controlId, actionName, lastRequestObject, xmlResponseObject) { var WebGrid1 = ISGetObject(controlId); WebGrid1.GetActiveEditCell().element.style.backgroundColor = "RED"; WebGrid1.GetActiveEditCell().element.style.fontWeight = "BOLD"; return true; }
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