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

Need to preserve spaces in cells as data

0 Answers 57 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ken O.
Top achievements
Rank 1
Ken O. asked on 20 Jun 2012, 05:37 PM
I've observed that spaces in text are being removed in my radGrid when retrieving using javascript. The spaces are present in the html, just not able to get the full data when I retrieve it. I'm using code similar to what is documented in Telerik documentation.
http://www.telerik.com/help/aspnet-ajax/grid-getting-cell-values-for-selected-rows-client-side.html

Specifically, I have text similar to "A  B", where there are two spaces between A and B, but code only returns 1 of the spaces. Is this a bug in Telerik javascript functions, or am I doing something wrong?

Snippet of code relevant to my issue is below.
function CheckSelectedRows(strCtrlColumnName, strColumnName) {
    var gridType = 'GrdApplication';
    var grid = $find(gridType);
    var MasterTable = grid.get_masterTableView();
    var Rows = MasterTable.get_dataItems();
    for (var i = 0; i < Rows.length; i++) {
        var cell = MasterTable.getCellByColumnUniqueName(Rows[i], strCtrlColumnName);
            var curRow = MasterTable.getCellByColumnUniqueName(Rows[i], strColumnName);
            if (Selectedvalue != '') {
                Selectedvalue = Selectedvalue + '\r\n' + curRow.innerHTML;
            }
        }
}

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Ken O.
Top achievements
Rank 1
Share this question
or