@@ -1650,31 +1650,41 @@ making life easier for some folks there is a dgText property. The dgText
16501650property always reflects the same value as the dgData but in tab
16511651delimited form. pText is assumed to be a collection of data where each
16521652row is delimited by the return character and each item is delimited by a
1653- tab. You can map each item of each line in pText to a particular key in
1653+ tab.
1654+
1655+ You can map each item of each line in pText to a particular key in
16541656an array (and thus a table column) by passing in true for
16551657pFirstLineContainsHeaders. If true then the data grid will extract the
1656- first line of pText and use the values for the internal key/column
1657- names. The default value for pFirstLineContainsHeaders is false. If you
1658- set the dgText of a data grid table then all data will be imported and
1659- assigned to the appropriate column depending on the value of
1658+ first line of pText and match the values for existing internal key/column
1659+ names.
1660+
1661+ The default value for pFirstLineContainsHeaders is false.
1662+
1663+ If you set the dgText of a data grid table then all data will be imported
1664+ and assigned to the appropriate column depending on the value of
16601665pFirstLineContainsHeaders. Normally you should set this property to true
16611666and provide the header that maps each item of each line to a specific
1662- column. Note that if pFirstLineContainsHeaders is true then the columns
1663- must already exist in your data grid table in order to be displayed. If
1664- pFirstLineContainsHeaders is false then the columns property of the data
1667+ column.
1668+
1669+ >*Note:* that if pFirstLineContainsHeaders is true then the columns
1670+ >must already exist in your data grid table in order to be displayed.
1671+ >Setting pFirstLineContainsHeaders to true does not create the headers for you.
1672+
1673+ If pFirstLineContainsHeaders is false then the columns property of the data
16651674grid is used for mapping. For Example, the first item of a line of pText
16661675would be assigned to the column that appears on the first line in the
16671676columns property of the data grid. If line 1 of pText contains more
16681677items than there are columns in the table then new columns are added.
1669- Any new columns are named "Col 1", "Col 2", etc. If you set the dgText
1670- property of a data grid form then the data will be imported but it is up
1671- to you to modify your Row Template Behavior to display the imported data
1672- correctly. If pFirstLineContainsHeaders is false then each item of each
1673- line in pText will be named "Label X" (where X is the item number) in
1674- the array that is passed to FillInData. When retrieving the dgText
1675- property you can include the column names in the first line by setting
1676- pIncludeColumnNames to true.
1678+ Any new columns are named "Col 1", "Col 2", etc.
1679+
1680+ If you set the dgText property of a data grid form then the data will be
1681+ imported but it is up to you to modify your Row Template Behavior to
1682+ display the imported data correctly. If pFirstLineContainsHeaders is
1683+ false then each item of each line in pText will be named "Label X"
1684+ (where X is the item number) in the array that is passed to FillInData.
16771685
1686+ When retrieving the dgText property, setting the pIncludeColumnNames to true
1687+ will cause the column names to be included in the first line.
16781688
16791689Name: dgHilitedIndexes synonyms: dgHilitedIndex type: property
16801690Associations: datagrid
0 commit comments