Copy paste data from Excel to grid using JQGrid - jqgrid

this is my first time use of JQGrid, I want to copy data from excel and paste it into grid using jQGrid. I thought to create a textarea to paste excel data which act like a clipboard and then this data will display in grid, but I don't have any idea how to do that also I searched for two days, but I can't find the solution using JQGrid.
Any help is appreciated :)

Related

add textbox row below header gridview to use as filter

I have seen at times, datagridviews using an extra cell placed right under the Header of the column, as a filter for the values in the specific column.
I know it is possible to do so through a templatefield in ASP but I need to alter a desktop application using a DataGridView to display the data.
Does anyone know how to add a filter row to the grid in a vb net desktop application?
If I place a textbox right below the header row of the grid, I will hide the first row of data and I want to avoid this; if I place a textbox somewhere on the form, it looks pretty tacky.
Thank you for any suggestion.

Kendo Grid Footertemplate export to Excel

I have a Kendo UI Grid with footertemplate. The grid is all working fine, but if I want to export it to Excel, I also want the footertemplate to be included but in different rows. How can I make the footer in Excel to be on different rows like the grid? Thanks for the help.
ex.
If I have footertemplate with Table and 2 TR, then I export to excel I want it to 2rows. Currently it combines everything on a single cell.
I'm just new on using this site so I cannot upload any image yet.

Is Kendo grid a good option for excel like editing?

I am a bit confused about my choice of Kendo UI grid for doing an excel like functionality.
My requirement is for a lab which they need to log samples and depending on some values do some calculations and update another cell. I need to add new rows to the grid and also do change tracking etc.
Any suggestions on the above?

jqGrid issue - getRowData

I seem to be havign yet another problem with jqGrid :-( I am trying to get the current row data using getRowData, but all I get back is an array [object, Object]. What am I doing wrong?
This is what I'm using
var rowdata = $("#list").jqGrid('getRowData');
Can somebody help?
thanks
After reading in the comments additional information about your problem I would recommend you following.
If you need to print the page which contains jqGrid you could need to prepare additional CSS for media="print". See here for additional information.
The method getRowData called without parameters give back the array of rows which are array of visible cells. For every cell will be called unformatter, so the data could be not identical to to data which you posted to jqGrid. Moreover if you use data paging or filtering you can have another problem: only visible cells from the current page will be returned back.
I personally prefer to use export to Excel instead of printing the pages. In the case I add an custom button in the navigator bar. If the button will be clicked by the user the request to the corresponding MVC controller action will be sent. The server get all data for the corresponding grid from the database and generate XLSX Excel data as stream with respect of Open XML SDK. The corresponding code is not very small, but in the way one can generate perfect Excel file formatted like it is required. In the case you don't need install Microsoft Office on the server side. The user just opens Excel with all data if he/she clicks the "Export to Excel" button in the jqGrid. In Excel there are very good printing possibility. The most users knows Excel very good and can customize the data (hide some columns for example) before printing.
So my suggestion to you to spend some time in implementing export to Excel instead of implementing printing of jqGrid directly.

jqgrid save xml string inside hidden cell problem

I have 2 grids. in both of them i use loadonce:true .
In the first grid i have a cell with an onblur event which
opens a dialog with the second grid.
after i edit the second grid i want to save as xml it's content and
ascribe it to the row of the first grid (the row witch opened the dialog).
In the end i want to generate an xml from the first grid that will
include the xml I generated before in the second grid.
so what is the best way to implement this?
Thank's In Advance.
Depend on how exactly you implement the scenario which you describe you could has any data in the internal data parameter of jqGrid existing always if one use local datatype or loadonce:true in your case.
Direct accessing to the data parameter per jQuery("#grid_id").getGridParam('data') get your reference to the data array. The data array contain all data of the grid (not only the current displayed page) and the data are not yet placed in the <td> element. So the data are unmodified and could contain for example any XML fragments.
UPDATED: To make you easier to understand what I mean I made the small demo. If you double-click on a row you will see the XML data associated with the row.
The "note" column can be hidden. Because all hidden columns exist in grid as HTML markup I made it visible. You can see the difference what can be saved as grid internal data and what can be displayed (also as hidden data).
UPDATED 2: You can consider to use autoencode:true option in your grids.

Resources