Aspose.Cells.GridWeb.Examples.CSharp.Miscellaneous.Common.Pagination.LoadData C# (CSharp) Method

LoadData() private method

private LoadData ( ) : void
return void
        private void LoadData()
        {
            // Gets the web application's path.
            string path = (this.Master as Site).GetDataDir();
            string fileName = path + "\\Miscellaneous\\EmployeeSales.xls";

            // Clears datasheets first.
            GridWeb1.WorkSheets.Clear();

            // Imports from an excel file.
            GridWeb1.ImportExcelFile(fileName);

            // Freeze sheet2
            GridWeb1.WorkSheets[1].FreezePanes(2, 0, 2, 0);

            // Set sheets selectedIndex to 0
            GridWeb1.WorkSheets.ActiveSheetIndex = 0;
        }