This is a migrated thread and some comments may be shown as answers.

BULK upload CSV file and server side validation.

1 Answer 62 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Anurag
Top achievements
Rank 1
Anurag asked on 10 Sep 2015, 05:56 AM
I haven't used telerik control (VS2012) before now I have chance to work on the same, all controls are awesome and very rich features.
I have a requirement where I need to load record in bulk from .csv file also validating record of each row then Want to show In a grid view with proper success/unsuccess message for each row than need to call
a API to insert record row by row in another application server. Please suggest me what control i need to use, study and
the way to achieve this in optimized manner. Appreciate if you provide and sample solution. Thanks in Advance.

1 Answer, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 14 Sep 2015, 01:19 PM
Hello,

In order to implement the desired functionality, you can use the RadAsyncUpload, in order to upload the desirable csv file. Once stored in the file system, you can manipulate this file, in order to read the content and place it in a RadGrid. For example, you can fill each row from the csv file into a List and pass. After that you can insert the data from the List in the RadGrid, using its InserItem method of hte MasterTableView. For example:

//retrieve the values from the uploaded CSV file
Dictionary<string, object> values = new Dictionary<string, object>();
values["ID"] = 5;
values["Field1"] = "some value";
RadGrid1.MasterTableView.InsertItem(values);

Regards,
Nencho
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
AsyncUpload
Asked by
Anurag
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Share this question
or