Hi,
I am using the below Java script code for copy the excell data(ClipBoard) and paste it into rad grid. It's working fine. But if I use RadcomboBox in EditItemTemplate then i can't able to read the values in Mozilla and safari. In I.E I can done.
Actual After Postback RadCombo Values are Disappearing in FireFox and Safari.
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
I am using the below Java script code for copy the excell data(ClipBoard) and paste it into rad grid. It's working fine. But if I use RadcomboBox in EditItemTemplate then i can't able to read the values in Mozilla and safari. In I.E I can done.
Actual After Postback RadCombo Values are Disappearing in FireFox and Safari.
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