Aktualisieren von Schriftarteinstellungen von der Clientseite
Contents
[
Hide
]
In diesem Thema wird die Änderung von Schriftarteinstellungen von der Clientseite im Aspose.Cells.GridWeb-Control diskutiert.
Aspose.Cells GridWeb unterstützt jetzt das Ändern von Schriftarteinstellungen von der Clientseite. Dafür bietet die API folgende Funktionen:
- updateCellFontStyle: Parameter - r/i/b/ib für normal/kursiv/fett/kursiv&&fett
- updateCellFontSize: Parameter - schriftnamen, usw. ‘System’
- updateCellFontName: Parameter - schriftgröße, usw. ‘12pt’
- updateCellFontColor: Parameter - none/u/l/ul/ für none/Unterstrichen/durchgestrichen/unterstrichen&&durchgestrichen
- updateCellFontLine: Parameter - HTML-Farbe wie #aa22ee oder bekannte Farbnamen wie grün, rot,…
- updateCellBackGroundColor: Parameter - HTML-Farbe wie #aa22ee oder bekannte Farbnamen wie grün, rot,…
Der folgende Code-Demonstrationsausschnitt zeigt das Ändern von Schriftarteinstellungen von der Clientseite in GridWeb.
Beispielcode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
<script> | |
function makeFontItalic(){ | |
gridwebinstance.getByIndex(0).rangeupdate(updateCellFontStyle, "i"); | |
} | |
function makeFontBold(){ | |
gridwebinstance.getByIndex(0).rangeupdate(updateCellFontStyle, "b"); | |
} | |
function changeFontSize(){ | |
gridwebinstance.getByIndex(0).rangeupdate(updateCellFontSize, "5pt"); | |
} | |
function changeFontFamily(){ | |
gridwebinstance.getByIndex(0).rangeupdate(updateCellFontName, "Corbel Light"); | |
} | |
function changeFontColor(){ | |
gridwebinstance.getByIndex(0).rangeupdate(updateCellFontColor, "green"); | |
} | |
function changeFontBackgroundColor(){ | |
gridwebinstance.getByIndex(0).rangeupdate(updateCellBackGroundColor, "yellow"); | |
} | |
</script> |