Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Problem in addRowData ($.jgrid.stripHtml(v))
31/08/2009
08:20
Avatar
alexhome
Guest
Guests

I download latest version 3.5.2 31.08.2008.

DealerTable = $(”#dealertable”).jqGrid({
  scrollrows: true,
  datatype: “local”,
  colNames: ['', 'Имя','Логин', 'Компаний', 'Объектов'],
  colModel: [
  { name: 'IDDealer', index: 'IDDealer', width: 0, sorttype: "int", key: true, hidden: true },
  { name: 'DRName', index: 'DRName', width: 150, sorttype: "string" },
  { name: 'LLogin', index: 'LLogin', width: 150, sorttype: "string" },
  { name: 'CompanyCount', index: 'CompanyCount', width: 100, sorttype: "int" },
  { name: 'DeviceCount', index: 'DeviceCount', width: 100, sorttype: "int" }
  ],
  scrollrows: false,
  multiselect: false,
  onSelectRow: function(id) {
  CDealer = DealerTable.getRowData(id);
  //———— подсветка строки по значению элемента td
  $(”#devicetable tr”).removeClass(”highlight”);
  $(”#devicetable td:nth-child(6)[title='" + CDealer.IDDealer + "']“).parent().addClass(”highlight”);

  },
  ondblClickRow: function(id) {
  location.replace(”/Admin/Dealer?IDDealer=” + id);
  }
  });

 On command:

for (var i = 0; i < result.length; i++)
       DealerTable.addRowData(resul[i].IDDealer, result[i]);

i have error on line 1593 in grid.base.js:

row += “<td role=\\”gridcell\\” “+prp+” title=\\””+$.jgrid.stripHtml(v)+”\\”>”+v+”</td>”;

if i change version to 3.5 Beta, all works normally

31/08/2009
09:01
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Does your data contain special characters?

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

31/08/2009
09:11
Avatar
alexhome
Guest
Guests

  CompanyCount: 4
  DeviceCount: 9
  DRName: “xxxxxxxxxxxxxxxx”
  IDDealer: 48
  LLogin: “dd”
  LPassword: null

its first record result[0], on this record rise exception

i set LPassword to “12345″, but the situation repeats with an error

i not have special char.

31/08/2009
10:48
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Check your code. You have error:

for (var i = 0; i < result.length; i++)
       DealerTable.addRowData(resul[i].IDDealer, result[i]); // we do not have resul

Should be

for (var i = 0; i < result.length; i++)
       DealerTable.addRowData(result[i].IDDealer, result[i])

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

31/08/2009
10:58
Avatar
alexhome
Guest
Guests

iam sorry, it not an error,

I changed a code for understanding and itself have made a misprint

from:

for (var i = 0; i < result[0].length; i++) {
  result[0][i].LPassword = “123″;
  DealerTable.addRowData(result[0][i].IDDealer, result[0][i]);
  }

to

 for (var i = 0; i < result.length; i++) 
  DealerTable.addRowData(resul[i].IDDealer, result[i])

 Why in 3.5Beta works, and in 3.5.2 does not work, I only changed a file grid.base.js and grid.locale-ru.js

01/09/2009
12:05
Avatar
alexhome
Guest
Guests

help, its dont work

02/09/2009
04:47
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

What is the error reported - i.e the error message.

If possible send me a link to the problem.

Also try with this:

for (var i = 0; i < result.length; i++) {
  DealerTable.addRowData(i+1, result[i]);
  }

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

02/09/2009
05:37
Avatar
alexhome
Guest
Guests

on line 1593 in grid.base.js

line:

row += “<td role=\\”gridcell\\” “+prp+” title=\\”"+$.jgrid.stripHtml(v)+”\\”>”+v+”</td>”;

Error:

Microsoft JScript run error: the Object does not support this property or a method

I try

 for (var i = 0; i < result.length; i++) {
  DealerTable.addRowData(i+1, result[i]);
  }

There is a same error.

I see in quick watch in VS

$.jgrid.stripHtml(v) <- (stripHTML(v) - not found)

02/09/2009
06:06
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

load the language file before the jqgrid - see http://www.trirand.com/jqgridw.....stallation

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

02/09/2009
06:17
Avatar
alexhome
Guest
Guests

All has earned Toni's many thanks, and I apologise for the carelessness

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
91 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information