Some ClientSideEvents are not fired

10 replies. Last post: September 9, 2009 12:23 PM by Michael Giger
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback

Hi

Please have a look on follow Code sequence.

ClientSideEvent grd_OnBeforeDelete, grd_OnBeforeAdd and grd_OnAfterDelete are not fired!

ClientSideEvent grd_OnBeforeRowSelect, grd_OnCellDblClick works fine!

Why?

AllowAddNew and AllowDelete are set to Yes on ServerSideEvent grd_InitializeLayout.

<%@ Page Title="" Language="C#" MasterPageFile="~/Relays/Masterdata/MasterData.master" AutoEventWireup="true" CodeBehind="Errorlist.aspx.cs" Inherits="QS_Client.Relays.Masterdata.Errorlist" %>
<%@ Register assembly="ISNet.WebUI.WebDesktop" namespace="ISNet.WebUI.WebDesktop" tagprefix="ISWebDesktop" %>
<%@ Register assembly="ISNet.WebUI.WebGrid" namespace="ISNet.WebUI.WebGrid" tagprefix="ISWebGrid" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script language="javascript" type="text/javascript" id="grd_OnBeforeDelete">
		<!--
		function grd_OnBeforeDelete(controlId, tblName, rowObject)
		{
		    var grd = ISGetObject(controlId);
		    alert("grd_OnBeforeDelete");

			return true;			
		}
		-->
</script>

    <script language="javascript" type="text/javascript" id="grd_OnBeforeRowSelect">
		<!--
		function grd_OnBeforeRowSelect(controlId, tblName, lastSelectedObject)
		{
		    var grd = ISGetObject(controlId);
		    alert("grd_OnBeforeRowSelect");
			
			return true;
		}
		-->
</script>

    <script language="javascript" type="text/javascript" id="grd_OnBeforeAdd">
		<!--
		function grd_OnBeforeAdd(controlId, tblName, rowObject)
		{
		    var grd = ISGetObject(controlId);
		    alert("grd_OnBeforeAdd");
			
			return true;
		}
		-->
</script>

    <script language="javascript" type="text/javascript" id="grd_OnAfterDelete">
		<!--
		function grd_OnAfterDelete(controlId, tblName, rowObject, xmlResponseObject)
		{
		    var grd = ISGetObject(controlId);
		    alert("grd_OnAfterDelete");
			
			return true;
		}
		-->
</script>

    <script language="javascript" type="text/javascript" id="grd_OnCellDblClick">
		<!--
		function grd_OnCellDblClick(controlId, tblName, rowIndex, cellIndex, cellEl)
		{
			var grd = ISGetObject(controlId);
			alert("grd_OnCellDblClick");
			return true;
		}
		-->
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphMasterdata" runat="server">
    <ISWebGrid:WebGrid ID="grd" runat="server" Height="250px" 
        oninitializelayout="grd_InitializeLayout" UseDefaultStyle="True" Width="500px" 
        oninitializedatasource="grd_InitializeDataSource" 
        oninitializerow="grd_InitializeRow" 
        onpreparedatabinding="grd_PrepareDataBinding" 
        onbatchupdate="grd_BatchUpdate">
        <LayoutSettings>
            <ClientSideEvents OnBeforeDelete="grd_OnBeforeDelete" 
                OnBeforeRowSelect="grd_OnBeforeRowSelect" OnBeforeAdd="grd_OnBeforeAdd" 
                OnAfterDelete="grd_OnAfterDelete" OnCellDblClick="grd_OnCellDblClick" />
        </LayoutSettings>
    </ISWebGrid:WebGrid>
</asp:Content>
All times are GMT -5. The time now is 5:42 PM.
Previous Next