Aktualisieren Sie die Schriftarteinstellungen von der Clientseite

Contents
[ ]

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

// 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>