Click here to Skip to main content
15,881,812 members
Home / Discussions / C#
   

C#

 
GeneralRe: Multithreaded shared remote object ? Pin
Tom Larsen29-Apr-04 11:07
Tom Larsen29-Apr-04 11:07 
GeneralRe: Multithreaded shared remote object ? Pin
Gangren29-Apr-04 11:22
Gangren29-Apr-04 11:22 
AnswerRe: Multithreaded shared remote object ? Pin
Gangren27-Apr-04 20:00
Gangren27-Apr-04 20:00 
GeneralPrint Preview Pin
GoodQuestion23-Apr-04 5:18
GoodQuestion23-Apr-04 5:18 
GeneralRe: Print Preview Pin
Heath Stewart23-Apr-04 6:09
protectorHeath Stewart23-Apr-04 6:09 
GeneralRe: Print Preview Pin
GoodQuestion27-Apr-04 11:21
GoodQuestion27-Apr-04 11:21 
GeneralDataGrids used for simple data Pin
Jon G23-Apr-04 4:45
Jon G23-Apr-04 4:45 
GeneralRe: DataGrids used for simple data Pin
Heath Stewart23-Apr-04 5:33
protectorHeath Stewart23-Apr-04 5:33 
You can always explicitly define the style of a DataGrid using a DataGridTableStyle which has a collection of DataGridColumnStyles. See the DataGrid.TableStyles collection property documentation in the .NET Framework SDK for more information and an example.

If you want to read-in data you can still use a DataSet which is easy to bind to a DataGrid. If your file is an XML document using a 2- or 3-element deep format (a "DataSet format"), then you can use DataSet.ReadXml to read it in and assign that to a DataGrid.DataSource as you would for a DataSet from a SQL command or adapter.

If it's a text file, you can either manually read it into a DataSet or read it in to another IList or IListSource implementation, which is really what the DataSource property wants. The example in the DataGridTableStyle.MappingName property documentation shows an example of data-binding to an array of objects with defined properties. Since an array implicitly inherits from System.Array - which implements IList - you can bind that as well.

 

Microsoft MVP, Visual C#
My Articles
QuestionHow do you bind data to a CheckedListBox? Pin
inyoursadachine23-Apr-04 4:37
inyoursadachine23-Apr-04 4:37 
AnswerRe: How do you bind data to a CheckedListBox? Pin
Heath Stewart23-Apr-04 5:28
protectorHeath Stewart23-Apr-04 5:28 
GeneralDataGrid full row select Pin
Guinness4Strength23-Apr-04 4:18
Guinness4Strength23-Apr-04 4:18 
GeneralRe: DataGrid full row select Pin
Heath Stewart23-Apr-04 5:13
protectorHeath Stewart23-Apr-04 5:13 
GeneralRe: DataGrid full row select Pin
Jay Shankar25-Apr-04 18:09
Jay Shankar25-Apr-04 18:09 
GeneralRe: DataGrid full row select Pin
Guinness4Strength26-Apr-04 4:18
Guinness4Strength26-Apr-04 4:18 
GeneralRe: DataGrid full row select Pin
Jay Shankar26-Apr-04 14:42
Jay Shankar26-Apr-04 14:42 
GeneralRe: DataGrid full row select Pin
Guinness4Strength27-Apr-04 3:23
Guinness4Strength27-Apr-04 3:23 
GeneralArray.IndexOf with an array of structures Pin
ebbie23-Apr-04 3:29
ebbie23-Apr-04 3:29 
GeneralRe: Array.IndexOf with an array of structures Pin
Heath Stewart23-Apr-04 3:54
protectorHeath Stewart23-Apr-04 3:54 
GeneralAdapter Parameter Pin
DougW4823-Apr-04 0:24
DougW4823-Apr-04 0:24 
GeneralRe: Adapter Parameter Pin
Jon G23-Apr-04 2:06
Jon G23-Apr-04 2:06 
GeneralRe: Adapter Parameter Pin
Heath Stewart23-Apr-04 2:21
protectorHeath Stewart23-Apr-04 2:21 
GeneralRe: Adapter Parameter Pin
Heath Stewart23-Apr-04 2:08
protectorHeath Stewart23-Apr-04 2:08 
GeneralIncluding header file in C# Pin
Aisha Ikram22-Apr-04 23:28
Aisha Ikram22-Apr-04 23:28 
GeneralRe: Including header file in C# Pin
Colin Angus Mackay22-Apr-04 23:40
Colin Angus Mackay22-Apr-04 23:40 
GeneralRe: Including header file in C# Pin
Ian Darling23-Apr-04 0:43
Ian Darling23-Apr-04 0:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.