Aspose.Cells.GridWeb.Examples.CSharp.Articles.SetCellPercentageFormat.InitGridWeb C# (CSharp) Method

InitGridWeb() private method

private InitGridWeb ( ) : void
return void
        private void InitGridWeb()
        {
            // ExStart:SetCellPercentageFormat
            // Access cell A1 of first gridweb worksheet
            GridCell cellA1 = GridWeb1.WorkSheets[0].Cells["A1"];

            // Access cell style and set its number format to 10 which is a Percentage 0.00% format
            GridTableItemStyle st = cellA1.Style;
            st.NumberType = 10;
            cellA1.Style = st;
            // ExEnd:SetCellPercentageFormat

            cellA1.PutValue(0.03);
        }
    }
SetCellPercentageFormat