Actualizar la configuración de fuentes desde el lado del cliente
Contents
[
Hide
]
Este tema trata sobre cómo cambiar la configuración de fuentes desde el lado del cliente en el control Aspose.Cells.GridWeb.
Aspose.Cells GridWeb ahora admite cambiar la configuración de fuente desde el lado del cliente. Para ello, el API proporciona las siguientes funciones
- actualizarCellFontStyle: Parámetros - r/i/b/ib para normal/cursiva/negrita/cursiva&&negrita
- actualizarCellFontSize: Params - nombre de fuente, etc. ‘Sistema’
- actualizarCellFontName: Parámetros - tamaño de fuente, etc. ‘12 puntos’
- actualizarCellFontColor: Parámetros - ninguno/u/l/ul/ para ninguno/subrayado/tachado/subrayado&&tachado
- actualizarCellFontLine: Params - color html como #aa22ee o nombre de color conocido como verde, rojo,…
- actualizarCellBackGroundColor: Params - color html como #aa22ee o nombre de color conocido como verde, rojo,…
El siguiente fragmento de código muestra cómo cambiar la configuración de fuente desde el lado del cliente en GridWeb.
Código de muestra
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> |