Hi,
I have grid in which 1 column (say A) if fixed and rest are not (B,C,....). I have implemented the paste from excel and followed the example. But I could see the indexes are different. For column A, it is 0 and for the columns (B,C...) are again starting from 0. So, the pasting is not working as expected. Can anyone suggest any solution?
Thanks
Indra
Hello Indra,
After further investigating this matter, I have prepared a small sample by following the step-by-step guide in our Implementing Paste from Excel in igGrid topic here and configuring some of the columns to be fixed.
The difference is in the custom getVisibleColumns function as it returns the visible columns after being fixed which causes the reordering when assigning the processed Excel data to the corresponding cell.
The columns with their original order are retrieved on the igGrid’s created event by using the igGrid’s _columns property.
// get visible columns var visibleColumns; $(document).on("igcontrolcreated", "#grid", function (evt, ui) { var columns = []; $(ui.owner._columns).each(function () { if (this.hidden !== true) { columns.push(this); } }); visibleColumns = columns; });
The result could be observed in the attachment below:
Additionally, attached could be found my sample for your reference along with the sample Excel file. Please test it on your side and let me know how it behaves.
Looking forward to your reply.
Sincerely, Riva Ivanova Associate Software Developer
4760.pasteFromExcel.zip
8484.sample-data.xlsx
Can you try your sample with updatedRecords? For updated Records, i am having an error.