Delete Rows On Client-Side

xiaoxiao2021-03-06  69

Delete Rows On Client-Side

In order to delete rows on the client in javascript you need to use the javascript function:. Igtbl_deleteRow (gridName, rowID) First, be sure to allow the deletion itself by setting the AllowDeleteDefault property in the DisplayLayout object or AllowDelete on the specific band.

............... ..

The Following Sample JavaScript Code Would Delete All Rows On The Client In a function.

Function delete () {

// Get the first row in the grid

Var rot = igtbl_getrowbyid ("UltraWebGrid1R_0");

// delete the first row in the grid

IGTBL_DELETEROW ("UltraWebGrid1", "UltraWeBGrid1R_0");

// Create a counter for the row id

VAR CNT = 0;

// Create a loop, if The Row Has a Next Sibling the We need to delete it

While (row.nextsibling! = NULL)

{

// increment the counter for the next rowid

CNT = 1;

// Get the Row Current Row Using The Name of The Grid and The Row Number from Our Counter So We Can Check It for a Sibling

Row = igtbl_getrowbyid ("UltrawebGrid1r _" CNT)

// Finally Delete That Row,

IGTBL_DELETEROW ("UltraWebGrid1", "UltraWebGrid1r _" CNT);

}

}

All The SELECTED AS WELL. For deletring selected rows, Use The Following Function: IGTBL_DELETSELROWS (GridName).

IGTBL_DELETESELROWS ("UltraWebGrid1");

MS-help: //infragistics_help/infragistics_web/infragistics.Webui.UltraweBGRID.V3/INFRAGITISTICS.WEBUI.ULTRAGRID.V3/Delete_rows_on_client-side.htm

Infragistics.Webui.Ultrawebgridfeedback on this topic ...

DELETING ROWS ON Client-Side

.................... ..

To delete a particular row use the deleterow function.

Function IgTBL_DELETEROW (GN, Rowid) - deletes a row. The rowid parameter is The id of the row you'd like to delete.

Function IGTBL_DELETSELROWS (GN) - Deletes All SELECTED ROWS.

For Example You CAN Delete All Selected Rows ON A Button Press:

Function onclick ()

{

IF (Confirm ('delete all sucsed rows?'))

{

IGTBL_DELETSELROWS ('UltraWebGrid1');

}

}

Ms-help: //infragistics_help/infragistics_web/infragistics.Webui.UltraweBGRID.V3/INFRAGISTICS.WEBUI.ULTRAWEBGRID.V3/DELETING_ROWS_ON_CLIENT-SIDE.HTM

转载请注明原文地址:https://www.9cbs.com/read-109438.html

New Post(0)