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

Copy from Excell to Radgrid is having problem

1 Answer 58 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Thippa Reddy
Top achievements
Rank 1
Thippa Reddy asked on 12 Nov 2010, 04:56 PM
Hi,

using the below code I can copy the excell data and paste it into rad grid and I donot have any problem but if I use RadcomboBox in EditItemTemplate then i can't able to read the values in Mozilla and safari. In I.E it's working fine.
EditItemTemplate

function pasteFromExcel() {
            if (!lastFocused) return;
            var browser = navigator.appName;
            if (browser == "Microsoft Internet Explorer") {
                var clipData = window.clipboardData.getData('Text');
                var crlf = String.fromCharCode(13) + String.fromCharCode(10);
                var table = clipData.split(crlf);
                for (var tRow = 0; tRow < table.length - 1; tRow++)
                    table[tRow] = table[tRow].split(String.fromCharCode(9));
                Array.remove(table, table[table.length - 1]);
                fillTable(table);
            }
            else {

                var clipDiv = document.getElementById("Div1");
                clipDiv.style.display = "block";
                var clipBoardText1 = document.getElementById("clipboardtext1");
                clipBoardText1.style.visibility = "visible";
                if (clipBoardText1.value != "") {
                    var clipData = clipBoardText1.value;
                    var table = clipData.split("\n");
                    for (var tRow = 0; tRow < table.length - 1; tRow++)
                        table[tRow] = table[tRow].split(String.fromCharCode(9));
                    Array.remove(table, table[table.length - 1]);
                    fillTable(table);
                    clipBoardText1.value = "";
                    clipDiv.style.display = "none";
                }
            }
        }


Thanks & Regards,

Thippa Reddy

1 Answer, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 17 Nov 2010, 09:01 AM
Hi Thippa,

It is neither clear what the problem is nor how you are filling the grid with the clip-board data. Could you provide more detailed information and paste your complete aspx and javascript using the CODE-FORMATTER TOOL of the ticket editor.

Regards,
Tsvetoslav
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Grid
Asked by
Thippa Reddy
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Share this question
or