This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi there, We just found the problem for DataGridCsvExporter if the datagrid is binding to the BindingList. It will always lose the first row when exportmode is set to DataGridExportMode.All, Here are the code:
The first row of data is missing from exporter.WriteString(dataGrid). But if you call exporter.WriteString(dataGrid) twice/2nd time then it will have all the data. Thanks, Gordon |
|
|
Hello Gordon I have not been able to reproduce this problem. When exporting a DataGrid using a BindingList and the exporter settings that you posted, I am seeing all the data (and the column headers) in the exported string. Looking through the code, I can not see how it would be possible to miss the first row of data. In ExportMode = All, it simply gets the BindingList itself, and iterates it to generate the csv string. Is there any more info you can think of related to this issue? -Jason Fauchelle |
|
|
Hi Jason, If the class in the Bindinglist has string property, then you can reproduce it 1) Unzip and run the attached project 2) click on MoreProblem button 3) Click on insert button a few times 4) click on Copy button 5) then open notepad.exe 6) paste it to the notepad window, you will see the first line of the first 2 columns are missing 7) repeat 4-6, then everything is fine. |
|
|
Hello Gordon Thanks for the repro project. This bug will be resolved in the next nightly build. -Jason Fauchelle |
|