public interface CellEventHandler
extends java.io.Serializable
Example
class SortEventHandler implements CellEventHandler,Serializable{
public void handleCellEvent(Object sender, CellEventArgs e) {
//System.out.println("handleCellEvent ....");
GridWebBean gridweb=(GridWebBean)sender;
GridWorksheet sheet = gridweb.getWorkSheets().get(0);
GridWorksheet sheet1 = gridweb.getWorkSheets().get(1);
if (e.getArgument().toString().equals("A1")) {
sheet.getCells().sort(1, 0, 20, 4, 0, true,true,false);
} else if (e.getArgument().toString().equals("B1")) {
sheet.getCells().sort(1, 0, 20, 4, 1, true,true,false);
} else if (e.getArgument().toString().equals("C1")) {
sheet.getCells().sort(1, 0, 20, 4, 2, true,true,false);
} else if (e.getArgument().toString().equals("D1")) {
sheet.getCells().sort(1, 0, 20, 4, 3, true,true,false);
} else if (e.getArgument().toString().equals("1A1")) {
sheet1.getCells().sort(0, 1, 4, 7, 0, true,true,true);
} else if (e.getArgument().toString().equals("1A2")) {
sheet1.getCells().sort(0, 1, 4, 7, 1, true,true,true);
} else if (e.getArgument().toString().equals("1A3")) {
sheet1.getCells().sort(0, 1, 4, 7, 2, true,true,true);
} else if (e.getArgument().toString().equals("1A4")) {
sheet1.getCells().sort(0, 1, 4, 7, 3, true,true,true);
}
}
}
GridWebBean gridweb=ExtPage.getInstance().getBean();
gridweb.CellCommand = new SortEventHandler();
| Modifier and Type | Method and Description |
|---|---|
void |
handleCellEvent(java.lang.Object sender,
CellEventArgs e)
handle the related Cell Event.
|
void handleCellEvent(java.lang.Object sender,
CellEventArgs e)
sender - The source grid of the event. If the event if fired by a child grid's cell in hierarchical displaying mode, the sender parameter represents the child grid object.e - The event argument. The e.Cell is the cell who fires the event. The e.Argument contains the argument of the event.See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.
We guarantee a prompt response to any inquiry!
© Aspose Pty Ltd 2003-2025. All Rights Reserved.