I would like to be able to copy one row and five columns from an Excel spreadsheet to a table like structure on a ASP.NET web form. The idea is keeping the data in the exact row and column from Excel to the table like control on the ASP.NET web-form. Then I want to be able to save to the contents of the ASP.NET control to a database by a buttoon command click. What ASP.NET control would allow me to do this? Gridviews and datagrids don't seem to allow me to do this. Thanks.
From what I have seen, you have to parse the content of the clipboard yourself (comma separated) and place that in the cells of the gridView.
I would like to know if there is an other way.
Your requirement exactly matches with mine and i found solution here. you can try tthis link http://blogs.msdn.com/b/jebarson/archive/2010/06/29/copy-and-paste-excel-or-clipboard-data-to-gridview-in-asp-net.aspx if you need any help feel free to ask.
Related
I am very new to React to JS and also this is my first question to the community so please help me.
I want to create a table which will display the data from a JSON file (it should display some 50 rows per page), also I need the capability to modify the data in the same table and later update the contents of the JSON accordingly.
I need to have the following types of cells in the table: Normal uneditable text box, editable text box, Select Lists (showing data from another JSON file), Number fields, calendar, etc..
I know it might feel like a stupid question to many of you but please help me understand how to approach this problem.
(I am not asking for working code, please help me on how to get started with it.)
Thank you.
Tons of libraries on github can do what you need.
For example:
https://react-bootstrap-table.github.io/react-bootstrap-table2/
https://github.com/tannerlinsley/react-table
https://material-ui.com/demos/tables/
There are many many others, which one should be used is based on your detail requirement and then find the best fit.
For table :
1. Create a component
2. Store the json value in state.
3. construct table. In tbody use state.map and return rows.
For uneditable text-box make it read-only.
I'm working on one project where data is coming from the WCF web services and in the List format.
Firstly, Is it possible to assign that list directly to the data grid view? If not then I'm converting that list into Dataset and binding to the Grid but the problem is, Collection List contains thousand of records and converting into Dataset decrease the performance.
Also, This is a direct bing with List or the Dataset to Gridview so is it possible to achieve the paging including First, Previous, Next, Last and Page sets?
Your help would be appreciated.
Thank you in advance for the help!
Dhaval
I dont think you can 'directly' do it but somehow , theres a way. Here is a question of the same matter.
Gridview using a generic list as DataSource and Auto-generating columns
I took over a very old project written in VB6, it's a mess and I don't really know VB so it would be great if someone could help me.
I have a Data control which gets records from an Access database which I would like to replace with some kind of drop down list - I thought about ComboBox. Unfortunately I cannot get records from the database in the same way as with Data, so I thought about populating ComboBox based on what's in the Data control. How can I achieve it? Or is there a better way to do it?
My last resort is to create all database methods manually in order to replicate Data's behaviour for ComboBox but I think it's too much effort for such a small change.
Thanks in advance!
The Data control does more than just let them browse through the records, it manages the database, current record, data binding, etc.
The easiest way to do what you want is to hide/move the data control and use its .Recordset.Find*() methods.
Note that DAO is archaic and has been supersceded at least once for VB6 (with ADO)
I have a an excel file that has been manually populated, and now needs to be automatically populated using ASP.NET, vb or c#. I've been looking around, and have found examples on how to export a gridview, and data to excel sheet, but not anyway to maintain the format of the original template. I've recently populated a word document using merge fields... does excel have anything similar? Could I break the file down into XML and use that as a template? Any ideas?
Thanks.
Office Writer from soft aritsans will do exactly this. Plus a lot more it is extremely powerful and I have used it to great effect in the past.
The down side is that it is rather expensive!
Perhaps this is mere wishful thinking, but is there a simple way (in ASP.NET) to extract (at run-time) the formatting for different columns from a table in an Access 2007 database and apply that formatting to a GridView control?
Also, is there a way to get the "Caption" values for columns in a table in the database and use those as the column headers for the GridView?
I'm new at ASP.NET, so I don't know what's possible and what isn't :-)
Yes, this is wishful thinking. The drivers for ADO.NET to Access don't give you style information.