Aktualisieren von Schriftarteinstellungen von der Clientseite

Contents
[ ]

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

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