Aggiorna le impostazioni dei caratteri dal lato client
Contents
[
Hide
]
In questo argomento viene illustrata la modifica delle impostazioni dei caratteri dal lato client nel controllo Aspose.Cells.GridWeb.
Aspose.Cells GridWeb ora supporta la modifica delle impostazioni dei caratteri dal lato client. Per questo, il API fornisce le seguenti funzioni
- updateCellFontStyle: Params - r/i/b/ib per regolare/corsivo/grassetto/corsivo&&grassetto
- updateCellFontSize: Params - nome carattere, ecc. ‘Sistema’
- updateCellFontName: Params - dimensione carattere, ecc. ‘12pt’
- updateCellFontColor: Params - nessuno/u/l/ul/ per nessuno/sottolineato/barrato/sottolineato&&cancellato
- updateCellFontLine: Params - colore html come #aa22ee o nomi di colori noti come verde, rosso,…
- updateCellBackGroundColor: Params - colore html come #aa22ee o nomi di colori noti come verde, rosso,…
Il frammento di codice seguente illustra la modifica delle impostazioni dei caratteri dal lato client in GridWeb.
Codice d’esempio
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> |