I want to create a UI for CSV parsing/editing/update via aspx page, and I’m currently investigating DataGridView option. It seems there are ready to use “Update”, “Edit” functions that should, more or less, create a ready to use interface. Although they don’t seem to work with CSV so far (missing edit/update commands).
But since I haven’t been programming in .NET for couple of years, I just can’t find what’s the best way to tackle the problem in short time-frame.
Seems that the CSV reader has to be based around SQL adapter with connection string to “Microsoft Text Provider”, but that requires SQL update/delete statements, doesn’t it? And also, different separators are causing problems “,;\t”.
Should I just skip all this .NET specific way of dealing with data, and just write my own parser with simple table?
Is there a good cheat-sheet where I can quickly gaze over differences between datagrids and dataadapters to understand which one I should choose for the task, and pros/cons for each of them.
I’m really not looking forward towards 10 days of documentation study as I’m not planning to use .NET in future much, but somehow I just can’t find what I’m looking for in docs/articles, and I don’t want to re-implement all the functionality that’s widely available from scratch.
Can anyone give me a hint where to look for answers that doesn’t involve hours of wasted time on semi-relevant documentation?
I think you are mixing stuff here.
DataGridViewis just a presentation of data. CSV is format of data. So you just need to read CSV file into a bindable structure and bind to the grid. The grid itself provides UI for editing, updating etc, but it’s up to you to serialize the data that is the grid bound to back to CSV.Although you can use MS Text Provider, it requires the provider to be installed on the machine, so you’ll depend on it. I’d suggest you to either create your own parser (it’s quite an easy format), or use some open-source library, e.g. http://www.filehelpers.com/