Not able to display data loaded from .csv file DataGrid in WPF
i having trouble displaying data in datagrid.
i've searched online , found 1 of possible solutions or seems still no luck.
wondering if tell me what's wrong code?
fiy: loading .csv datatable , exporting datagrid.
here code:
seemed problem solved setting
didn't work in case.
please help?
i've searched online , found 1 of possible solutions or seems still no luck.
wondering if tell me what's wrong code?
fiy: loading .csv datatable , exporting datagrid.
here code:
using system; using system.collections.generic; using system.linq; using system.text;using system.windows; using system.windows.controls; using system.windows.data; using system.windows.documents; using system.windows.input; using system.windows.media; using system.windows.media.imaging; using system.windows.navigation; using system.windows.shapes; using system.data; using system.io; namespace splash { /// <summary> /// interaction logic mainwindow.xaml /// </summary> public partial class mainwindow : window { dataloader datatable = new dataloader(); } public mainwindow() { initializecomponent(); } private void data_table(object sender, selectionchangedeventargs e) { string path = @"c:\users\lyukshins\dropbox\program_test\automation\data\database.csv"; fileinfo thefile = new fileinfo(path); datatable = new dataloader(); datatable table =datatable.getdatatablefromcsv(thefile); datagrid.itemssource = table.defaultview; datagrid.autogeneratecolumns = true; } private void copy_files_click(object sender,routedeventargs e) { } private void rename_click(object sender, routedeventargs e) { } } }
seemed problem solved setting
datagrid.itemssource = table.defaultview; datagrid.autogeneratecolumns = true;
didn't work in case.
please help?
hello gked,
welcome msdn forum , wpf queston avialible dedicated forum , see link below http://social.msdn.microsoft.com/forums/en/wpf/threads
best regards.
Visual Studio Languages , .NET Framework > Visual C#
Comments
Post a Comment