Aktualisieren Sie die Schriftarteinstellungen von der Clientseite
Contents
[
Hide
]
In diesem Thema wird das Ändern von Schriftarteinstellungen von der Clientseite im Aspose.Cells.GridWeb-Steuerelement erläutert.
Aspose.Cells GridWeb unterstützt jetzt das Ändern von Schriftarteinstellungen von der Clientseite. Dafür stellt die API folgende Funktionen zur Verfügung
- updateCellFontStyle: Params - r/i/b/ib für normal/kursiv/fett/kursiv&&fett
- updateCellFontSize: Params - Schriftartname usw. ‘System’
- updateCellFontName: Params - Schriftgröße usw. ‘12pt’
- updateCellFontColor: Params - none/u/l/ul/ für none/underline/strikout/underline&&strikout
- updateCellFontLine: Params - HTML-Farbe wie #aa22ee oder bekannte Farbnamen wie grün, rot, …
- updateCellBackGroundColor: Params - HTML-Farbe wie #aa22ee oder bekannte Farbnamen wie grün, rot, …
Das folgende Code-Snippet 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> |