FlexGrid for WinForms
LoadGrid(String,FileFormatEnum,FileFlags,Encoding) Method



Name of the file to load, including the path.
File format to use.
Options to use when loading the file.
System.Text.Encoding to use when saving the file.
Loads the grid from a file.
Syntax
'Declaration
 
Public Overloads Sub LoadGrid( _
   ByVal fileName As String, _
   ByVal format As FileFormatEnum, _
   ByVal flags As FileFlags, _
   ByVal encoding As Encoding _
) 
'Usage
 
Dim instance As C1FlexGridBase
Dim fileName As String
Dim format As FileFormatEnum
Dim flags As FileFlags
Dim encoding As Encoding
 
instance.LoadGrid(fileName, format, flags, encoding)

Parameters

fileName
Name of the file to load, including the path.
format
File format to use.
flags
Options to use when loading the file.
encoding
System.Text.Encoding to use when saving the file.
Remarks

This method loads grid from a file previously saved with the SaveGrid(String,FileFormatEnum,FileFlags,Encoding) method. Formats supported include comma-delimited text files (CSV format), tab-delimited text files, and Microsoft Excel files (.XLS).

When loading text files, rows and columns are added to the grid if needed to accommodate the file contents. Text files contain only data and no formatting information.

When loading Excel files, the grid retrieves the first worksheet from the specified workbook file. The LoadExcel(String,String,FileFlags) method allows you to specify which worksheet should be loaded. You can use the LoadExcelSheetNames method allows you to retrieve a list of the worksheets stored in an XLS file. The grid can save and load data and formatting information from XLS files.

Grids can also be persisted to Xml format using the WriteXml(String) and ReadXml(String) methods.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

C1FlexGridBase Class
C1FlexGridBase Members
Overload List

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Send Feedback