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
ok i got very big issue on this.
i have this code server side:
protected void grdFlowDetails_DeleteRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e){if (e.Row.Type == RowType.Record){if (e.Row.Table.DataMember == "parent"){DataRow row = e.Row.GetDataRow();int intTemp = Convert.ToInt32(row["AppealFlowLineID"]);Flows.Instance.DeleteFlowDetails(intTemp);}}}
and the client side is this:
_openFormWindow: function (type) {var based = this;var url = "";var isRootTable = true;var selObj = based.gridObj.GetSelectedObject();if (selObj != null && selObj.Table != undefined) {isRootTable = selObj.Table.IsRootTable;}switch (type) {case based.Config.CommandIssueActionAdd:if (isRootTable) {UtillObject.SetDialogBox(based.dialogObj, based.Config.Lang.AddNewFlowDetailForm);based.dialogObj.SetContentURL(based.Config.UrlFlowDetailFormAdd);based.dialogObj.ShowDialog();}break;case based.Config.CommandIssueActionEdit:if (isRootTable) {UtillObject.SetDialogBox(based.dialogObj, based.Config.Lang.EditFlowDetailForm);if (selObj != null) {var row = selObj.GetRowObject();var cells = row.GetCells();var id = cells.GetNamedItem("AppealFlowLineID").Text;if (id == null) {alert(based.Config.Lang.FlowNotSelected);return false;}based.dialogObj.SetContentURL(UtillObject.StringFormat(based.Config.UrlFlowDetailFormEdit, id));based.dialogObj.ShowDialog();}else {alert(based.Config.Lang.FlowNotSelected);return false;}}break;case based.Config.CommandIssueActionDelete:if (selObj != null) {if (confirm(based.Config.Lang.AreYouSureDeleteItem)) {based.gridObj.GetSelectedObject().GetRowObject().Delete();}}else {alert(based.Config.Lang.FlowNotSelected);return false;}break;}}
and asp.net is this:
<ISWebGrid:WebGrid ID="grdFlowDetails" runat="server" Height="700px" UseDefaultStyle="True" DataMember="parent" OnAddRow="grdFlowDetails_AddRow" OnDeleteRow="grdFlowDetails_DeleteRow"OnInitializeDataSource="grdFlowDetails_InitializeDataSource" OnRowChanged="grdFlowDetails_RowChanged"OnUpdateRow="grdFlowDetails_UpdateRow"><LayoutSettings AllowAddNew="Yes" AllowDelete="Yes" AllowEdit="Yes" AllowSorting="Yes" EditOnClick="false"Hierarchical="true" CellClickAction="CellSelect" AllowContextMenu="true" AllowBatchUpdate="true"><ClientSideEvents OnCellSelect="grdFlowDetails_OnCellSelect" OnRowSelect="grdFlowDetails_OnRowSelect" OnRowContextMenu="grdFlowDetails_OnRowContextMenu" /></LayoutSettings><RootTable DataMember="parent"><ChildTables><ISWebGrid:WebGridTable DataMember="child" DataKeyField="FlowDetailID"><PreviewRowSettings DefaultExpanded="False" LoadOnDemand="True"></PreviewRowSettings><Columns><ISWebGrid:WebGridColumn Caption="קוד" DataMember="FlowDetailID" Visible="false"EditType="NoEdit" Name="FlowDetailID"></ISWebGrid:WebGridColumn><ISWebGrid:WebGridColumn Caption="שם נמען" DataMember="EmpID" DataType="System.Int32"Name="EmpID" Width="100px" EditType="DropdownList"></ISWebGrid:WebGridColumn><ISWebGrid:WebGridColumn Caption="תפקיד נמען" DataMember="EmployeePositionID" DataType="System.Int32"Name="EmployeePositionID" Width="100px" EditType="DropdownList"></ISWebGrid:WebGridColumn><ISWebGrid:WebGridColumn Caption="יחידה" DataMember="FactorID" DataType="System.Int32"Name="FactorID" Width="100px" EditType="DropdownList"></ISWebGrid:WebGridColumn><ISWebGrid:WebGridColumn Caption="פעולה \ ידיעה" DataMember="ForAction" DataType="System.Int32"Name="ForAction" Width="100px" EditType="DropdownList"></ISWebGrid:WebGridColumn></Columns></ISWebGrid:WebGridTable></ChildTables><Columns><ISWebGrid:WebGridColumn Caption="מספר" DataMember="AppealFlowLineID" DataType="System.Int32"EditType="NoEdit" Name="AppealFlowLineID" Width="100px"></ISWebGrid:WebGridColumn><ISWebGrid:WebGridColumn Caption="סוג אירוע" DataMember="FlowEventTypeId" DataType="System.Int32"Name="FlowEventTypeId" Width="100px" EditType="DropdownList"></ISWebGrid:WebGridColumn><ISWebGrid:WebGridColumn Caption="ימים לביצוע" DataMember="DaysToExec" DataType="System.Int32"Name="DaysToExec" Width="100px"></ISWebGrid:WebGridColumn><ISWebGrid:WebGridColumn Caption="סוג מכתב" DataMember="LetterTypeId" DataType="System.Int32"Name="LetterTypeId" Width="100px" EditType="DropdownList"></ISWebGrid:WebGridColumn><ISWebGrid:WebGridColumn Caption="אישור מנהל" DataMember="ManagerApproval" DataType="System.Boolean"Name="ManagerApproval" Width="100px" ColumnType="CheckBox" EditType="Checkbox"></ISWebGrid:WebGridColumn><ISWebGrid:WebGridColumn Caption="שיוך מכתב ללקוח" DataMember="OtherAddressee" DataType="System.Boolean"Name="OtherAddressee" Width="100px" ColumnType="CheckBox" EditType="Checkbox"></ISWebGrid:WebGridColumn><ISWebGrid:WebGridColumn Caption="עובד מטפל" DataMember="HandelingEmp" DataType="System.Int32"Name="HandelingEmp" Width="100px" EditType="DropdownList"></ISWebGrid:WebGridColumn><ISWebGrid:WebGridColumn Caption="ימים להתייחסות" DataMember="DaysToAction" DataType="System.Int32"Name="DaysToAction" Width="100px"></ISWebGrid:WebGridColumn><ISWebGrid:WebGridColumn Caption="שלב" DataMember="FlowStage" DataType="System.Int32"Name="FlowStage" Width="100px" EditType="DropdownList"></ISWebGrid:WebGridColumn><ISWebGrid:WebGridColumn Caption="דקות להתייחסות" DataMember="MinToAction" DataType="System.Int32"Name="MinToAction" Width="100px"></ISWebGrid:WebGridColumn><ISWebGrid:WebGridColumn Caption="דקות לביצוע" DataMember="MinToExec" DataType="System.Int32"Name="MinToExec" Width="100px"></ISWebGrid:WebGridColumn></Columns></RootTable></ISWebGrid:WebGrid>
now for the problem i got error when i try do delete
that say:
element' is null or not an object
wg17580.m7fc47(activeCell.element,false,true);
now please help here what do i do wrong its not even go to sql (the event yet to be fire)
i kinda clue less here.
Thanks to the helpers.
The code in the first post of this thread is not sufficient enough to reproduce the issue on my end. For example, there is a method, DeleteFlowDetails(intTemp), that seems to be used to delete row.
I enclosed one simple sample of hierarchical WebGrid as attachment. Could you please kindly modify the attached file sample so that it replicates the deletion issue? Please re-send the modified sample to us to be investigated further.
Ok what happend after rechecks
the event DeleteRow wont even fire with or without the js code.
Hello Sivan,
Unfortunately, we could not run your sample. We will need a runable sample to investigate your issue. So, would you mind to provide a runable sample that replicates this issue? Or please replicate the issue in Yudi's sample.Fyi, javascript error would ignore the next code/function include the event.
Regards,Handy
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