Hi,
I've ultrawebgrid in my application where i can copy data from Excel and paste in it therby for validation and submission.
I'm having 16 columns in the grid out of which, for 3 columns no data are entered in the grid as they re only read-only fields in the Ultrawebgrid.
So in Excel, I'm having data for only 13 columns and 3 other columns(read-only in the grid) are just hidden in Excel sheet.....
So when i copy these data from Excel and paste in the grid, I want the data from respective columns (in Excel) to get pasted in the respective columns in the grid::
How can i check this??? Can anyone help with this copy/paste operation????
This is really good HBA.... but it works only for 1 row.... i mean when i copy when i copy bunch of rows frm Excel to grid. it's only the first row data getting pasted correctly in appropriate columns.... other rows are not considered.
What i can do ???? Pls reply
Try this code
function UltraWebGrid1_BeforeClipboardOperation(gridName,operationType,options )
{
if(operationType != igtbl_ClipboardOperation.Paste)
return true;
}
var copiedData = igtbl_getClipboardData();
var copiedCellValues = copiedData.split('\t');
if(copiedCellValues.length != 13)
alert('Wrong paste');
var grid= igtbl_getGridById(gridName);
var band = grid.Bands[0];
var row = grid.getActiveRow();
var gridCellNum = 0;
var copiedValNum = 0;
while(copiedValNum < 13 )
/*Paste if cell is not read only*/
if(band.Columns[gridCellNum].AllowUpdate != 2)
row.getCell(gridCellNum).setValue(copiedCellValues[copiedValNum++]);
gridCellNum++;
Let me know if this is helpful to you.
Can som1 plz help.... URGENT..........