Mettre à jour les paramètres de police côté client

Aspose.Cells GridWeb prend désormais en charge la modification des paramètres de police depuis le côté client. Pour cela, l’API fournit les fonctions suivantes

  • updateCellFontStyle: Params - r/i/b/ib pour régulier/italique/gras/italique&&gras
  • updateCellFontSize: Params - nom de la police, etc. ‘Système’
  • updateCellFontName: Params - taille de police, etc. ‘12pt’
  • updateCellFontColor : Paramètres - aucun/u/l/ul/ pour aucun/souligner/barré/souligner&&barré
  • updateCellFontLine : Paramètres - couleur html comme #aa22ee ou nom de couleur bien connu comme vert,rouge,…
  • updateCellBackGroundColor : Paramètres - couleur html comme #aa22ee ou nom de couleur bien connu comme vert,rouge,…

Les extraits de code suivants démontrent la modification des paramètres de police depuis le côté client dans GridWeb.

Code d’exemple

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